Java Code Examples for com.intellij.ui.JBColor#BLACK
The following examples show how to use
com.intellij.ui.JBColor#BLACK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FilterDropDown.java From azure-devops-intellij with MIT License | 6 votes |
protected void enableDropDown(final boolean isTeamServicesRepository) { final JBColor color; if (isTeamServicesRepository) { addListeners(); color = JBColor.BLACK; } else { removeListeners(); color = JBColor.GRAY; } // update color on UI thread IdeaHelper.runOnUIThread(new Runnable() { @Override public void run() { pickerLabel.setForeground(color); } }); isEnabled = isTeamServicesRepository; }
Example 2
Source File: ProfilerPanel.java From intellij-plugin-v4 with BSD 3-Clause "New" or "Revised" License | 6 votes |
public Token addDecisionEventHighlighter(PreviewState previewState, MarkupModel markupModel, DecisionEventInfo info, Color errorStripeColor, EffectType effectType) { TokenStream tokens = previewState.parsingResult.parser.getInputStream(); Token startToken = tokens.get(info.startIndex); Token stopToken = tokens.get(info.stopIndex); TextAttributes textAttributes = new TextAttributes(JBColor.BLACK, JBColor.WHITE, errorStripeColor, effectType, Font.PLAIN); textAttributes.setErrorStripeColor(errorStripeColor); final RangeHighlighter rangeHighlighter = markupModel.addRangeHighlighter( startToken.getStartIndex(), stopToken.getStopIndex()+1, HighlighterLayer.ADDITIONAL_SYNTAX, textAttributes, HighlighterTargetArea.EXACT_RANGE); rangeHighlighter.putUserData(DECISION_EVENT_INFO_KEY, info); rangeHighlighter.setErrorStripeMarkColor(errorStripeColor); return startToken; }
Example 3
Source File: LineParser.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static Object toStyle(String str) { switch (str) { case "1": return SimpleTextAttributes.STYLE_BOLD; case "3": return SimpleTextAttributes.STYLE_ITALIC; case "4": return SimpleTextAttributes.STYLE_UNDERLINE; case "9": return SimpleTextAttributes.STYLE_STRIKEOUT; case "30": return JBColor.BLACK; case "31": return JBColor.RED; case "32": return JBColor.GREEN; case "33": return JBColor.YELLOW; case "34": return JBColor.BLUE; case "35": return JBColor.MAGENTA; case "36": return JBColor.CYAN; case "37": return JBColor.WHITE; case "38": return JBColor.GRAY; default: return null; } }
Example 4
Source File: LineParser.java From flutter-intellij with BSD 3-Clause "New" or "Revised" License | 5 votes |
private static Object toStyle(String str) { switch (str) { case "1": return SimpleTextAttributes.STYLE_BOLD; case "3": return SimpleTextAttributes.STYLE_ITALIC; case "4": return SimpleTextAttributes.STYLE_UNDERLINE; case "9": return SimpleTextAttributes.STYLE_STRIKEOUT; case "30": return JBColor.BLACK; case "31": return JBColor.RED; case "32": return JBColor.GREEN; case "33": return JBColor.YELLOW; case "34": return JBColor.BLUE; case "35": return JBColor.MAGENTA; case "36": return JBColor.CYAN; case "37": return JBColor.WHITE; case "38": return JBColor.GRAY; default: return null; } }
Example 5
Source File: DesktopEditorComposite.java From consulo with Apache License 2.0 | 5 votes |
@Nonnull private static SideBorder createTopBottomSideBorder(boolean top) { return new SideBorder(null, top ? SideBorder.BOTTOM : SideBorder.TOP) { @Override public Color getLineColor() { Color result = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.TEARLINE_COLOR); return result == null ? JBColor.BLACK : result; } }; }
Example 6
Source File: TestVisualization.java From jetbrains-plugin-graph-database-support with Apache License 2.0 | 4 votes |
private static LookAndFeelService mockLook() { return new LookAndFeelService() { @Override public Color getBackgroundColor() { return JBColor.BLACK; } @Override public Color getBorderColor() { return JBColor.RED; } @Override public Color getNodeStrokeColor() { return JBColor.GREEN; } @Override public Color getNodeStrokeHoverColor() { return JBColor.ORANGE; } @Override public Color getNodeFillColor() { return JBColor.CYAN; } @Override public Color getNodeFillHoverColor() { return JBColor.DARK_GRAY; } @Override public Color getEdgeStrokeColor() { return JBColor.LIGHT_GRAY; } @Override public Color getEdgeFillColor() { return JBColor.MAGENTA; } @Override public Color getTextColor() { return JBColor.WHITE; } @Override public boolean isGraphViewZoomInverted() { return true; } }; }
Example 7
Source File: DependencyViewer.java From gradle-view with Apache License 2.0 | 4 votes |
public DependencyViewer(Project p, ToolWindow t) { super(true, true); this.project = p; this.toolWindow = t; this.splitter = new Splitter(false, 0.75f); this.information = new JTextArea(); this.toolingLogger = initToolingLogger(); this.dependencyCellRenderer = new DependencyCellRenderer(); this.dependencyCellRenderer.omittedSelected = JBColor.MAGENTA; this.dependencyCellRenderer.omittedUnselected = JBColor.GRAY; this.dependencyCellRenderer.normalSelected = JBColor.foreground(); this.dependencyCellRenderer.normalUnselected = JBColor.BLACK; this.information.setEditable(false); this.shouldPromptForCurrentProject = true; // TODO clean all of this up GradleService gradleService = ServiceManager.getService(project, GradleService.class); gradleService.addListener(new ViewActionListener() { @Override public void refresh() { // prompt only on first use of tool panel if (shouldPromptForCurrentProject) { // ask to initialize view for this project to the current project if (useCurrentProjectBuild()) { gradleBaseDir = project.getBasePath(); } shouldPromptForCurrentProject = false; } // there's nothing to do when there is no gradleBaseDir set, instead issue a prompt if(gradleBaseDir == null) { promptForGradleBaseDir(); } // initialize an empty view even if the gradleBaseDir is set while we load everything in the background updateView(null, null); new SwingWorker<GradleNode, Void>() { protected GradleNode doInBackground() throws Exception { try { Map<String, GradleNode> dependencyMap = loadProjectDependenciesFromModel(gradleBaseDir, toolingLogger); GradleNode rootDependency = dependencyMap.get("root"); GradleNode target = dependencyCellRenderer.selectedGradleNode; GradleNode selectedDependency; if(target != null && target.group != null) { selectedDependency = target; } else { selectedDependency = new GradleNode("No dependency selected"); } updateView(rootDependency, selectedDependency); return rootDependency; } catch(Exception e) { e.printStackTrace(); toolingLogger.log(ExceptionUtils.getFullStackTrace(e)); throw new RuntimeException(e); } } }.execute(); } @Override public void toggleShowReplaced() { dependencyCellRenderer.showReplaced = !dependencyCellRenderer.showReplaced; SwingUtilities.invokeLater(new Runnable() { @Override public void run() { splitter.repaint(); splitter.validate(); } }); } @Override public void reset() { gradleBaseDir = null; refresh(); } }); gradleService.refresh(); setContent(splitter); final ActionManager actionManager = ActionManager.getInstance(); ActionToolbar actionToolbar = actionManager.createActionToolbar("Gradle View Toolbar", (DefaultActionGroup)actionManager.getAction("GradleView.NavigatorActionsToolbar"), true); actionToolbar.setTargetComponent(splitter); setToolbar(actionToolbar.getComponent()); }