|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.nstyle.JDomParser
public class JDomParser
A parser which produces a Swing component tree based on
a JDOM XML document containing JDisplayObject
elements.
The general alogrithm for setting up the interface, based on the
specification is as follows:
Parse the Actions, putting the IDs of components as placeholders when they
are referred to in an action
Parse the DisplayObjects, putting the IDs of actions as placeholders
Go through each of the actions , and replace the place holders with the
actual display components which they refer to. Also replace
actionID placeholders with the actions the refer to.
Go through each of the display objects and replace the action placeholders
with the actual actions. Also deal with cases where an output component value
is prefixed by a '#' - this means that the data will be retrieved from the
contents of an input component
Constructor Summary | |
---|---|
JDomParser(NStyle n,
Document original,
Document spec,
javax.swing.JDesktopPane desktopPane,
Clock clock)
Construct a JDomParser which will parse the
specified XML document, contributing components to the
specified Swing JDesktopPane . |
Method Summary | |
---|---|
Element |
findElementForID(Element element,
java.lang.String value)
Finds the element in the source document with the unique ID field matching the value "value". |
NMetaData |
getMetadata()
Returns the metadata. |
void |
parse()
Parse the XML document, causing the appropriate components to be added to the top-level Swing container. |
void |
redisplayAll()
Used to apply the stylesheet to data which has just changed so it can be re-displayed on the interface |
void |
setMetadata(NMetaData metadata)
Sets the metadata. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDomParser(NStyle n, Document original, Document spec, javax.swing.JDesktopPane desktopPane, Clock clock)
JDomParser
which will parse the
specified XML document, contributing components to the
specified Swing JDesktopPane
.
interfaceSpecDoc
- frame
- clock
- Method Detail |
---|
public void redisplayAll()
public void parse()
public Element findElementForID(Element element, java.lang.String value)
public NMetaData getMetadata()
public void setMetadata(NMetaData metadata)
metadata
- The metadata to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |