stella.jview
Class JTargetTableManager

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by jview.AbstractDisplayable
                  extended by stella.jview.JTargetTable
                      extended by stella.jview.JTargetTableRanker
                          extended by stella.jview.JTargetTableManager
All Implemented Interfaces:
Cloneable, Displayable, Caster, ClusterDepending, TargetProviderDepending, TargetSelectionCaster, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class JTargetTableManager
extends JTargetTableRanker
implements TargetSelectionCaster

Additionally to ranking the targets, targets can noe be selected by clicking on them. To allow for rather unspecific actions, a method addTargetSelectionListener(stella.TargetSelectionListener) is defined, which delivers the TargetDefinition of the currently selected target.


Nested Class Summary
private static class JTargetTableManager.ColoredLabelRenderer
          A static table cell renderer to display colored labels.
 
Nested classes/interfaces inherited from class stella.jview.JTargetTable
JTargetTable.Show
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private static TableCellRenderer colored
          The cell renderer for selected targets.
static Color DEFEXTERNCOLOR
          The default color to display target names.
private static Color DEFSELECTCOLOR
          The default color to display the currently selected target.
private static TableCellRenderer extern
          The cell renderer for external targets.
static String KEY_EXTERNCOLOR
          The standard color to display targets.
static String KEY_SELECTCOLOR
          The color to display the currently selected target.
private  List outside
          The list of external chosen targets.
private  TargetDefinition select
          The currently selected target.
private  List targetlisteners
          The list of registered target listeners.
 
Fields inherited from class stella.jview.JTargetTableRanker
DEFNAME, KEY_RANKINGTIP
 
Fields inherited from class stella.jview.JTargetTable
KEY_DISPLAY, KEY_FRAME, KEY_GLOBALCONSTRAINT, KEY_MAXROWS, KEY_MAXTARGETS, KEY_REFRESH, KEY_REVERSE, KEY_SORTING, panel, sorter
 
Fields inherited from class jview.AbstractDisplayable
KEY_COMPONENTNAME, KEY_ICON, KEY_INSETS
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Constructor Summary
JTargetTableManager(Map prop)
          Constructs a new target manager.
 
Method Summary
 void addExternalSelection(TargetDefinition td)
          Adds a target to the external list.
 void addTargetSelectionListener(TargetSelectionListener ear)
          Adds a new target selection lsitener to this component.
protected  TableCellRenderer getSpecialRenderer(int row, int col)
          If a target is selected, return a special renderer for this target.
 void init()
          Initilaizes the target listener list and the button-look up table.
 void registerProvider(TargetProviding tp)
          The selection mode is set to single list selection.
 void removeExternalSelection(TargetDefinition td)
          Removes a target from the external list.
 void removeTargetSelectionListener(TargetSelectionListener ear)
          Removes the target selection listener.
 
Methods inherited from class stella.jview.JTargetTable
checkGlobalConstraints, getRepresentation, registerCluster, update
 
Methods inherited from class jview.AbstractDisplayable
getComponentName, getIcon, getIcon
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, 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
getIcon
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 

Field Detail

KEY_EXTERNCOLOR

public static final String KEY_EXTERNCOLOR
The standard color to display targets.

See Also:
Constant Field Values

KEY_SELECTCOLOR

public static final String KEY_SELECTCOLOR
The color to display the currently selected target.

See Also:
Constant Field Values

DEFEXTERNCOLOR

public static final Color DEFEXTERNCOLOR
The default color to display target names.


DEFSELECTCOLOR

private static final Color DEFSELECTCOLOR
The default color to display the currently selected target.


select

private TargetDefinition select
The currently selected target.


outside

private List outside
The list of external chosen targets.


targetlisteners

private List targetlisteners
The list of registered target listeners.


colored

private static TableCellRenderer colored
The cell renderer for selected targets.


extern

private static TableCellRenderer extern
The cell renderer for external targets.

Constructor Detail

JTargetTableManager

public JTargetTableManager(Map prop)
Constructs a new target manager. TargetSelectionListeners may be added that receive selection events.

Method Detail

init

public void init()
Initilaizes the target listener list and the button-look up table.

Specified by:
init in interface Initializable
Overrides:
init in class JTargetTable

addExternalSelection

public void addExternalSelection(TargetDefinition td)
Adds a target to the external list. Those are displayed in the external color.


removeExternalSelection

public void removeExternalSelection(TargetDefinition td)
Removes a target from the external list.


addTargetSelectionListener

public void addTargetSelectionListener(TargetSelectionListener ear)
Adds a new target selection lsitener to this component.

Specified by:
addTargetSelectionListener in interface TargetSelectionCaster

removeTargetSelectionListener

public void removeTargetSelectionListener(TargetSelectionListener ear)
Removes the target selection listener.

Specified by:
removeTargetSelectionListener in interface TargetSelectionCaster

registerProvider

public void registerProvider(TargetProviding tp)
The selection mode is set to single list selection.

Specified by:
registerProvider in interface TargetProviderDepending
Overrides:
registerProvider in class JTargetTableRanker

getSpecialRenderer

protected TableCellRenderer getSpecialRenderer(int row,
                                               int col)
If a target is selected, return a special renderer for this target. Only changes color of selected target, i.e. in the zero column.

Overrides:
getSpecialRenderer in class JTargetTable