|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.rep.SuppleBeanImpl
edu.washington.cs.supple.rep.SuppleUiObjectHierarchyElementImpl
edu.washington.cs.supple.rep.UiObjectImpl
| Field Summary | |
protected boolean |
active
|
protected ValueBinding |
activeValue
|
protected java.util.Vector |
constraints
|
protected RenderedView |
currentView
|
protected java.util.Vector |
hints
|
protected java.io.Serializable |
interfaceIdentifier
|
protected boolean |
modifiable
|
protected boolean |
runtime
|
protected java.lang.String |
textLabel
|
protected SuppleType |
type
|
protected int |
uniqueId
|
protected static int |
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 | |
UiObjectImpl(SuppleType type,
java.lang.String label)
Constructor for elements that do not take a value |
|
| Method Summary | |
void |
accept(UiVisitor visitor)
Accept a UiVisitor. |
protected void |
acceptBindingVisitor(UiVisitor visitor)
Helper for accept() - allows subclasses to extend the bindings to be visited without overriding accept(). |
void |
addRenderingConstraint(RenderingConstraint constr)
|
void |
addRenderingHint(RenderingHint hint)
|
void |
bindActive(ValueBinding value)
Bind the active property to a "live" value. |
void |
childChanged()
Called by a child object if something in it or below it changes |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
Based on the uid |
static java.util.Vector |
getBottomUpObjects(UiObject root)
|
static UiObject |
getCommonAncestor(UiObject o1,
UiObject o2)
Returns the deepest common ancestor of the two inputs |
java.io.Serializable |
getInterfaceIdentifier()
Produces an object that uniquely identifies this interface; this identifier remains the same across sessions and is based on the structure of the interface. |
static java.util.Vector |
getPath(UiObject source,
UiObject dest)
Returns a path from source to destination along the hierarchy treee. |
java.util.Vector |
getRenderingConstraints()
|
java.util.Vector |
getRenderingHints()
|
java.lang.String |
getTextLabel()
Sets the visibility of this object (for renderings). |
SuppleType |
getType()
Returns the Supple type of this object |
int |
getUniqueId()
Returns a unique id of this instantiation. |
RenderedView |
getView()
Returns the view that shows this UI object; usuall only the root knows directly abou the view so this object may need to ask up the hierarchy to get the information |
int |
hashCode()
Based on the uid |
boolean |
hasTextLabel()
Lets you check if the object has a meaningful text label |
boolean |
isActive()
UiObjects (well, really StateVars and UiActions) can become inactive if some preconditions are not satisfied (e.g., you cannot execute an action, if it's parameters are not set). |
boolean |
isLeaf()
A convenience method -- returns true if the corresponding type has no children (state vars or actions) |
boolean |
isModifiable()
|
boolean |
isRuntime()
Runtime objects are created on the fly to represent dynamic data objects -- they are unlikely to appear in other instances of the UI; their names are instance-specific |
void |
propertyChange(java.beans.PropertyChangeEvent event)
|
void |
setActive(boolean a)
Let's you change the active state of the UiObject |
void |
setRuntime(boolean r)
|
protected void |
setType(SuppleType t)
|
void |
setView(RenderedView view)
Tells this object what view shows it -- should only be called by RenderedView objects themselves |
java.lang.String |
toPrettyString(java.lang.String pref)
|
java.lang.String |
toString()
|
protected void |
updateParent()
|
void |
valueChanged(ValueBinding binding,
java.lang.Object newValue)
Signals variable change. |
| 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.SuppleUiObjectHierarchyElement |
getAncestors, getFullName, getName, getParent, getParentObject, getRootObject, isChildOf, isDescendantOf, isRoot, setName, setParent |
| Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean |
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
protected static int uniqueIdCounter
protected int uniqueId
protected SuppleType type
protected java.lang.String textLabel
protected boolean modifiable
protected java.util.Vector hints
protected java.util.Vector constraints
protected boolean runtime
protected transient RenderedView currentView
protected boolean active
protected transient ValueBinding activeValue
protected java.io.Serializable interfaceIdentifier
| Constructor Detail |
public UiObjectImpl(SuppleType type,
java.lang.String label)
type - the type of this elementlabel - a text label| Method Detail |
public java.lang.Object clone()
public boolean isActive()
UiObject
isActive in interface UiObjectpublic void setActive(boolean a)
setActive in interface UiObjecta - new valuepublic void bindActive(ValueBinding value)
value -
public void valueChanged(ValueBinding binding,
java.lang.Object newValue)
ValueListener
valueChanged in interface ValueListenerbinding - newValue - public SuppleType getType()
getType in interface UiObjectpublic RenderedView getView()
getView in interface UiObjectpublic void setView(RenderedView view)
setView in interface UiObjectview - the view that shows this objectpublic boolean isLeaf()
isLeaf in interface UiObjectpublic java.lang.String getTextLabel()
getTextLabel in interface UiObjectpublic boolean hasTextLabel()
hasTextLabel in interface UiObjectprotected void setType(SuppleType t)
public java.io.Serializable getInterfaceIdentifier()
getInterfaceIdentifier in interface UiObjectpublic boolean isRuntime()
isRuntime in interface UiObjectpublic void setRuntime(boolean r)
setRuntime in interface UiObjectpublic boolean isModifiable()
isModifiable in interface UiObjectpublic void addRenderingHint(RenderingHint hint)
addRenderingHint in interface ConstraintManipulationpublic java.util.Vector getRenderingHints()
getRenderingHints in interface ConstraintManipulationpublic void addRenderingConstraint(RenderingConstraint constr)
addRenderingConstraint in interface ConstraintManipulationpublic java.util.Vector getRenderingConstraints()
getRenderingConstraints in interface ConstraintManipulationpublic int hashCode()
hashCode in interface UiObjectObject.hashCode()public boolean equals(java.lang.Object o)
equals in interface UiObjectObject.equals(java.lang.Object)public java.lang.String toString()
toString in interface UiObjectpublic java.lang.String toPrettyString(java.lang.String pref)
toPrettyString in interface UiObject
public static UiObject getCommonAncestor(UiObject o1,
UiObject o2)
o1 - non-null interface objecto2 - non-null interface object
public static java.util.Vector getPath(UiObject source,
UiObject dest)
source - source objectdest - destination object
public static java.util.Vector getBottomUpObjects(UiObject root)
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class SuppleUiObjectHierarchyElementImplpublic void childChanged()
childChanged in interface UiObjectprotected void updateParent()
public int getUniqueId()
getUniqueId in interface UiObjectpublic void accept(UiVisitor visitor)
UiObject
accept in interface UiObjectprotected void acceptBindingVisitor(UiVisitor visitor)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||