Search in sources :

Example 6 with JBSplitter

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;
}
Also used : JBSplitter(com.intellij.ui.JBSplitter) JBPanel(com.intellij.ui.components.JBPanel) NotNull(org.jetbrains.annotations.NotNull)

Example 7 with JBSplitter

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;
}
Also used : JBSplitter(com.intellij.ui.JBSplitter) Nullable(org.jetbrains.annotations.Nullable)

Example 8 with JBSplitter

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");
    }
}
Also used : JavaSdk(com.intellij.openapi.projectRoots.JavaSdk) Sdk(com.intellij.openapi.projectRoots.Sdk) JBSplitter(com.intellij.ui.JBSplitter) JdkConfigurable(com.intellij.openapi.roots.ui.configuration.projectRoot.JdkConfigurable)

Example 9 with JBSplitter

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();
}
Also used : JBSplitter(com.intellij.ui.JBSplitter)

Example 10 with JBSplitter

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();
}
Also used : JBSplitter(com.intellij.ui.JBSplitter)

Aggregations

JBSplitter (com.intellij.ui.JBSplitter)11 JBScrollPane (com.intellij.ui.components.JBScrollPane)2 NotNull (org.jetbrains.annotations.NotNull)2 VmStatsTreeTableModel (com.android.tools.idea.editors.vmtrace.treemodel.VmStatsTreeTableModel)1 EditorGutterComponentEx (com.intellij.openapi.editor.ex.EditorGutterComponentEx)1 EditorHeaderComponent (com.intellij.openapi.editor.impl.EditorHeaderComponent)1 Module (com.intellij.openapi.module.Module)1 Project (com.intellij.openapi.project.Project)1 JavaSdk (com.intellij.openapi.projectRoots.JavaSdk)1 Sdk (com.intellij.openapi.projectRoots.Sdk)1 ContentEntry (com.intellij.openapi.roots.ContentEntry)1 ModifiableRootModel (com.intellij.openapi.roots.ModifiableRootModel)1 ScrollablePanel (com.intellij.openapi.roots.ui.componentsList.components.ScrollablePanel)1 VerticalStackLayout (com.intellij.openapi.roots.ui.componentsList.layout.VerticalStackLayout)1 JdkConfigurable (com.intellij.openapi.roots.ui.configuration.projectRoot.JdkConfigurable)1 OnePixelSplitter (com.intellij.ui.OnePixelSplitter)1 CustomLineBorder (com.intellij.ui.border.CustomLineBorder)1 JBPanel (com.intellij.ui.components.JBPanel)1 NonOpaquePanel (com.intellij.ui.components.panels.NonOpaquePanel)1 ToolbarPanel (com.intellij.ui.roots.ToolbarPanel)1