se.liu.ida.critiquer.activities.parameters
Class CommanderParameter

java.lang.Object
  extended by se.liu.ida.critiquer.activities.parameters.ActivityParameter<T>
      extended by se.liu.ida.critiquer.activities.parameters.AbstractTaskViewParameter<JPanel,Commander>
          extended by se.liu.ida.critiquer.activities.parameters.CommanderParameter
All Implemented Interfaces:
Serializable, CommanderAddedListener, Parameter<Commander>, TaskViewParameter<JPanel,Commander>

public class CommanderParameter
extends AbstractTaskViewParameter<JPanel,Commander>
implements CommanderAddedListener

This parameter determines a commander who is responsible for carrying out one or more activities using one or more resources. All activities share a global list of commanders that is updated whenever new names are typed in the editable combo box.

Author:
olale
See Also:
Serialized Form

Field Summary
 
Fields inherited from class se.liu.ida.critiquer.activities.parameters.AbstractTaskViewParameter
component
 
Fields inherited from class se.liu.ida.critiquer.activities.parameters.ActivityParameter
hasBeenSet, name, oldValue, value, valueUpdate
 
Constructor Summary
CommanderParameter(String name, Activity activity)
           
 
Method Summary
 void commanderAdded(Commander commander)
          When the user has typed a new unique name of a commander, update the model used by the list component.
 JComboBox getCommanderList()
           
 void initComponent()
           
 boolean isEnabled()
           
 
Methods inherited from class se.liu.ida.critiquer.activities.parameters.AbstractTaskViewParameter
getComponent, toString
 
Methods inherited from class se.liu.ida.critiquer.activities.parameters.ActivityParameter
getActivity, getName, getOldValue, getValue, hasValue, setName, setValue, setValue, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommanderParameter

public CommanderParameter(String name,
                          Activity activity)
Method Detail

isEnabled

public boolean isEnabled()

initComponent

public void initComponent()
Specified by:
initComponent in interface TaskViewParameter<JPanel,Commander>
Specified by:
initComponent in class AbstractTaskViewParameter<JPanel,Commander>

getCommanderList

public JComboBox getCommanderList()
Returns:
Returns the commanderList.

commanderAdded

public void commanderAdded(Commander commander)
When the user has typed a new unique name of a commander, update the model used by the list component.

Specified by:
commanderAdded in interface CommanderAddedListener
See Also:
CommanderAddedListener.commanderAdded(se.liu.ida.critiquer.activities.parameters.Commander)