All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.swing.visuals.util
Class DefaultIconMap

    com.sas.swing.visuals.util.DefaultIconMap

All Implemented Interfaces:
  IconMap

    public class DefaultIconMap

implements IconMap

DefaultIconMap description goes here.

Constructor Summary
`DefaultIconMap()` Creates a new instance of `DefaultIconMap`.

Method Summary
`javax.swing.Icon` | `getIcon(java.lang.String resource)` Returns an icon for the specified resource key.
`javax.swing.Icon` | `getObjectIcon(java.lang.Object obj)` Returns an icon for the specified object.
`com.sas.net.ResourceLocatorInterface` | `getResourceLocator()` Returns a resource locator for loading resources such as images.
`protected com.sas.net.ResourceLocatorInterface` | `newResourceLocator()` Factory method that creates an instance of `ClassResourceLocator`.

Constructor Detail

### DefaultIconMap

    public DefaultIconMap()

  Creates a new instance of `DefaultIconMap`.

Method Detail

### getIcon

    public javax.swing.Icon getIcon(java.lang.String resource)

  Returns an icon for the specified resource key. Once an image has been loaded once, it is cached and not loaded again. If the key is not found, `null` will be returned.

  Specified by:
    `getIcon` in interface `IconMap`
  Parameters:
    `resource` - the resource key identifying the image to load
  Returns:
    an Icon for the specified key or `null` if the key doesn't exist

### getObjectIcon

    public javax.swing.Icon getObjectIcon(java.lang.Object obj)

  Returns an icon for the specified object. If the object is an instance of String then getIcon(String) is called. If not, `null` is returned.

  Specified by:
    `getObjectIcon` in interface `IconMap`
  Parameters:
    `obj` - the object to get an icon for
  Returns:
    an icon for the specified object (if it is a string), otherwise `null`

### newResourceLocator

    protected com.sas.net.ResourceLocatorInterface newResourceLocator()

  Factory method that creates an instance of `ClassResourceLocator`. By default, the icons will we searched for relative to the com.sas.visuals.Resources class. Subclasses should override this and add their own icons to the search order.

  Returns:
    a new instance of `ClassResourceLocator`

### getResourceLocator

    public com.sas.net.ResourceLocatorInterface getResourceLocator()

  Returns a resource locator for loading resources such as images.

  Specified by:
    `getResourceLocator` in interface `IconMap`
  Returns:
    a resource locator for loading resources

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.