Class LabelIcon

  • All Implemented Interfaces:
    javax.swing.Icon

    public class LabelIcon
    extends java.lang.Object
    implements javax.swing.Icon
    An icon that draws text.
    Since:
    3.0
    Author:
    Chris Jennings
    • Constructor Detail

      • LabelIcon

        public LabelIcon()
      • LabelIcon

        public LabelIcon​(java.lang.String text)
    • Method Detail

      • setText

        public void setText​(java.lang.String text)
      • getText

        public java.lang.String getText​(java.lang.String text)
      • setForeground

        public void setForeground​(java.awt.Color fg)
      • getForeground

        public java.awt.Color getForeground()
      • setBackground

        public void setBackground​(java.awt.Color bg)
      • getBackground

        public java.awt.Color getBackground()
      • setOpaque

        public void setOpaque​(boolean opaque)
      • isOpaque

        public boolean isOpaque()
      • setEnabled

        public void setEnabled​(boolean enabled)
      • isEnabled

        public boolean isEnabled()
      • setIcon

        public void setIcon​(javax.swing.Icon i)
      • getIcon

        public javax.swing.Icon getIcon()
      • setIconWidth

        public void setIconWidth​(int width)
      • setIconHeight

        public void setIconHeight​(int height)
      • getIconHeight

        public int getIconHeight()
        Specified by:
        getIconHeight in interface javax.swing.Icon
      • getIconWidth

        public int getIconWidth()
        Specified by:
        getIconWidth in interface javax.swing.Icon
      • pack

        public void pack()
      • paintIcon

        public void paintIcon​(java.awt.Component c,
                              java.awt.Graphics g,
                              int x,
                              int y)
        Specified by:
        paintIcon in interface javax.swing.Icon