Package org.jdesktop.swingx.icon
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
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
-
Field Summary
Fields inherited from interface org.jdesktop.swingx.icon.SizingConstants
ACTION_ICON, BUTTON_ICON, L, LAUNCHER_ICON, M, N, S, SMALL_ICON, XL, XS, XXL
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
-
Method Summary
Modifier and TypeMethodDescriptiondefault double
default boolean
default void
setReflection
(boolean pointReflection) default void
setReflection
(boolean horizontal, boolean vertical) A hint for point/axis reflection (mirroring) the icon when painting.default void
setRotation
(double theta) A hint to rotate the icon when paintingdefault void
setRotation
(int direction) A hint to rotate the icon to a direction.Methods inherited from interface javax.swing.Icon
getIconHeight, getIconWidth, paintIcon
-
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 directionNORTH_EAST
means rotating 45° right andWEST
means rotating 90° left or 270° right.- Parameters:
direction
- Compass-direction, useSwingConstants
NORTH
,NORTH_EAST
etc- See Also:
-