|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.data.XLabelBinding
public class XLabelBinding
Bind an XLabel 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. For a label component the source and destination area synonymous.
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected XTextHolder |
comp
The component to which the data is being bound |
protected XModel |
model
|
protected java.lang.String |
srcPath
|
| Fields inherited from interface net.xoetrope.xui.data.XDataBinding |
|---|
DEFAULT_OUTPUT_PATH |
| Constructor Summary | |
|---|---|
XLabelBinding(java.lang.Object c,
java.lang.String dataElement,
XModel srcModel)
Construct a new data binding |
|
| Method Summary | |
|---|---|
void |
get()
Updates the TextComponent with the value obtained from the data model. |
java.lang.Object |
getComponent()
Gets the component on which this binding operates |
java.lang.String |
getName()
Gets the name of the model node |
java.lang.String |
getOutputPath()
Get the model path for the output/state data |
java.lang.String |
getSourcePath()
Get the model path for the source data |
void |
set()
Updates the data model with the value retrieved from the TextComponent. |
void |
setOutput(XModel newNode,
java.lang.String outputPath)
Update the output node used by this adapter. |
void |
setOutputPath(java.lang.String newPath)
Set the model path for the output/state data |
void |
setSource(XModel newNode)
Set the source node for data in the model |
void |
setSourcePath(java.lang.String newPath)
Set the model path for the source data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XTextHolder comp
protected XModel model
protected java.lang.String srcPath
| Constructor Detail |
|---|
public XLabelBinding(java.lang.Object c,
java.lang.String dataElement,
XModel srcModel)
c - the component to be bounddataElement - the name of the data in the modelsrcModel - The model to which the component is to be bound| Method Detail |
|---|
public void get()
get in interface XDataBindingpublic void set()
set in interface XDataBindingpublic java.lang.Object getComponent()
getComponent in interface XDataBindingpublic java.lang.String getName()
public java.lang.String getSourcePath()
getSourcePath in interface XDataBindingpublic java.lang.String getOutputPath()
getOutputPath in interface XDataBindingpublic void setSourcePath(java.lang.String newPath)
setSourcePath in interface XDataBindingnewPath - The path to which the source model is to be boundpublic void setOutputPath(java.lang.String newPath)
setOutputPath in interface XDataBindingnewPath - The path to which the output model is to be boundpublic void setSource(XModel newNode)
setSource in interface XDataBindingnewNode - the path of the data in the model
public void setOutput(XModel newNode,
java.lang.String outputPath)
setOutput in interface XDataBindingnewNode - the new model for saving the output dataoutputPath - The path to which the outputModel is writing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||