jview
Class AbstractDisplayable

java.lang.Object
  extended by util.PropertyContainer
      extended by jview.AbstractDisplayable
All Implemented Interfaces:
Cloneable, Displayable, Initializable, PropertyBearing
Direct Known Subclasses:
JAbstractAnalyser, JElementDisplay, JGuiderPanel, JInfoPanel, JRoofView, JSensorTable, JSpectrumCanvas, JSplittedDataDisplay, JStatusField, JTargetTable, JTelescopeStatusPanel, JWebcam

public abstract class AbstractDisplayable
extends PropertyContainer
implements Displayable

Helper class that links its icon to a property.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyContainer
PropertyContainer.URLResource
 
Field Summary
static String KEY_COMPONENTNAME
          The key for component name.
static String KEY_ICON
          The key for the image icon.
static String KEY_INSETS
          The key to the insets.
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR, KEY_NOINITONCREATE, KEY_RESOURCEBUNDLES
 
Fields inherited from interface util.PropertyBearing
CONFIG, KEY_CLASS, KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
protected AbstractDisplayable(Map<String,String> prop)
          Constructor chaining.
 
Method Summary
 String getComponentName()
          If the name of the component returned should be set, we can do this adfter construction and calling this method.
 Icon getIcon()
          If a icon property is set, we return the image icon from it.
static Icon getIcon(PropertyBearing info)
          If the KEY_ICON property points to a valid resource, we try to construct an ImageIcon from it and return it.
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, clone, createFrom, createFrom, createFrom, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getLocalClassLoader, getLocalized, getLocalized, getLocalizedString, getLocalizedString, getProperties, getPropertiesToKey, getPropertiesToKey, getProperty, getResource, getResourceAsStream, getResourceFromKey, getResources, has, init, isNew, keyCreate, keyCreate, parseObject, reload, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jview.Displayable
getRepresentation
 

Field Detail

KEY_ICON

public static final String KEY_ICON
The key for the image icon.

See Also:
Constant Field Values

KEY_INSETS

public static final String KEY_INSETS
The key to the insets.

See Also:
Constant Field Values

KEY_COMPONENTNAME

public static final String KEY_COMPONENTNAME
The key for component name.

See Also:
Constant Field Values
Constructor Detail

AbstractDisplayable

protected AbstractDisplayable(Map<String,String> prop)
Constructor chaining.

Method Detail

getComponentName

public String getComponentName()
If the name of the component returned should be set, we can do this adfter construction and calling this method.


getIcon

public Icon getIcon()
If a icon property is set, we return the image icon from it.

Specified by:
getIcon in interface Displayable

getIcon

public static Icon getIcon(PropertyBearing info)
If the KEY_ICON property points to a valid resource, we try to construct an ImageIcon from it and return it.