Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.ide.util
Class IconDescription  view IconDescription download IconDescription.java

java.lang.Object
  extended byjavax.ide.util.IconDescription

public abstract class IconDescription
extends java.lang.Object

The description of an icon. An icon is specified either as a key lookup in a resource file which resolves to a resource path relative to the resource file, or an absolute resource path.

Use the createPathInstance( ClassLoader, String ) 55 or createResourceInstance( ClassLoader, String, String) 55 factory methods to create an instance of this class. To retrieve the URL of the icon, use getURL() 55 . This URL is normally a resource (i.e. classpath) URL, suitable for use when constructing an ImageIcon or other toolkit specific image type.


Field Summary
private  java.net.URL _url
           
 
Constructor Summary
private IconDescription()
           
 
Method Summary
static IconDescription createInstance(java.net.URL url)
          Create an instance that wraps the specified icon URL.
static IconDescription createPathInstance(java.lang.ClassLoader loader, java.lang.String path)
          Create an instance of IconDescription based on a direct icon path in the manifest file.
static IconDescription createResourceInstance(java.lang.ClassLoader loader, java.lang.String bundleClass, java.lang.String key)
          Create an instance of IconDescription based on a resource key lookup.
 java.net.URL getURL()
          Get the resolved URL of the icon.
protected abstract  java.net.URL resolveURL()
          Resolve the URL for this instance of IconDescription.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_url

private java.net.URL _url
Constructor Detail

IconDescription

private IconDescription()
Method Detail

createInstance

public static IconDescription createInstance(java.net.URL url)
Create an instance that wraps the specified icon URL.


createResourceInstance

public static IconDescription createResourceInstance(java.lang.ClassLoader loader,
                                                     java.lang.String bundleClass,
                                                     java.lang.String key)
Create an instance of IconDescription based on a resource key lookup.


createPathInstance

public static IconDescription createPathInstance(java.lang.ClassLoader loader,
                                                 java.lang.String path)
Create an instance of IconDescription based on a direct icon path in the manifest file.


resolveURL

protected abstract java.net.URL resolveURL()
                                    throws MissingIconException
Resolve the URL for this instance of IconDescription.


getURL

public java.net.URL getURL()
                    throws MissingIconException
Get the resolved URL of the icon.