Package docking.util.image
Class ToolIconURL
- java.lang.Object
-
- docking.util.image.ToolIconURL
-
- All Implemented Interfaces:
java.lang.Comparable<ToolIconURL>
public class ToolIconURL extends java.lang.Object implements java.lang.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
Fields Modifier and Type Field Description static intLARGE_ICON_SIZEThe large icon size (height and width)static intMEDIUM_ICON_SIZEThe medium icon size (height and width)static intSMALL_ICON_SIZEThe small icon size (height and width)
-
Constructor Summary
Constructors Constructor Description ToolIconURL(java.lang.String location)ConstructorToolIconURL(java.lang.String location, byte[] bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ToolIconURL that)booleanequals(java.lang.Object obj)javax.swing.ImageIcongetIcon()Return the icon asLARGE_ICON_SIZEpixel size.byte[]getIconBytes()Returns the icon bytesjava.lang.StringgetLocation()Return the location of this iconjavax.swing.ImageIcongetSmallIcon()Return the icon asSMALL_ICON_SIZEpixel size.inthashCode()booleanisAnimated()Returns true if the Icon is an animated image.java.lang.StringtoString()
-
-
-
Field Detail
-
LARGE_ICON_SIZE
public static final int LARGE_ICON_SIZE
The large icon size (height and width)- See Also:
- Constant Field Values
-
MEDIUM_ICON_SIZE
public static final int MEDIUM_ICON_SIZE
The medium icon size (height and width)- See Also:
- Constant Field Values
-
SMALL_ICON_SIZE
public static final int SMALL_ICON_SIZE
The small icon size (height and width)- See Also:
- Constant Field Values
-
-
Method Detail
-
compareTo
public int compareTo(ToolIconURL that)
- Specified by:
compareToin interfacejava.lang.Comparable<ToolIconURL>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
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
public java.lang.String getLocation()
Return the location of this icon- Returns:
- the location of this icon
-
getSmallIcon
public javax.swing.ImageIcon getSmallIcon()
Return the icon asSMALL_ICON_SIZEpixel size.- Returns:
- the icon
-
getIcon
public javax.swing.ImageIcon getIcon()
Return the icon asLARGE_ICON_SIZEpixel size.- Returns:
- the icon
-
getIconBytes
public byte[] getIconBytes()
Returns the icon bytes- Returns:
- the bytes
-
-