void (int type) { ThreadingAssertions.assertEventDispatchThread(); int currentHorOffset = myScrollingModel.getHorizontalScrollOffset(); myScrollbarOrientation = type; if (type == EditorEx.VERTICAL_SCROLLBAR_LEFT) { myScrollPane.setLayout(new LeftHandScrollbarLayout()); } else { myScrollPane.setLayout(new ScrollPaneLayout()); } myScrollingModel.scrollHorizontally(currentHorOffset); }