类 DecoratableIcon

  • 所有已实现的接口:
    javax.swing.Icon

    public class DecoratableIcon
    extends java.lang.Object
    implements javax.swing.Icon
    An icon that can have an optional "decorations" icon beside of it.
    版本:
    1.0
    作者:
    Robert Futrell
    • 构造器概要

      构造器 
      构造器 说明
      DecoratableIcon​(int width, javax.swing.Icon mainIcon)
      Constructor.
      DecoratableIcon​(javax.swing.Icon mainIcon)
      Constructor.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void addDecorationIcon​(javax.swing.Icon decoration)
      Adds a decoration icon.
      int getIconHeight()
      int getIconWidth()
      void paintIcon​(java.awt.Component c, java.awt.Graphics g, int x, int y)
      void setDeprecated​(boolean deprecated)
      Sets whether this icon is for a deprecated item.
      void setMainIcon​(javax.swing.Icon icon)
      Sets the main icon.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • DecoratableIcon

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

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

      • addDecorationIcon

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

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

        public int getIconWidth()
        指定者:
        getIconWidth 在接口中 javax.swing.Icon
      • paintIcon

        public void paintIcon​(java.awt.Component c,
                              java.awt.Graphics g,
                              int x,
                              int y)
        指定者:
        paintIcon 在接口中 javax.swing.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​(javax.swing.Icon icon)
        Sets the main icon.
        参数:
        icon - The "main" icon. This cannot be null.
        另请参阅:
        addDecorationIcon(Icon)