net.xoetrope.xui.data
Interface XDataBinding

All Known Implementing Classes:
XLabelBinding, XListBinding, XListTableBinding, XLocalisedListBinding, XRadioBinding, XStateBinding, XTableTableBinding, XTextBinding, XTextTableBinding, XTreeBinding

public interface XDataBinding

Describes an interface used to allow components to be updated when a data model changes and to allow the model to be updated when the user interface elements change.

Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt


Field Summary
static java.lang.String DEFAULT_OUTPUT_PATH
          The path to which XUI state information will be output
 
Method Summary
 void get()
          Update the bound component with the value obtained from the data model.
 java.lang.Object getComponent()
          Get the component to which this binding is attached
 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()
          Update the data model with the value retrieved from the bound component.
 void setOutput(XModel newModel, java.lang.String outputPath)
          Update the path values stored by this node.
 void setOutputPath(java.lang.String newPath)
          Set the model path for the output/state data
 void setSource(XModel newNode)
          Update the model node used in the binding.
 void setSourcePath(java.lang.String newPath)
          Set the model path for the source data
 

Field Detail

DEFAULT_OUTPUT_PATH

static final java.lang.String DEFAULT_OUTPUT_PATH
The path to which XUI state information will be output

See Also:
Constant Field Values
Method Detail

get

void get()
Update the bound component with the value obtained from the data model.


set

void set()
Update the data model with the value retrieved from the bound component.


getComponent

java.lang.Object getComponent()
Get the component to which this binding is attached

Returns:
The component which is being bound

getSourcePath

java.lang.String getSourcePath()
Get the model path for the source data

Returns:
The raw path to which the source model is bound

getOutputPath

java.lang.String getOutputPath()
Get the model path for the output/state data

Returns:
The raw path to which the output model is bound

setSourcePath

void setSourcePath(java.lang.String newPath)
Set the model path for the source data

Parameters:
newPath - The path to which the source model is to be bound

setOutputPath

void setOutputPath(java.lang.String newPath)
Set the model path for the output/state data

Parameters:
newPath - The path to which the output model is to be bound

setSource

void setSource(XModel newNode)
Update the model node used in the binding. Note that this method does not modify the path values stored by this node.

Parameters:
newNode - the new model for the data source

setOutput

void setOutput(XModel newModel,
               java.lang.String outputPath)
Update the path values stored by this node. The output path is used to store selection data and state.

Parameters:
newModel - the new model for saving the output data
outputPath - The path to which the outputModel is writing.