edu.washington.cs.supple.rep
Class UiActionImpl

java.lang.Object
  extended byedu.washington.cs.supple.rep.SuppleBeanImpl
      extended byedu.washington.cs.supple.rep.SuppleUiObjectHierarchyElementImpl
          extended byedu.washington.cs.supple.rep.UiObjectImpl
              extended byedu.washington.cs.supple.rep.UiActionImpl
All Implemented Interfaces:
java.lang.Cloneable, ConstraintManipulation, java.util.EventListener, java.beans.PropertyChangeListener, java.io.Serializable, SuppleBean, SuppleUiObjectHierarchyElement, UiAction, UiObject, ValueListener

public final class UiActionImpl
extends UiObjectImpl
implements UiAction

Author:
raphael
See Also:
Serialized Form

Field Summary
protected  SuppleAction action
           
 
Fields inherited from class edu.washington.cs.supple.rep.UiObjectImpl
active, activeValue, constraints, currentView, hints, interfaceIdentifier, modifiable, runtime, textLabel, type, uniqueId, uniqueIdCounter
 
Fields inherited from class edu.washington.cs.supple.rep.SuppleUiObjectHierarchyElementImpl
name, parent
 
Fields inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
pcs
 
Constructor Summary
UiActionImpl(ActionTypeImpl type, java.lang.String label, SuppleAction binding)
           
 
Method Summary
protected  void acceptBindingVisitor(UiVisitor visitor)
          Helper for accept() - allows subclasses to extend the bindings to be visited without overriding accept().
 void bindAction(SuppleAction action)
          Rebind the (application defined) action backing this UiAction.
 UiObject execute()
          This method is called when the user presses a button on the UI to execute this action
 UiObject getResultUi()
          Get an example of the ui (if any) that would result from executing this action.
 java.lang.String toPrettyString(java.lang.String pref)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.washington.cs.supple.rep.UiObjectImpl
accept, addRenderingConstraint, addRenderingHint, bindActive, childChanged, clone, equals, getBottomUpObjects, getCommonAncestor, getInterfaceIdentifier, getPath, getRenderingConstraints, getRenderingHints, getTextLabel, getType, getUniqueId, getView, hashCode, hasTextLabel, isActive, isLeaf, isModifiable, isRuntime, propertyChange, setActive, setRuntime, setType, setView, updateParent, valueChanged
 
Methods inherited from class edu.washington.cs.supple.rep.SuppleUiObjectHierarchyElementImpl
getAncestors, getFullName, getName, getParent, getParentObject, getRootObject, isChildOf, isDescendantOf, isRoot, setName, setParent
 
Methods inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.washington.cs.supple.rep.UiObject
accept, childChanged, equals, getInterfaceIdentifier, getTextLabel, getType, getUniqueId, getView, hashCode, hasTextLabel, isActive, isLeaf, isModifiable, isRuntime, setActive, setRuntime, setView
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleUiObjectHierarchyElement
getAncestors, getFullName, getName, getParent, getParentObject, getRootObject, isChildOf, isDescendantOf, isRoot, setName, setParent
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 
Methods inherited from interface edu.washington.cs.supple.rep.ConstraintManipulation
addRenderingConstraint, addRenderingHint, getRenderingConstraints, getRenderingHints
 

Field Detail

action

protected transient SuppleAction action
Constructor Detail

UiActionImpl

public UiActionImpl(ActionTypeImpl type,
                    java.lang.String label,
                    SuppleAction binding)
Parameters:
type -
label -
binding -
Method Detail

bindAction

public void bindAction(SuppleAction action)
Description copied from interface: UiAction
Rebind the (application defined) action backing this UiAction.

Specified by:
bindAction in interface UiAction
Parameters:
action -

execute

public final UiObject execute()
Description copied from interface: UiAction
This method is called when the user presses a button on the UI to execute this action

Specified by:
execute in interface UiAction
Returns:
Returns a UiObject to be displayed in response to executing this action

getResultUi

public UiObject getResultUi()
Description copied from interface: UiAction
Get an example of the ui (if any) that would result from executing this action. NOTE: the semantics here are not well defined.

Specified by:
getResultUi in interface UiAction
Returns:

acceptBindingVisitor

protected void acceptBindingVisitor(UiVisitor visitor)
Description copied from class: UiObjectImpl
Helper for accept() - allows subclasses to extend the bindings to be visited without overriding accept().

Overrides:
acceptBindingVisitor in class UiObjectImpl

toString

public java.lang.String toString()
Specified by:
toString in interface UiObject
Overrides:
toString in class UiObjectImpl

toPrettyString

public java.lang.String toPrettyString(java.lang.String pref)
Specified by:
toPrettyString in interface UiObject
Overrides:
toPrettyString in class UiObjectImpl