use of com.intellij.ui.JBSplitter in project android by JetBrains.
the class HprofView method createNavigationSplitter.
@NotNull
public static JBSplitter createNavigationSplitter(@Nullable JComponent leftPanelContents, @Nullable JComponent rightPanelContents) {
JBPanel navigationPanel = new JBPanel(new BorderLayout());
navigationPanel.setBackground(JBColor.background());
if (leftPanelContents != null) {
navigationPanel.add(leftPanelContents, BorderLayout.CENTER);
}
JBPanel contextInformationPanel = new JBPanel(new BorderLayout());
contextInformationPanel.setBackground(JBColor.background());
if (rightPanelContents != null) {
contextInformationPanel.add(rightPanelContents, BorderLayout.CENTER);
}
JBSplitter navigationSplitter = new JBSplitter(false);
navigationSplitter.setFirstComponent(navigationPanel);
navigationSplitter.setSecondComponent(contextInformationPanel);
navigationSplitter.setDividerWidth(DIVIDER_WIDTH);
return navigationSplitter;
}
use of com.intellij.ui.JBSplitter in project android by JetBrains.
the class AbstractAddDependenciesDialog method createCenterPanel.
@Override
@Nullable
protected JComponent createCenterPanel() {
if (myMainPanel == null) {
myMainPanel = new JPanel(new BorderLayout());
myScopesPanel = createDependencyScopesPanel(myModule);
JBSplitter splitter = new JBSplitter(true, getSplitterProportionKey(), .55f);
splitter.setBorder(createEmptyBorder());
JComponent view = getDependencySelectionView();
view.setBorder(createMainPanelBorder());
splitter.setFirstComponent(view);
myScopesPanel.setBorder(createMainPanelBorder());
splitter.setSecondComponent(myScopesPanel);
myMainPanel.add(splitter, BorderLayout.CENTER);
myMainPanel.add(new TitlePanel(myModule, getInstructions()), BorderLayout.NORTH);
}
return myMainPanel;
}
use of com.intellij.ui.JBSplitter in project intellij-community by JetBrains.
the class ProjectJdksConfigurable method reset.
@Override
public void reset() {
super.reset();
myProjectJdksModel.reset(myProject);
myRoot.removeAllChildren();
final Map<Sdk, Sdk> sdks = myProjectJdksModel.getProjectSdks();
for (Sdk sdk : sdks.keySet()) {
final JdkConfigurable configurable = new JdkConfigurable((ProjectJdkImpl) sdks.get(sdk), myProjectJdksModel, TREE_UPDATER, myHistory, myProject);
addNode(new MyNode(configurable), myRoot);
}
//restore selection
selectJdk(myProjectJdksModel.getProjectSdk());
JBSplitter splitter = extractSplitter();
if (splitter != null) {
splitter.setAndLoadSplitterProportionKey("project.jdk.splitter");
}
}
use of com.intellij.ui.JBSplitter in project intellij-community by JetBrains.
the class PythonConsoleView method splitWindow.
private void splitWindow() {
Component console = getComponent(0);
removeAll();
JBSplitter p = new JBSplitter(false, 2f / 3);
p.setFirstComponent((JComponent) console);
p.setSecondComponent(mySplitView.getPanel());
p.setShowDividerControls(true);
p.setHonorComponentsMinimumSize(true);
add(p, BorderLayout.CENTER);
validate();
repaint();
}
use of com.intellij.ui.JBSplitter in project intellij-community by JetBrains.
the class PythonConsoleView method restoreWindow.
public void restoreWindow() {
JBSplitter pane = (JBSplitter) getComponent(0);
removeAll();
if (mySplitView != null) {
Disposer.dispose(mySplitView);
mySplitView = null;
}
add(pane.getFirstComponent(), BorderLayout.CENTER);
validate();
repaint();
}
Aggregations