Interface JXIcon

All Superinterfaces:
Icon, SizingConstants, SwingConstants
All Known Subinterfaces:
RadianceIcon
All Known Implementing Classes:
ArrowIcon, CalendarIcon, ChevronIcon, ChevronsIcon, CircleIcon, DeletedIcon, DeleteIcon, FileIcon, FolderIcon, FolderPlusIcon, PainterIcon, PauseIcon, PlayIcon, PlayIconSolid, RadianceIconUIResource, SearchIcon, StopIcon, TrafficLightGreenIcon, TrafficLightRedIcon, TrafficLightYellowIcon

public interface JXIcon extends Icon, SizingConstants
Extension of the core Icon interface that adds more capabilities like rotation and point/axis reflection

See JXIcon documentation.

SizingConstants extends SwingConstants with sizing from XS to XXL

Author:
EUG https://github.com/homebeaver
  • Method Details

    • setReflection

      default void setReflection(boolean horizontal, boolean vertical)
      A hint for point/axis reflection (mirroring) the icon when painting.

      setReflection(true, true) means point reflection

      Parameters:
      horizontal - will mirror the icon horizontal (X axis)
      vertical - will mirror the icon vertical (Y axis)
    • setReflection

      default void setReflection(boolean pointReflection)
    • isReflection

      default boolean isReflection()
    • setRotation

      default void setRotation(double theta)
      A hint to rotate the icon when painting
      Parameters:
      theta - the angle of rotation in radians, zero means no rotation
    • getRotation

      default double getRotation()
    • setRotation

      default void setRotation(int direction)
      A hint to rotate the icon to a direction.

      The icon is aligned to NORTH per default, so rotate direction NORTH_EAST means rotating 45° right and WEST means rotating 90° left or 270° right.

      Parameters:
      direction - Compass-direction, use SwingConstants NORTH, NORTH_EAST etc
      See Also: