Java Code Examples for com.intellij.ui.JBColor#namedColor()

The following examples show how to use com.intellij.ui.JBColor#namedColor() . 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: DarculaButtonPainter.java    From consulo with Apache License 2.0 6 votes vote down vote up
public Paint getBorderPaint(Component button) {
  AbstractButton b = (AbstractButton)button;
  Color borderColor = (Color)b.getClientProperty("JButton.borderColor");
  Rectangle r = new Rectangle(b.getSize());
  JBInsets.removeFrom(r, b.getInsets());
  boolean defButton = isDefaultButton(b);

  if (button.isEnabled()) {
    if (borderColor != null) {
      return borderColor;
    }
    else {
      return button.hasFocus()
             ? JBColor.namedColor(defButton ? "Button.default.focusedBorderColor" : "Button.focusedBorderColor",
                                  JBColor.namedColor(defButton ? "Button.darcula.defaultFocusedOutlineColor" : "Button.darcula.focusedOutlineColor", 0x87afda))
             : new GradientPaint(0, 0, JBColor.namedColor(defButton ? "Button.default.startBorderColor" : "Button.startBorderColor",
                                                          JBColor.namedColor(defButton ? "Button.darcula.outlineDefaultStartColor" : "Button.darcula.outlineStartColor", 0xbfbfbf)), 0, r.height,
                                 JBColor.namedColor(defButton ? "Button.default.endBorderColor" : "Button.endBorderColor",
                                                    JBColor.namedColor(defButton ? "Button.darcula.outlineDefaultEndColor" : "Button.darcula.outlineEndColor", 0xb8b8b8)));
    }
  }
  else {
    return JBColor.namedColor("Button.disabledBorderColor", JBColor.namedColor("Button.darcula.disabledOutlineColor", 0xcfcfcf));
  }
}
 
Example 2
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color bordersColor() {
  return JBColor.namedColor("TextField.borderColor", JBColor.namedColor("Component.borderColor", new JBColor(0xbdbdbd, 0x646464)));
}
 
Example 3
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
public static Color separatorTextColor() {
  return JBColor.namedColor("Popup.separatorForeground", Color.gray);
}
 
Example 4
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color hoverBorder() {
  return JBColor.namedColor("ActionButton.hoverBorderColor", Gray.xDF);
}
 
Example 5
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color hoverBackground() {
  return JBColor.namedColor("ActionButton.hoverBackground", Gray.xDF);
}
 
Example 6
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color titlePaneButtonHoverBackground() {
  return JBColor.namedColor("TitlePane.Button.hoverBackground", new JBColor(ColorUtil.withAlpha(Color.BLACK, .1), ColorUtil.withAlpha(Color.WHITE, .1)));
}
 
Example 7
Source File: DarculaButtonUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
protected Color getButtonColorStart() {
  return JBColor.namedColor("Button.startBackground", JBColor.namedColor("Button.darcula.startColor", 0x555a5c));
}
 
Example 8
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color searchFieldGrayForeground() {
  return JBColor.namedColor("SearchEverywhere.SearchField.infoForeground", JBColor.GRAY);
}
 
Example 9
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color defaultButtonColor() {
  return UIUtil.isUnderDarcula() ? JBColor.namedColor("Button.default.focusColor", JBColor.namedColor("Focus.defaultButtonBorderColor", 0x97c3f3)) : focusColor();
}
 
Example 10
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color headerBackground() {
  return JBColor.namedColor("SearchEverywhere.Header.background", 0xf2f2f2);
}
 
Example 11
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color titlePaneInactiveBackground() {
  return JBColor.namedColor("TitlePane.inactiveBackground", titlePaneBackground());
}
 
Example 12
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color linkVisitedColor() {
  return JBColor.namedColor("Link.visitedForeground", JBColor.namedColor("link.visited.foreground", new JBColor(0x800080, 0x9776a9)));
}
 
Example 13
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color searchFieldBackground() {
  return JBColor.namedColor("NewClass.SearchField.background", 0xffffff);
}
 
Example 14
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color linkPressedColor() {
  return JBColor.namedColor("Link.pressedForeground", JBColor.namedColor("link.pressed.foreground", new JBColor(0xf00000, 0xba6f25)));
}
 
Example 15
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color warningBorderColor() {
  return JBColor.namedColor("ValidationTooltip.warningBorderColor", 0xE0CEA8);
}
 
Example 16
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color errorBackgroundColor() {
  return JBColor.namedColor("ValidationTooltip.errorBackground", JBColor.namedColor("ValidationTooltip.errorBackgroundColor", 0xF5E6E7));
}
 
Example 17
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color paneBackground() {
  return JBColor.namedColor("Panel.background", Gray.xCD);
}
 
Example 18
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color backgroundColor(boolean enabled, boolean editable) {
  return enabled ? editable
                   ? JBColor.namedColor("ComboBox.ArrowButton.background", JBColor.namedColor("ComboBox.darcula.editable.arrowButtonBackground", Gray.xFC))
                   : JBColor.namedColor("ComboBox.ArrowButton.nonEditableBackground", JBColor.namedColor("ComboBox.darcula.arrowButtonBackground", Gray.xFC)) : UIUtil.getPanelBackground();
}
 
Example 19
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color selectedTabTextColor() {
  return JBColor.namedColor("SearchEverywhere.Tab.selectedForeground", 0x000000);
}
 
Example 20
Source File: JBUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Color borderColor() {
  return JBColor.namedColor("Popup.Advertiser.borderColor", Gray._135);
}