Class TranslateIcon

java.lang.Object
resources.icons.TranslateIcon
All Implemented Interfaces:
Icon
Direct Known Subclasses:
CenterTranslateIcon

public class TranslateIcon extends Object implements Icon
  • Constructor Details

    • TranslateIcon

      public TranslateIcon(Icon icon, int translateX, int translateY)
      Where the translate values are offset from the icon's upper corner
      Parameters:
      icon - the icon
      translateX - the x translation
      translateY - the y translation
  • Method Details

    • paintIcon

      public void paintIcon(Component c, Graphics g, int x, int y)
      Specified by:
      paintIcon in interface Icon
    • getIconHeight

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

      public int getIconWidth()
      Specified by:
      getIconWidth in interface Icon
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBaseIcon

      public Icon getBaseIcon()
      Returns the icon that is being translated
      Returns:
      the icon that is being translated
    • getX

      public int getX()
      Returns the amount the icon is being translated on the x axis;
      Returns:
      the amount the icon is being translated on the x axis;
    • getY

      public int getY()
      Returns the amount the icon is being translated on the y axis;
      Returns:
      the amount the icon is being translated on the y axis;