stella.jview
Class AssistantScheduler

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.AbstractScheduler
                  extended by stella.xml.XMLScheduler
                      extended by stella.jview.AssistantScheduler
All Implemented Interfaces:
Cloneable, EventListener, ClusterDepending, Scheduling, TargetProviderDepending, TargetSelectionListener, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying

public class AssistantScheduler
extends XMLScheduler
implements ClusterDepending, TargetProviderDepending, TargetSelectionListener

A class that allows the user to use a JTargetTable dedescant for inter-active target selection. The user can select sorting parameters by clicking on them. Selected targets are displayed as in the parental class, while targets that are currently observed (i.e. that has been retrieved using the last call to the scheduler's getHighestTarget(stella.ParameterClustering, java.util.Collection) method). If no target has been selected, this scheduler acts as an XMLScheduler.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
private  TargetDefinition current
          The last target selected.
private static boolean DEFASSISTING
          The default assisting behaviour.
private static String DEFFRAMETITLE
          The name of the active target frame.
static String KEY_ASSISTING
          True, if non-selected targets should spark the parent scheduling.
static String KEY_FRAMETITLE
          The name of the active target frame.
static String KEY_TARGETMANAGER
          The properties of the JTargetTableManager, if any.
private  TargetDefinition lastobserved
          The last target observed, if picked by the user.
private  JTargetTableManager manage
          The target manager needed for this scheduler.
 
Fields inherited from class stella.xml.XMLScheduler
KEY_GLOBALCONSTRAINT, KEY_GLOBALMERIT, KEY_GLOBALWATCH
 
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.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
AssistantScheduler(Map prop)
          Constructs a new assitant scheduler.
 
Method Summary
 TargetDefinition getHighestTarget(ParameterClustering set, Collection ofall)
          The query method invoked by the master mind.
 void registerCluster(ParameterClustering set)
          Creates the target manger to it.
 void registerProvider(TargetProviding list)
          Assigns the targetlist to the target table manager.
 void targetSelected(TargetSelectionEvent tse)
          This method is called when the user clicked on a target.
 
Methods inherited from class stella.xml.XMLScheduler
addMeritTrace, highestFromAll, init, removeMeritTrace
 
Methods inherited from class stella.AbstractScheduler
addGlobalConstraint, checkGlobalConstraints, createScheduler, getGlobalConstraints, getObservableTargets, registerMonitor, removeAllGlobalConstraints, removeGlobalConstraint, wakeUp
 
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 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
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

KEY_TARGETMANAGER

public static final String KEY_TARGETMANAGER
The properties of the JTargetTableManager, if any.

See Also:
Constant Field Values

KEY_FRAMETITLE

public static final String KEY_FRAMETITLE
The name of the active target frame.

See Also:
Constant Field Values

KEY_ASSISTING

public static final String KEY_ASSISTING
True, if non-selected targets should spark the parent scheduling.

See Also:
Constant Field Values

DEFFRAMETITLE

private static final String DEFFRAMETITLE
The name of the active target frame.

See Also:
Constant Field Values

DEFASSISTING

private static final boolean DEFASSISTING
The default assisting behaviour.

See Also:
Constant Field Values

manage

private JTargetTableManager manage
The target manager needed for this scheduler.


lastobserved

private TargetDefinition lastobserved
The last target observed, if picked by the user.


current

private TargetDefinition current
The last target selected. Only the name is used for easy deleting.

Constructor Detail

AssistantScheduler

public AssistantScheduler(Map prop)
Constructs a new assitant scheduler. Works only if a JTargetTableManager is assigned to it in the registerCluster(stella.ParameterClustering) method.

Method Detail

registerCluster

public void registerCluster(ParameterClustering set)
Creates the target manger to it. Only then the scheduler will work. The list of targets is displayed when the target provider is registered.

Specified by:
registerCluster in interface ClusterDepending

registerProvider

public void registerProvider(TargetProviding list)
Assigns the targetlist to the target table manager. A frame is popped up that shows the targets.

Specified by:
registerProvider in interface TargetProviderDepending

targetSelected

public void targetSelected(TargetSelectionEvent tse)
This method is called when the user clicked on a target. First, it is checked if the current selected target is equal to the newly selected target. If so, the target is erased. If not, the current target is set to the selected target. Color is changed by the calling method.

Specified by:
targetSelected in interface TargetSelectionListener

getHighestTarget

public TargetDefinition getHighestTarget(ParameterClustering set,
                                         Collection ofall)
The query method invoked by the master mind. If no target has been selected, normal merit-based scheduling is invoked by calling the parental method. If a target has been selected prior to a call to this method, the color of the target is changed to JTargetTableManager.KEY_EXTERNCOLOR by a call to the manager's JTargetTableManager.addExternalSelection(stella.TargetDefinition) method. The current target is deleted and can only be set by a fresh user interaction.

Specified by:
getHighestTarget in interface Scheduling
Overrides:
getHighestTarget in class XMLScheduler