Package docking.util.image
Class ToolIconURL
java.lang.Object
docking.util.image.ToolIconURL
- All Implemented Interfaces:
Comparable<ToolIconURL>
Container class for an icon and its location. If the location is
not valid, then a default "bomb" icon is used as the icon.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe large icon size (height and width)static final intThe medium icon size (height and width)static final intThe small icon size (height and width) -
Constructor Summary
ConstructorsConstructorDescriptionToolIconURL(String location) ConstructorToolIconURL(String location, byte[] bytes) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ToolIconURL that) booleangetIcon()Return the icon asLARGE_ICON_SIZEpixel size.byte[]Returns the icon bytesReturn the location of this iconReturn the icon asSMALL_ICON_SIZEpixel size.inthashCode()booleanReturns true if the Icon is an animated image.toString()
-
Field Details
-
LARGE_ICON_SIZE
public static final int LARGE_ICON_SIZEThe large icon size (height and width)- See Also:
-
MEDIUM_ICON_SIZE
public static final int MEDIUM_ICON_SIZEThe medium icon size (height and width)- See Also:
-
SMALL_ICON_SIZE
public static final int SMALL_ICON_SIZEThe small icon size (height and width)- See Also:
-
-
Constructor Details
-
ToolIconURL
Constructor- Parameters:
location- filename for the icon (relative or absolute)
-
ToolIconURL
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<ToolIconURL>
-
hashCode
public int hashCode() -
equals
-
toString
-
isAnimated
public boolean isAnimated()Returns true if the Icon is an animated image.WARNING: This call may block the Swing thread for up to
MAX_IMAGE_LOAD_TIMEmilliseconds the first time it is called!- Returns:
- true if animated
-
getLocation
Return the location of this icon- Returns:
- the location of this icon
-
getSmallIcon
Return the icon asSMALL_ICON_SIZEpixel size.- Returns:
- the icon
-
getIcon
Return the icon asLARGE_ICON_SIZEpixel size.- Returns:
- the icon
-
getIconBytes
public byte[] getIconBytes()Returns the icon bytes- Returns:
- the bytes
-