com.jbbres.lib.actions.tools.elements.variables
Class VariableActionDescription

java.lang.Object
  extended by com.jbbres.lib.actions.tools.elements.variables.VariableActionDescription
All Implemented Interfaces:
ActionDescription, ElementDescription<Action>, VariableActionServiceListener, com.jbbres.lib.search.Searchable, java.lang.Comparable<ElementDescription<?>>, java.util.EventListener

public class VariableActionDescription
extends java.lang.Object
implements ActionDescription, VariableActionServiceListener

The ActionDescription for VariableAction.

Since:
1.0.0
Version:
1.0.0
Author:
Jean-Baptiste Bres

Field Summary
 
Fields inherited from interface com.jbbres.lib.actions.elements.ActionDescription
DEFAULT_INPUT_PROVIDER, DESCRIPTION_INPUT, DESCRIPTION_OUTPUT, WARNING_CANCEL_BUTTON, WARNING_CONTINUE_BUTTON, WARNING_MESSAGE, WARNING_SUGGESTED_ACTION
 
Fields inherited from interface com.jbbres.lib.actions.elements.ElementDescription
CATEGORY_SEPARATOR, DESCRIPTION_CATEGORIES, DESCRIPTION_COMPANY_NAME, DESCRIPTION_COMPANY_SUPPORT, DESCRIPTION_COMPANY_WEBSITE, DESCRIPTION_COPYRIGHT, DESCRIPTION_ICON, DESCRIPTION_SUMMARY, DESCRIPTION_TITLE, DESCRIPTION_VERSION, TYPE
 
Constructor Summary
VariableActionDescription(VariableAction action)
          Instantiates a description.
 
Method Summary
 void addElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
          Adds a element description change listener.
 void assignValueChange(VariableActionServiceEvent event)
          Invocated when the assign value flag changes.
 int compareTo(ElementDescription<?> element)
           
 void fireElementDescriptionChange(java.lang.String descriptionKey, VariableDescription oldDescription)
          Calls the elementDescriptionChange(ElementDescriptionChangeEvent) of all listeners.
 void fireElementDescriptionChange(VariableDescription oldDescription)
          Calls fireElementDescriptionChange(String, VariableDescription) for all possible description key.
 Category[] getCategories()
          Returns the categories associated to the element.
 java.lang.String getDescription(java.lang.String key)
          Returns the information associated to the given key.
 javax.swing.ImageIcon getIcon()
          Returns the icon associated to the element.
 java.lang.Object getSearchableValue(com.jbbres.lib.search.SearchField<?> field)
           
 Element newElementInstance(Workflow workflow)
          Creates and returns a new instance of the element described.
 void removeElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
          Removes a element description change listener.
 void variableChange(VariableActionServiceEvent event)
          Invocated when the variable changes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableActionDescription

public VariableActionDescription(VariableAction action)
Instantiates a description.

Parameters:
action - - the action
Method Detail

getDescription

public java.lang.String getDescription(java.lang.String key)
Description copied from interface: ElementDescription
Returns the information associated to the given key.

Specified by:
getDescription in interface ElementDescription<Action>
Parameters:
key - - the key
Returns:
the information associated to the given key.

getIcon

public javax.swing.ImageIcon getIcon()
Description copied from interface: ElementDescription
Returns the icon associated to the element.

Specified by:
getIcon in interface ElementDescription<Action>
Returns:
the icon associated to the element

getCategories

public Category[] getCategories()
Description copied from interface: ElementDescription
Returns the categories associated to the element.

Specified by:
getCategories in interface ElementDescription<Action>
Returns:
the categories associated to the element

newElementInstance

public Element newElementInstance(Workflow workflow)
Description copied from interface: ElementDescription
Creates and returns a new instance of the element described.

This methods should not add the new element to the given workflow. Action(s) takes care of calling the appropried Workflow.add(Element) method.

Specified by:
newElementInstance in interface ElementDescription<Action>
Parameters:
workflow - - the workflow that will own the element
Returns:
a new instance of the element described.

getSearchableValue

public java.lang.Object getSearchableValue(com.jbbres.lib.search.SearchField<?> field)
Specified by:
getSearchableValue in interface com.jbbres.lib.search.Searchable

compareTo

public int compareTo(ElementDescription<?> element)
Specified by:
compareTo in interface java.lang.Comparable<ElementDescription<?>>

addElementDescriptionChangeListener

public void addElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
Description copied from interface: ElementDescription
Adds a element description change listener.

Specified by:
addElementDescriptionChangeListener in interface ElementDescription<Action>
Parameters:
listener - - the listener
See Also:
ElementDescriptionChangeListener

removeElementDescriptionChangeListener

public void removeElementDescriptionChangeListener(ElementDescriptionChangeListener listener)
Description copied from interface: ElementDescription
Removes a element description change listener.

Specified by:
removeElementDescriptionChangeListener in interface ElementDescription<Action>
Parameters:
listener - - the listener
See Also:
ElementDescriptionChangeListener

fireElementDescriptionChange

public void fireElementDescriptionChange(VariableDescription oldDescription)
Calls fireElementDescriptionChange(String, VariableDescription) for all possible description key.

Parameters:
oldDescription - - the previous description

fireElementDescriptionChange

public void fireElementDescriptionChange(java.lang.String descriptionKey,
                                         VariableDescription oldDescription)
Calls the elementDescriptionChange(ElementDescriptionChangeEvent) of all listeners.

Parameters:
descriptionKey - - the key associated to the description that changed.
oldDescription - - the old description

assignValueChange

public void assignValueChange(VariableActionServiceEvent event)
Description copied from interface: VariableActionServiceListener
Invocated when the assign value flag changes.

Specified by:
assignValueChange in interface VariableActionServiceListener
Parameters:
event - - the event

variableChange

public void variableChange(VariableActionServiceEvent event)
Description copied from interface: VariableActionServiceListener
Invocated when the variable changes.

Specified by:
variableChange in interface VariableActionServiceListener
Parameters:
event - - the event


To file bugs or suggest feature enhancements, visit the app.jbbres.com Bug Reporter website.

Additional documentation available online at http://app.jbbres.com/actions/developers.

Copyright � 2009-2011 app.jbbres.com. All Rights Reserved.