| java.lang.Object org.osbl.agent.gui.OperationController
All known Subclasses: org.osbl.agent.gui.ConditionController, org.osbl.agent.gui.ActionController,
OperationController | abstract public class OperationController (Code) | | An OperationController provides the UI components to manipulate Conditions or Actions.
It also knows if another given OperationController can pose as a replacement
to itself.
This class provides a factory method to instantiate the corresponding
Condition or Action for a given Condition- or ActionController.
author: Sebastian Nozzi. |
Method Summary | |
abstract public boolean | canBeReplacedBy(OperationController candidateController) Returns true if the candidateController can replace this
controller.
OperationController can replace one another if they perform the same function
regardless of its internal state.
Parameters: candidateController - the candidate controller that might, or not, serve as a replacement for this one. | final public List<SComponent> | getComponents() Returns the UI components that represent the corresponding model class. | protected String | msg(String code, Object... args) Convenience method to retrieve localized Strings.
Parameters: code - the String-code. Parameters: args - optional additional arguments. | protected static OperationController | newInstance(Object conditionOrAction, String packagePrefix) For a given Condition or Action instance, it instantiates the corresponding
Condition- or ActionController.
Parameters: conditionOrAction - a Condition or Action instance. Parameters: packagePrefix - the prefix of the package where the correspoding OperationController can be found. | protected Object | newOperationInstance() Tries to retrieve an instance of the model class that corresponds to this
OperationController. | abstract protected void | populateComponentList(List<SComponent> componentList) Populates the component list with the components corresponding to the current
Condition or ActionController. |
canBeReplacedBy | abstract public boolean canBeReplacedBy(OperationController candidateController)(Code) | | Returns true if the candidateController can replace this
controller.
OperationController can replace one another if they perform the same function
regardless of its internal state.
Parameters: candidateController - the candidate controller that might, or not, serve as a replacement for this one. true, if can be replaced by the candidate controller. |
getComponents | final public List<SComponent> getComponents()(Code) | | Returns the UI components that represent the corresponding model class.
They let the user manipulate the Condition- or ActionController in a visual way.
Note that subclasses should not override this method but
OperationController.populateComponentList(List) .
a list of UI components. |
msg | protected String msg(String code, Object... args)(Code) | | Convenience method to retrieve localized Strings.
Parameters: code - the String-code. Parameters: args - optional additional arguments. the localized String |
newOperationInstance | protected Object newOperationInstance()(Code) | | Tries to retrieve an instance of the model class that corresponds to this
OperationController. So, for example, if called on a ConditionController
it tries to instantiate the corresponding Condition. It performs the opposite
operation that
OperationController.newInstance(Object,String) does.
the corresponding Condition or Action instance, or null if not successfull. |
populateComponentList | abstract protected void populateComponentList(List<SComponent> componentList)(Code) | | Populates the component list with the components corresponding to the current
Condition or ActionController.
Parameters: componentList - the component list to be populated. |
|
|