com.sas.swing.visuals
Class ImageIconResource

com.sas.swing.visuals.ImageIconResource
All Implemented Interfaces:
ResourceConsumerInterface, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.Icon

public class ImageIconResource
implements ResourceConsumerInterface, java.beans.PropertyChangeListener

ImageIconResource is a subclass of javax.swing.ImageIcon and its purpose is to use the instance of the ResourceLocatorInterface to locate the specified image. This class is not intended to be used directly by the user as it's main use is for the IconEditor. The IconEditor will use this class to store the image's location and also to provide the user with a missing file icon if the image specified by the user is not valid or accessible.

See Also:

, Serialized Form


Field Summary
static java.lang.String RB_KEY
           
protected  com.sas.net.ResourceLocatorInterface resourceLocator
           
protected  javax.swing.event.SwingPropertyChangeSupport spcs
           
 
Constructor Summary
ImageIconResource()
          Default constructor, creates a default AppletResourceLocator as the resource locator.
ImageIconResource(com.sas.net.ResourceLocatorInterface resourceLocator)
          Creates a ImageIconResource with the specified instance of the ResourceLocatorInterface as the image.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void firePropertyChange(java.beans.PropertyChangeEvent evt)
          Fire an existing PropertyChangeEvent to any registered listeners.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Report a bound property update to any registered listeners.
 com.sas.net.ResourceLocatorInterface getResourceLocator()
          Returns the instance of the ResourceLocatorInterface that is used to locate the image.
 void propertyChange(java.beans.PropertyChangeEvent ev)
          Handle PropertyChangeEvents from the resource locator.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void setResourceLocator(com.sas.net.ResourceLocatorInterface newValue)
          Sets the instance of the ResourceLocatorInterface that is used to locate the image.
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

resourceLocator

protected com.sas.net.ResourceLocatorInterface resourceLocator

spcs

protected javax.swing.event.SwingPropertyChangeSupport spcs
Constructor Detail

ImageIconResource

public ImageIconResource()
Default constructor, creates a default AppletResourceLocator as the resource locator.

See Also:
AppletResourceLocator

ImageIconResource

public ImageIconResource(com.sas.net.ResourceLocatorInterface resourceLocator)
Creates a ImageIconResource with the specified instance of the ResourceLocatorInterface as the image.

See Also:
ResourceLocatorInterface
Method Detail

getResourceLocator

public com.sas.net.ResourceLocatorInterface getResourceLocator()
Returns the instance of the ResourceLocatorInterface that is used to locate the image.

Specified by:
getResourceLocator in interface ResourceConsumerInterface
Returns:
The resource locator the points to the location of the image.
See Also:
ResourceConsumerInterface.setResourceLocator(com.sas.net.ResourceLocatorInterface)

setResourceLocator

public void setResourceLocator(com.sas.net.ResourceLocatorInterface newValue)
Sets the instance of the ResourceLocatorInterface that is used to locate the image. The new image will then be loaded.

Specified by:
setResourceLocator in interface ResourceConsumerInterface
Parameters:
newValue - The resource locator the points to the location of the image.
See Also:
ResourceLocatorInterface

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent ev)
Handle PropertyChangeEvents from the resource locator.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
ev - The event from the resource locator indicating what property changed.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Report a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.

Parameters:
propertyName - The programmatic name of the property that was changed.
oldValue - The old value of the property.
newValue - The new value of the property.

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent evt)
Fire an existing PropertyChangeEvent to any registered listeners. No event is fired if the given event's old and new values are equal and non-null.

Parameters:
evt - The PropertyChangeEvent object.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.