|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.swing.tree.XTreeBinding
public class XTreeBinding
This class provides a means of binding a model node and its children to an XModel node.
Copyright: Copyright (c) Xoetrope Ltd., 2001-2004
$Revision: 2.4 $
License see license.txt
| Field Summary | |
|---|---|
protected javax.swing.JTree |
comp
the bound component |
protected XModelAdapter |
model
the source node |
protected XModel |
outputNode
the output node |
protected java.lang.String |
outputPath
The output path |
protected java.lang.String |
srcPath
The path to the source node |
| Fields inherited from interface net.xoetrope.xui.data.XDataBinding |
|---|
DEFAULT_OUTPUT_PATH |
| Constructor Summary | |
|---|---|
XTreeBinding(javax.swing.JTree c,
XModelAdapter node)
Construct a new data binding |
|
| Method Summary | |
|---|---|
void |
get()
Updates the Tree component 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 component to which this object binds |
java.lang.String |
getSourcePath()
Get the model component to which this object binds |
protected java.lang.String |
getTreePath()
Get the path from the root to the selected node |
void |
set()
Updates the data model with the value retrieved from the TextComponent. |
void |
setOutput(XModel newNode,
java.lang.String outputPath)
Set the output node where state data for this binding will be saved |
void |
setOutputPath(java.lang.String newPath)
Set the model path for the output/state data |
void |
setSource(XModel newNode)
Set the source for this bindings's data |
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 javax.swing.JTree comp
protected XModelAdapter model
protected XModel outputNode
protected java.lang.String srcPath
protected java.lang.String outputPath
| Constructor Detail |
|---|
public XTreeBinding(javax.swing.JTree c,
XModelAdapter node)
c - the JTree component to be boundnode - the model node| 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 void setSourcePath(java.lang.String newPath)
setSourcePath in interface XDataBindingnewPath - the new source pathpublic void setOutputPath(java.lang.String newPath)
setOutputPath in interface XDataBindingnewPath - the new output pathpublic java.lang.String getOutputPath()
getOutputPath in interface XDataBindingpublic void setSource(XModel newNode)
setSource in interface XDataBindingnewNode - the path to the data in the model
public void setOutput(XModel newNode,
java.lang.String outputPath)
setOutput in interface XDataBindingnewNode - the output nodeoutputPath - the output pathprotected java.lang.String getTreePath()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||