| java.lang.Object net.xoetrope.xui.data.XStateBinding
XStateBinding | public class XStateBinding implements XDataBinding(Code) | | Bind a component's state to a data model value/node. The binding allows a
model node to linked to a UI component so that it can be refreshed when new
data is written to the model or conversely when the UI component needs to
write data to the model.
This binding is designed to be used by components such
as RadioButtons or Checkboxes. This state change does not affect the
content displayed by the component.
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
version: $Revision: 1.11 $ |
isLeafNode | protected boolean isLeafNode(Code) | | |
XStateBinding | public XStateBinding(Component c, String dataElement)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model |
XStateBinding | public XStateBinding(Component c, String dataElement, XModel srcModel, String leafAttrib)(Code) | | Construct a new data binding
Parameters: c - the component to be bound Parameters: dataElement - the name of the data in the model Parameters: srcModel - the model node that acts as the data source for this node Parameters: leafAttrib - null or true for a leaf node where the value controls the state,or false to use the child values to control not only the state but also the enabled/disabled state |
get | public void get()(Code) | | Updates the component state with the value obtained from the data model.
|
getComponent | public Component getComponent()(Code) | | Get the component to which this object binds
|
getName | public String getName()(Code) | | Gets the name of the model node
the name |
getOutputPath | public String getOutputPath()(Code) | | Get the model component to which this object binds ins output/state
|
getSourcePath | public String getSourcePath()(Code) | | Get the model component to which this object binds
|
set | public void set()(Code) | | Updates the data model with the value retrieved from the component.
|
setOutput | public void setOutput(XModel newNode)(Code) | | Set the path to the output/state node
Parameters: newPath - the name of the path in the model |
setOutputPath | public void setOutputPath(String newPath)(Code) | | Set the model path for the output/state data
|
setSource | public void setSource(XModel newNode)(Code) | | Set the source node for data in the model
Parameters: newNode - the path of the data in the model |
setSourcePath | public void setSourcePath(String newPath)(Code) | | Set the model path for the source data
|
|
|