Class RMIconUtils.LabelIcon

  • All Implemented Interfaces:
    javax.swing.Icon
    Enclosing class:
    RMIconUtils

    public static class RMIconUtils.LabelIcon
    extends java.lang.Object
    implements javax.swing.Icon
    An icon implementation that uses a JLabel.
    • Constructor Summary

      Constructors 
      Constructor Description
      LabelIcon​(java.lang.String aString, java.awt.Font aFont, javax.swing.Icon anIcon)
      Creates a new label icon.
      LabelIcon​(javax.swing.AbstractButton aButton)
      Creates a label icon for a button.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIconHeight()
      Returns the height of icon1.
      int getIconWidth()
      Returns the width of icon1.
      javax.swing.JLabel getLabel()
      Returns the JLabel.
      void paintIcon​(java.awt.Component aComponent, java.awt.Graphics aGraphics, int x, int y)
      Paints the icons.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LabelIcon

        public LabelIcon​(java.lang.String aString,
                         java.awt.Font aFont,
                         javax.swing.Icon anIcon)
        Creates a new label icon.
      • LabelIcon

        public LabelIcon​(javax.swing.AbstractButton aButton)
        Creates a label icon for a button.
    • Method Detail

      • getLabel

        public javax.swing.JLabel getLabel()
        Returns the JLabel.
      • getIconWidth

        public int getIconWidth()
        Returns the width of icon1.
        Specified by:
        getIconWidth in interface javax.swing.Icon
      • getIconHeight

        public int getIconHeight()
        Returns the height of icon1.
        Specified by:
        getIconHeight in interface javax.swing.Icon
      • paintIcon

        public void paintIcon​(java.awt.Component aComponent,
                              java.awt.Graphics aGraphics,
                              int x,
                              int y)
        Paints the icons.
        Specified by:
        paintIcon in interface javax.swing.Icon