Search in sources :

Example 1 with ColoredSideBorder

use of com.intellij.ui.ColoredSideBorder in project intellij-community by JetBrains.

the class IdeaLaf method initIdeaDefaults.

@SuppressWarnings({ "HardCodedStringLiteral" })
static void initIdeaDefaults(UIDefaults defaults) {
    defaults.put("Menu.maxGutterIconWidth", 18);
    defaults.put("MenuItem.maxGutterIconWidth", 18);
    // TODO[vova,anton] REMOVE!!! INVESTIGATE??? Borland???
    defaults.put("MenuItem.acceleratorDelimiter", "-");
    defaults.put("TitledBorder.titleColor", IdeaBlueMetalTheme.primary1);
    ColorUIResource col = new ColorUIResource(230, 230, 230);
    defaults.put("ScrollBar.background", col);
    defaults.put("ScrollBar.track", col);
    //Border scrollPaneBorder = new BorderUIResource(new BegBorders.ScrollPaneBorder());
    //defaults.put("ScrollPane.border", scrollPaneBorder);
    defaults.put("TextField.border", BegBorders.getTextFieldBorder());
    defaults.put("PasswordField.border", BegBorders.getTextFieldBorder());
    Border popupMenuBorder = new BegPopupMenuBorder();
    defaults.put("PopupMenu.border", popupMenuBorder);
    defaults.put("ScrollPane.border", BegBorders.getScrollPaneBorder());
    defaults.put("ButtonUI", BegButtonUI.class.getName());
    defaults.put("ToggleButtonUI", BegToggleButtonUI.class.getName());
    defaults.put("ComboBoxUI", BegComboBoxUI.class.getName());
    defaults.put("RadioButtonUI", BegRadioButtonUI.class.getName());
    defaults.put("CheckBoxUI", BegCheckBoxUI.class.getName());
    defaults.put("TabbedPaneUI", BegTabbedPaneUI.class.getName());
    defaults.put("TableUI", BegTableUI.class.getName());
    defaults.put("TreeUI", BegTreeUI.class.getName());
    //defaults.put("ScrollPaneUI", BegScrollPaneUI.class.getName());
    defaults.put("TabbedPane.tabInsets", new Insets(0, 4, 0, 4));
    defaults.put("ToolTip.background", TOOLTIP_BACKGROUND_COLOR);
    defaults.put("ToolTip.border", new ColoredSideBorder(Color.gray, Color.gray, Color.black, Color.black, 1));
    defaults.put("Tree.ancestorInputMap", null);
    defaults.put("FileView.directoryIcon", AllIcons.Nodes.Folder);
    defaults.put("FileChooser.upFolderIcon", AllIcons.Nodes.UpFolder);
    defaults.put("FileChooser.newFolderIcon", AllIcons.Nodes.NewFolder);
    defaults.put("FileChooser.homeFolderIcon", AllIcons.Nodes.HomeFolder);
    defaults.put("OptionPane.errorIcon", AllIcons.General.ErrorDialog);
    defaults.put("OptionPane.informationIcon", AllIcons.General.InformationDialog);
    defaults.put("OptionPane.warningIcon", AllIcons.General.WarningDialog);
    defaults.put("OptionPane.questionIcon", AllIcons.General.QuestionDialog);
    defaults.put("Tree.openIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class, "icons/TreeOpen.gif"));
    defaults.put("Tree.closedIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class, "icons/TreeClosed.gif"));
    defaults.put("Tree.leafIcon", LookAndFeel.makeIcon(WindowsLookAndFeel.class, "icons/TreeLeaf.gif"));
    defaults.put("Tree.expandedIcon", WindowsTreeUI.ExpandedIcon.createExpandedIcon());
    defaults.put("Tree.collapsedIcon", WindowsTreeUI.CollapsedIcon.createCollapsedIcon());
    defaults.put("Table.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[] { "ctrl C", "copy", "ctrl V", "paste", "ctrl X", "cut", "COPY", "copy", "PASTE", "paste", "CUT", "cut", "control INSERT", "copy", "shift INSERT", "paste", "shift DELETE", "cut", "RIGHT", "selectNextColumn", "KP_RIGHT", "selectNextColumn", "LEFT", "selectPreviousColumn", "KP_LEFT", "selectPreviousColumn", "DOWN", "selectNextRow", "KP_DOWN", "selectNextRow", "UP", "selectPreviousRow", "KP_UP", "selectPreviousRow", "shift RIGHT", "selectNextColumnExtendSelection", "shift KP_RIGHT", "selectNextColumnExtendSelection", "shift LEFT", "selectPreviousColumnExtendSelection", "shift KP_LEFT", "selectPreviousColumnExtendSelection", "shift DOWN", "selectNextRowExtendSelection", "shift KP_DOWN", "selectNextRowExtendSelection", "shift UP", "selectPreviousRowExtendSelection", "shift KP_UP", "selectPreviousRowExtendSelection", "PAGE_UP", "scrollUpChangeSelection", "PAGE_DOWN", "scrollDownChangeSelection", "HOME", "selectFirstColumn", "END", "selectLastColumn", "shift PAGE_UP", "scrollUpExtendSelection", "shift PAGE_DOWN", "scrollDownExtendSelection", "shift HOME", "selectFirstColumnExtendSelection", "shift END", "selectLastColumnExtendSelection", "ctrl PAGE_UP", "scrollLeftChangeSelection", "ctrl PAGE_DOWN", "scrollRightChangeSelection", "ctrl HOME", "selectFirstRow", "ctrl END", "selectLastRow", "ctrl shift PAGE_UP", "scrollRightExtendSelection", "ctrl shift PAGE_DOWN", "scrollLeftExtendSelection", "ctrl shift HOME", "selectFirstRowExtendSelection", "ctrl shift END", "selectLastRowExtendSelection", "TAB", "selectNextColumnCell", "shift TAB", "selectPreviousColumnCell", //"ENTER", "selectNextRowCell",
    "shift ENTER", "selectPreviousRowCell", "ctrl A", "selectAll", //"ESCAPE", "cancel",
    "F2", "startEditing" }));
}
Also used : ColorUIResource(javax.swing.plaf.ColorUIResource) WindowsLookAndFeel(com.sun.java.swing.plaf.windows.WindowsLookAndFeel) ColoredSideBorder(com.intellij.ui.ColoredSideBorder) Border(javax.swing.border.Border) ColoredSideBorder(com.intellij.ui.ColoredSideBorder)

