Search in sources :

Example 6 with BorderLayoutPanel

use of com.intellij.util.ui.components.BorderLayoutPanel in project intellij-community by JetBrains.

the class XDebuggerEditorBase method decorate.

protected JPanel decorate(JComponent component, boolean multiline, boolean showEditor) {
    BorderLayoutPanel panel = JBUI.Panels.simplePanel();
    JPanel factoryPanel = JBUI.Panels.simplePanel();
    factoryPanel.add(myChooseFactory, multiline ? BorderLayout.NORTH : BorderLayout.CENTER);
    panel.add(factoryPanel, BorderLayout.WEST);
    if (!multiline && showEditor) {
        component = addMultilineButton(component);
    }
    panel.addToCenter(component);
    return panel;
}
Also used : BorderLayoutPanel(com.intellij.util.ui.components.BorderLayoutPanel)

Example 7 with BorderLayoutPanel

use of com.intellij.util.ui.components.BorderLayoutPanel in project intellij-community by JetBrains.

the class XDebuggerEditorBase method addChooser.

protected JComponent addChooser(JComponent component) {
    BorderLayoutPanel panel = JBUI.Panels.simplePanel(component);
    panel.setBackground(component.getBackground());
    panel.addToRight(myChooseFactory);
    return panel;
}
Also used : BorderLayoutPanel(com.intellij.util.ui.components.BorderLayoutPanel)

Example 8 with BorderLayoutPanel

use of com.intellij.util.ui.components.BorderLayoutPanel in project intellij-community by JetBrains.

the class GitRebaseUnstructuredEditor method createCenterPanel.

protected JComponent createCenterPanel() {
    BorderLayoutPanel rootPanel = JBUI.Panels.simplePanel(UIUtil.DEFAULT_HGAP, UIUtil.DEFAULT_VGAP);
    rootPanel.addToTop(myRootLabel);
    rootPanel.addToCenter(myTextEditor.getComponent());
    return rootPanel;
}
Also used : BorderLayoutPanel(com.intellij.util.ui.components.BorderLayoutPanel)

Example 9 with BorderLayoutPanel

use of com.intellij.util.ui.components.BorderLayoutPanel in project intellij-community by JetBrains.

the class IntersectingLocalChangesPanel method createPanel.

@NotNull
private BorderLayoutPanel createPanel(@NotNull JLabel label, @NotNull JTree tree) {
    BorderLayoutPanel panel = JBUI.Panels.simplePanel();
    panel.setBackground(UIUtil.getTextFieldBackground());
    panel.addToTop(label).addToCenter(tree);
    new EditSourceAction().registerCustomShortcutSet(CommonShortcuts.getEditSource(), panel);
    DataManager.registerDataProvider(panel, dataId -> {
        if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) {
            return getNavigatableArray(myProject, stream(tree.getSelectionPaths()).map(TreePath::getLastPathComponent).map(node -> (ChangesBrowserNode<?>) node).flatMap(ChangesBrowserNode::getFilePathsUnderStream).map(FilePath::getVirtualFile).filter(Objects::nonNull).distinct());
        }
        return null;
    });
    return panel;
}
Also used : UIUtil(com.intellij.util.ui.UIUtil) ToolWindowManager(com.intellij.openapi.wm.ToolWindowManager) MultiLineLabelUI(com.intellij.openapi.ui.MultiLineLabelUI) JBLabel(com.intellij.ui.components.JBLabel) UtilKt.stream(com.intellij.util.containers.UtilKt.stream) BorderLayoutPanel(com.intellij.util.ui.components.BorderLayoutPanel) JBUI(com.intellij.util.ui.JBUI) ToolWindowId(com.intellij.openapi.wm.ToolWindowId) ContentsUtil.addContent(com.intellij.util.ContentsUtil.addContent) EditSourceAction(com.intellij.ide.actions.EditSourceAction) Project(com.intellij.openapi.project.Project) CommonDataKeys(com.intellij.openapi.actionSystem.CommonDataKeys) DataManager(com.intellij.ide.DataManager) FilePath(com.intellij.openapi.vcs.FilePath) ChangesBrowserNode(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode) TreeUIHelper(com.intellij.ui.TreeUIHelper) ChangesUtil.getNavigatableArray(com.intellij.openapi.vcs.changes.ChangesUtil.getNavigatableArray) TreeModelBuilder(com.intellij.openapi.vcs.changes.ui.TreeModelBuilder) BooleanGetter(com.intellij.openapi.util.BooleanGetter) ToolWindow(com.intellij.openapi.wm.ToolWindow) TreePath(javax.swing.tree.TreePath) Content(com.intellij.ui.content.Content) java.awt(java.awt) Objects(java.util.Objects) ChangesBrowserNodeRenderer(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNodeRenderer) CommonShortcuts(com.intellij.openapi.actionSystem.CommonShortcuts) List(java.util.List) ContentFactory(com.intellij.ui.content.ContentFactory) SimpleTree(com.intellij.ui.treeStructure.SimpleTree) NotNull(org.jetbrains.annotations.NotNull) javax.swing(javax.swing) TreePath(javax.swing.tree.TreePath) Objects(java.util.Objects) ChangesBrowserNode(com.intellij.openapi.vcs.changes.ui.ChangesBrowserNode) EditSourceAction(com.intellij.ide.actions.EditSourceAction) BorderLayoutPanel(com.intellij.util.ui.components.BorderLayoutPanel) NotNull(org.jetbrains.annotations.NotNull)

Example 10 with BorderLayoutPanel

use of com.intellij.util.ui.components.BorderLayoutPanel in project intellij-plugins by StepicOrg.

the class StudyToolWindow method createToolbarPanel.

private JPanel createToolbarPanel(ActionGroup group) {
    final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar("Study", group, true);
    BorderLayoutPanel toolBar = JBUI.Panels.simplePanel(actionToolBar.getComponent());
    toolBar.addToRight(rightPanel);
    return toolBar;
}
Also used : ActionToolbar(com.intellij.openapi.actionSystem.ActionToolbar) BorderLayoutPanel(com.intellij.util.ui.components.BorderLayoutPanel)

Aggregations

BorderLayoutPanel (com.intellij.util.ui.components.BorderLayoutPanel)10 JBUI (com.intellij.util.ui.JBUI)3 List (java.util.List)3 javax.swing (javax.swing)3 NotNull (org.jetbrains.annotations.NotNull)3 AllIcons (com.intellij.icons.AllIcons)2 DumbAwareAction (com.intellij.openapi.project.DumbAwareAction)2 Project (com.intellij.openapi.project.Project)2 MultiLineLabelUI (com.intellij.openapi.ui.MultiLineLabelUI)2 com.intellij.ui (com.intellij.ui)2 KeyEvent (java.awt.event.KeyEvent)2 DebuggerBundle (com.intellij.debugger.DebuggerBundle)1 JVMNameUtil (com.intellij.debugger.engine.JVMNameUtil)1 DecompiledLocalVariable (com.intellij.debugger.jdi.DecompiledLocalVariable)1 JavaDebuggerSupport (com.intellij.debugger.ui.JavaDebuggerSupport)1 DataManager (com.intellij.ide.DataManager)1 EditSourceAction (com.intellij.ide.actions.EditSourceAction)1 com.intellij.openapi.actionSystem (com.intellij.openapi.actionSystem)1 ActionToolbar (com.intellij.openapi.actionSystem.ActionToolbar)1 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)1