类 DecoratableIcon

  • 所有已实现的接口:
    Icon

    public class DecoratableIcon
    extends Object
    implements Icon
    An icon that can have an optional "decorations" icon beside of it.
    版本:
    1.0
    作者:
    Robert Futrell
    • 构造器详细资料

      • DecoratableIcon

        public DecoratableIcon​(Icon mainIcon)
        Constructor.
        参数:
        mainIcon - The "main" icon. This cannot be null.
      • DecoratableIcon

        public DecoratableIcon​(int width,
                               Icon mainIcon)
        Constructor.
        参数:
        width - The width for this icon.
        mainIcon - The "main" icon. This cannot be null.
    • 方法详细资料

      • addDecorationIcon

        public void addDecorationIcon​(Icon decoration)
        Adds a decoration icon.
        参数:
        decoration - A new decoration icon. This cannot be null.
        另请参阅:
        setMainIcon(Icon)
      • getIconHeight

        public int getIconHeight()
        指定者:
        getIconHeight 在接口中 Icon
      • getIconWidth

        public int getIconWidth()
        指定者:
        getIconWidth 在接口中 Icon
      • setDeprecated

        public void setDeprecated​(boolean deprecated)
        Sets whether this icon is for a deprecated item.
        参数:
        deprecated - Whether this icon is for a deprecated item.
      • setMainIcon

        public void setMainIcon​(Icon icon)
        Sets the main icon.
        参数:
        icon - The "main" icon. This cannot be null.
        另请参阅:
        addDecorationIcon(Icon)