|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.data.XDataBinding
net.xoetrope.xui.data.XTextBinding
public class XTextBinding
Bind a TextComponent 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 TextComponents or TextFields.
For a text component the source and destination area synonymous.
Copyright (c) Xoetrope Ltd., 2002-2006. See license.txt for licensing details
| Field Summary | |
|---|---|
protected java.lang.String |
attribStr
|
| Fields inherited from class net.xoetrope.xui.data.XDataBinding |
|---|
component, currentProject, DEFAULT_OUTPUT_PATH, outputModel, outputPath, reevaluate, sourceModel, sourcePath |
| Constructor Summary | |
|---|---|
XTextBinding()
Construct a new data binding |
|
| Method Summary | |
|---|---|
void |
get()
Updates the TextComponent with the value obtained from the data model. |
java.lang.String |
getName()
Gets the name of the model node |
java.lang.String |
getType()
Get the type of this binding |
void |
set()
Updates the data model with the value retrieved from the TextComponent. |
protected void |
setComponentValue(java.lang.String value)
|
protected void |
setModelValue(java.lang.String value)
Code moved from the set method to enable easier overloading. |
void |
setup(XProject project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
Setup and configure the binding instance. |
| Methods inherited from class net.xoetrope.xui.data.XDataBinding |
|---|
getAttributes, getAttributes, getComponent, getOutput, getOutputPath, getReevaluate, getSource, getSourcePath, setOutput, setOutputPath, setReevaluate, setSource, setSourcePath, setupHelper |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String attribStr
| Constructor Detail |
|---|
public XTextBinding()
| Method Detail |
|---|
public void setup(XProject project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
setup in class XDataBindingproject - the owning projectc - the component being boundbindingConfig - the XML element which contains the binding configurationinstanceConfig - the XML element which contains the setup attributes of the binding instancepublic void get()
get in class XDataBindingprotected void setComponentValue(java.lang.String value)
public void set()
set in class XDataBindingprotected void setModelValue(java.lang.String value)
value - the value to be stored in the model.public java.lang.String getName()
public java.lang.String getType()
getType in class XDataBinding
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||