Israel's wartime leader has spent many key hours of the last few months in the austere surroundings of Jerusalem and Tel Aviv District Court rooms, where he is on trial.