Java Code Examples for com.intellij.ui.SimpleTextAttributes#SIMPLE_CELL_ATTRIBUTES

The following examples show how to use com.intellij.ui.SimpleTextAttributes#SIMPLE_CELL_ATTRIBUTES . 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: XBreakpointItem.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void setupGenericRenderer(SimpleColoredComponent renderer, boolean plainView) {
  if (plainView) {
    renderer.setIcon(getIcon());
  }
  final SimpleTextAttributes attributes = myBreakpoint.isEnabled() ? SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES : SimpleTextAttributes.GRAYED_ATTRIBUTES;
  renderer.append(StringUtil.notNullize(getDisplayText()), attributes);
  String description = getUserDescription();
  if (!StringUtil.isEmpty(description)) {
    renderer.append(" (" + description + ")", SimpleTextAttributes.REGULAR_ITALIC_ATTRIBUTES);
  }
}
 
Example 2
Source File: OrderEntryAppearanceServiceImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
private static SimpleTextAttributes getTextAttributes(final boolean valid, final boolean selected) {
  if (!valid) {
    return SimpleTextAttributes.ERROR_ATTRIBUTES;
  }
  else {
    return SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES;
  }
}
 
Example 3
Source File: GroupTreeNode.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public SimpleTextAttributes getAttributes() {
  return myFilterAttributes == null ? SimpleTextAttributes.SIMPLE_CELL_ATTRIBUTES : myFilterAttributes;
}