Package docking.util.image

# Class ToolIconURL

java.lang.Object
docking.util.image.ToolIconURL

All Implemented Interfaces:
  `Comparable<ToolIconURL>`

public class ToolIconURL extends Object implements 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 final int`
  `LARGE_ICON_SIZE`
  The large icon size (height and width)
  `static final int`
  `MEDIUM_ICON_SIZE`
  The medium icon size (height and width)
  `static final int`
  `SMALL_ICON_SIZE`
  The small icon size (height and width)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ToolIconURL(String location)`
  Constructor
  `ToolIconURL(String location, byte[] bytes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(ToolIconURL that)`
  `boolean`
  `equals(Object obj)`
  `ImageIcon`
  `getIcon()`
  Return the icon as `LARGE_ICON_SIZE` pixel size.
  `byte[]`
  `getIconBytes()`
  Returns the icon bytes
  `String`
  `getLocation()`
  Return the location of this icon
  `ImageIcon`
  `getSmallIcon()`
  Return the icon as `SMALL_ICON_SIZE` pixel size.
  `int`
  `hashCode()`
  `boolean`
  `isAnimated()`
  Returns true if the Icon is an animated image.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### 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

- ## Constructor Details

  - ### ToolIconURL

    public ToolIconURL(String location)
    Constructor
    Parameters:
      `location` - filename for the icon (relative or absolute)

  - ### ToolIconURL

    public ToolIconURL(String location, byte[] bytes)

- ## Method Details

  - ### compareTo

    public int compareTo(ToolIconURL that)
    Specified by:
      `compareTo` in interface `Comparable<ToolIconURL>`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `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!

    Returns:
      true if animated

  - ### getLocation

    public String getLocation()
    Return the location of this icon
    Returns:
      the location of this icon

  - ### getSmallIcon

    public ImageIcon getSmallIcon()
    Return the icon as `SMALL_ICON_SIZE` pixel size.
    Returns:
      the icon

  - ### getIcon

    public ImageIcon getIcon()
    Return the icon as `LARGE_ICON_SIZE` pixel size.
    Returns:
      the icon

  - ### getIconBytes

    public byte[] getIconBytes()
    Returns the icon bytes
    Returns:
      the bytes