Java Code Examples for com.intellij.util.ui.UIUtil#getLabelForeground()

The following examples show how to use com.intellij.util.ui.UIUtil#getLabelForeground() . 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: RunAnythingPopupUI.java    From consulo with Apache License 2.0 6 votes vote down vote up
@Override
@Nonnull
public JPanel createTopLeftPanel() {
  myTextFieldTitle = new JLabel(IdeBundle.message("run.anything.run.anything.title"));
  JPanel topPanel = new NonOpaquePanel(new BorderLayout());
  Color foregroundColor = UIUtil.getLabelForeground();


  myTextFieldTitle.setForeground(foregroundColor);
  myTextFieldTitle.setBorder(BorderFactory.createEmptyBorder(3, 5, 5, 0));
  if (SystemInfo.isMac) {
    myTextFieldTitle.setFont(myTextFieldTitle.getFont().deriveFont(Font.BOLD, myTextFieldTitle.getFont().getSize() - 1f));
  }
  else {
    myTextFieldTitle.setFont(myTextFieldTitle.getFont().deriveFont(Font.BOLD));
  }

  topPanel.add(myTextFieldTitle);

  return topPanel;
}
 
Example 2
Source File: FileEditorManagerImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
/**
 * @return color of the {@code file} which corresponds to the
 * file's status
 */
public Color getFileColor(@Nonnull final VirtualFile file) {
  final FileStatusManager fileStatusManager = FileStatusManager.getInstance(myProject);
  Color statusColor = fileStatusManager != null ? fileStatusManager.getStatus(file).getColor() : UIUtil.getLabelForeground();
  if (statusColor == null) statusColor = UIUtil.getLabelForeground();
  return statusColor;
}
 
Example 3
Source File: ContentTabLabel.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
protected Color getActiveFg(boolean selected) {
  if (contentManager().getContentCount() > 1) {
    return selected ? JBColor.white : UIUtil.isUnderDarcula() ? UIUtil.getLabelForeground() : JBColor.black;
  }

  return super.getActiveFg(selected);
}
 
Example 4
Source File: JBColor.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static Color foreground() {
  return new JBColor(new NotNullProducer<Color>() {
    @Nonnull
    @Override
    public Color produce() {
      return UIUtil.getLabelForeground();
    }
  });
}
 
Example 5
Source File: SearchReplaceComponent.java    From consulo with Apache License 2.0 4 votes vote down vote up
public void setRegularBackground() {
  mySearchTextComponent.setBackground(UIUtil.getTextFieldBackground());
  myStatusColor = UIUtil.getLabelForeground();
}
 
Example 6
Source File: TitlePanel.java    From consulo with Apache License 2.0 4 votes vote down vote up
public void setActive(final boolean active) {
  super.setActive(active);
  myLabel.setIcon(active ? myRegular : myInactive);
  final Color foreground = UIUtil.getLabelForeground();
  myLabel.setForeground(active ? foreground : Color.gray);
}
 
Example 7
Source File: IntelliJEditorTabsUI.java    From consulo with Apache License 2.0 4 votes vote down vote up
protected Color getForeground() {
  return UIUtil.getLabelForeground();
}