Java 类com.intellij.util.ui.WatermarkIcon 实例源码

项目:intellij-ce-playground    文件:BaseLabel.java   
protected void updateTextAndIcon(Content content, boolean isSelected) {
  if (content == null) {
    setText(null);
    setIcon(null);
  }
  else {
    setText(content.getDisplayName());
    setActiveFg(getActiveFg(isSelected));
    setPassiveFg(getPassiveFg(isSelected));

    setToolTipText(content.getDescription());

    final boolean show = Boolean.TRUE.equals(content.getUserData(ToolWindow.SHOW_CONTENT_ICON));
    if (show) {
      if (isSelected) {
        setIcon(content.getIcon());
      }
      else {
        setIcon(content.getIcon() != null ? new WatermarkIcon(content.getIcon(), .5f) : null);
      }
    }
    else {
      setIcon(null);
    }

    myBold = false; //isSelected;
  }
}
项目:tools-idea    文件:BaseLabel.java   
protected void updateTextAndIcon(Content content, boolean isSelected) {
  if (content == null) {
    setText(null);
    setIcon(null);
  }
  else {
    setText(content.getDisplayName());
    setActiveFg(getActiveFg(isSelected));
    setPassiveFg(getPassiveFg(isSelected));

    setToolTipText(content.getDescription());

    final boolean show = Boolean.TRUE.equals(content.getUserData(ToolWindow.SHOW_CONTENT_ICON));
    if (show) {
      if (isSelected) {
        setIcon(content.getIcon());
      }
      else {
        setIcon(content.getIcon() != null ? new WatermarkIcon(content.getIcon(), .5f) : null);
      }
    }
    else {
      setIcon(null);
    }

    myBold = false; //isSelected;
  }
}
项目:consulo    文件:BaseLabel.java   
protected void updateTextAndIcon(Content content, boolean isSelected) {
  if (content == null) {
    setText(null);
    setIcon(null);
  }
  else {
    setText(content.getDisplayName());
    setActiveFg(getActiveFg(isSelected));
    setPassiveFg(getPassiveFg(isSelected));

    setToolTipText(content.getDescription());

    final boolean show = Boolean.TRUE.equals(content.getUserData(ToolWindow.SHOW_CONTENT_ICON));
    if (show) {
      if (isSelected) {
        setIcon(content.getIcon());
      }
      else {
        setIcon(content.getIcon() != null ? new WatermarkIcon(content.getIcon(), .5f) : null);
      }
    }
    else {
      setIcon(null);
    }

    myBold = false; //isSelected;
  }
}