Class CenterTranslateIcon

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

public class CenterTranslateIcon extends TranslateIcon
An icon that will update it's x,y offset to be centered over another, presumably larger icon.
  • Constructor Details

    • CenterTranslateIcon

      public CenterTranslateIcon(Icon icon, int centerOverSize)
      Constructor
      Parameters:
      icon - the icon to center
      centerOverSize - the size of the area over which this icon is be centered.

      Note: this constructor assumes the area is a square. If not, add another constructor to this class that takes a width and height for the area