void (int type) { assertIsDispatchThread(); int currentHorOffset = myScrollingModel.getHorizontalScrollOffset(); myScrollBarOrientation = type; if (type == VERTICAL_SCROLLBAR_LEFT) { myScrollPane.setLayout(new LeftHandScrollbarLayout()); } else { myScrollPane.setLayout(new ScrollPaneLayout()); } myScrollingModel.scrollHorizontally(currentHorOffset); }