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.
-
-
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 int
compareTo(ToolIconURL that)
boolean
equals(java.lang.Object obj)
javax.swing.ImageIcon
getIcon()
Return the icon asToolConstants#ICON_SIZE
pixel size.byte[]
getIconBytes()
Returns the icon bytes.java.lang.String
getLocation()
Return the location of this icon.javax.swing.ImageIcon
getSmallIcon()
Return the icon asToolConstants.SMALL_ICON_SIZE
pixel size.int
hashCode()
boolean
isAnimated()
Returns true if the Icon is an animated image.java.lang.String
toString()
-
-
-
Method Detail
-
compareTo
public int compareTo(ToolIconURL that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ToolIconURL>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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_TIME
milliseconds the first time it is called!
-
getLocation
public java.lang.String getLocation()
Return the location of this icon.
-
getSmallIcon
public javax.swing.ImageIcon getSmallIcon()
Return the icon asToolConstants.SMALL_ICON_SIZE
pixel size.
-
getIcon
public javax.swing.ImageIcon getIcon()
Return the icon asToolConstants#ICON_SIZE
pixel size.
-
getIconBytes
public byte[] getIconBytes()
Returns the icon bytes.
-
-