Example 2 with ColoredSideBorder

use of com.intellij.ui.ColoredSideBorder in project intellij-community by JetBrains.

the class CoverageLineMarkerRenderer method createActionsToolbar.

protected JComponent createActionsToolbar(final Editor editor, final int lineNumber) {
    final JComponent editorComponent = editor.getComponent();
    final DefaultActionGroup group = new DefaultActionGroup();
    final GotoPreviousCoveredLineAction prevAction = new GotoPreviousCoveredLineAction(editor, lineNumber);
    final GotoNextCoveredLineAction nextAction = new GotoNextCoveredLineAction(editor, lineNumber);
    group.add(prevAction);
    group.add(nextAction);
    prevAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_UP, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK)), editorComponent);
    nextAction.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK)), editorComponent);
    final LineData lineData = getLineData(lineNumber);
    if (myCoverageByTestApplicable) {
        group.add(new ShowCoveringTestsAction(myClassName, lineData));
    }
    final AnAction byteCodeViewAction = ActionManager.getInstance().getAction("ByteCodeViewer");
    if (byteCodeViewAction != null) {
        group.add(byteCodeViewAction);
    }
    group.add(new EditCoverageColorsAction(editor, lineNumber));
    group.add(new HideCoverageInfoAction());
    final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.FILEHISTORY_VIEW_TOOLBAR, group, true);
    final JComponent toolbarComponent = toolbar.getComponent();
    final Color background = ((EditorEx) editor).getBackgroundColor();
    final Color foreground = editor.getColorsScheme().getColor(EditorColors.CARET_COLOR);
    toolbarComponent.setBackground(background);
    toolbarComponent.setBorder(new ColoredSideBorder(foreground, foreground, lineData == null || lineData.getStatus() == LineCoverage.NONE || mySubCoverageActive ? foreground : null, foreground, 1));
    toolbar.updateActionsImmediately();
    return toolbarComponent;
}
Also used : EditorEx(com.intellij.openapi.editor.ex.EditorEx) ShowCoveringTestsAction(com.intellij.coverage.actions.ShowCoveringTestsAction) HideCoverageInfoAction(com.intellij.coverage.actions.HideCoverageInfoAction) LineData(com.intellij.rt.coverage.data.LineData) ColoredSideBorder(com.intellij.ui.ColoredSideBorder)

Aggregations

ColoredSideBorder (com.intellij.ui.ColoredSideBorder)2 HideCoverageInfoAction (com.intellij.coverage.actions.HideCoverageInfoAction)1 ShowCoveringTestsAction (com.intellij.coverage.actions.ShowCoveringTestsAction)1 EditorEx (com.intellij.openapi.editor.ex.EditorEx)1 LineData (com.intellij.rt.coverage.data.LineData)1 WindowsLookAndFeel (com.sun.java.swing.plaf.windows.WindowsLookAndFeel)1 Border (javax.swing.border.Border)1 ColorUIResource (javax.swing.plaf.ColorUIResource)1