use of com.intellij.ui.JBSplitter in project intellij-plugins by JetBrains.
the class SplitFileEditor method createComponent.
@NotNull
private JComponent createComponent() {
final JBSplitter splitter = new JBSplitter(false, 0.5f, 0.15f, 0.85f);
splitter.setSplitterProportionKey(MY_PROPORTION_KEY);
splitter.setFirstComponent(myMainEditor.getComponent());
splitter.setSecondComponent(mySecondEditor.getComponent());
myToolbarWrapper = new SplitEditorToolbar(splitter);
if (myMainEditor instanceof TextEditor) {
myToolbarWrapper.addGutterToTrack(((EditorGutterComponentEx) ((TextEditor) myMainEditor).getEditor().getGutter()));
}
if (mySecondEditor instanceof TextEditor) {
myToolbarWrapper.addGutterToTrack(((EditorGutterComponentEx) ((TextEditor) mySecondEditor).getEditor().getGutter()));
}
final JPanel result = new JPanel(new BorderLayout());
result.add(myToolbarWrapper, BorderLayout.NORTH);
result.add(splitter, BorderLayout.CENTER);
adjustEditorsVisibility();
return result;
}
Aggregations