|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.data.DataBinding
public abstract class DataBinding
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) Formaria Ltd., 2008
License: see license.txt
| Field Summary | |
|---|---|
protected java.lang.Object |
component
|
protected Project |
currentProject
|
static java.lang.String |
DEFAULT_OUTPUT_PATH
The path to which Aria state information will be output |
protected DataModel |
outputModel
|
protected java.lang.String |
outputPath
|
protected boolean |
reevaluate
|
protected DataModel |
sourceModel
|
protected java.lang.String |
sourcePath
|
| Constructor Summary | |
|---|---|
DataBinding()
|
|
| Method Summary | |
|---|---|
abstract void |
get()
Update the bound component with the value obtained from the data model. |
java.util.Vector |
getAttributes(boolean required)
Get the names of the attributes used by this binding class |
protected java.util.Vector |
getAttributes(boolean required,
java.lang.String[] extraAttribNames)
Get the names of the attributes used by this binding class |
java.lang.Object |
getComponent()
Get the component to which this binding is attached |
DataModel |
getOutput()
Get the output model |
java.lang.String |
getOutputPath()
Get the model path for the output/state data |
boolean |
getReevaluate()
Get the reevaluate flag. |
DataModel |
getSource()
Get the source model |
java.lang.String |
getSourcePath()
Get the model path for the source data |
abstract java.lang.String |
getType()
Get the type of this binding |
abstract void |
set()
Update the data model with the value retrieved from the bound component. |
void |
setOutput(DataModel newNode,
java.lang.String path)
Update the path values stored by this node. |
void |
setOutputPath(java.lang.String newPath)
Set the model path for the output/state data |
void |
setReevaluate(boolean b)
Set the reevaluate flag. |
void |
setSource(DataModel newNode)
Set the source node for data in the model |
void |
setSourcePath(java.lang.String newPath)
Set the model path for the source data |
abstract void |
setup(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
Setup and configure the binding instance. |
protected void |
setupHelper(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
A helper designed to be called by the constructor of each binding to store the common parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Project currentProject
protected java.lang.Object component
protected java.lang.String sourcePath
protected java.lang.String outputPath
protected DataModel sourceModel
protected DataModel outputModel
protected boolean reevaluate
public static final java.lang.String DEFAULT_OUTPUT_PATH
| Constructor Detail |
|---|
public DataBinding()
| Method Detail |
|---|
public abstract void setup(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
project - 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 instance
protected void setupHelper(Project project,
java.lang.Object c,
java.util.Hashtable bindingConfig,
java.util.Hashtable instanceConfig)
project - 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 abstract void get()
public abstract void set()
public java.lang.Object getComponent()
public java.lang.String getSourcePath()
public java.lang.String getOutputPath()
public void setSource(DataModel newNode)
newNode - the path of the data in the model
public void setOutput(DataModel newNode,
java.lang.String path)
newNode - the new model for saving the output datapath - The path to which the outputModel is writing.public DataModel getSource()
public DataModel getOutput()
public void setSourcePath(java.lang.String newPath)
newPath - The path to which the source model is to be boundpublic void setOutputPath(java.lang.String newPath)
newPath - The path to which the output model is to be boundpublic boolean getReevaluate()
public void setReevaluate(boolean b)
b - true if the binding paths are to be reevaluatedpublic java.util.Vector getAttributes(boolean required)
required - true to list only the require attribues, false for all attributes
protected java.util.Vector getAttributes(boolean required,
java.lang.String[] extraAttribNames)
required - true to list only the require attribues, false for all attributesextraAttribNames - the extra attribute names to add to the vectorpublic abstract java.lang.String getType()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||