|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.editor.project.writer.AriaWriter
public class AriaWriter
Write out the XML description of an Aria page.
Copyright: Copyright (c) Formaria Ltd., 2002-2003
| Field Summary | |
|---|---|
protected EditorProject |
currentProject
|
protected java.util.ArrayList<java.lang.String> |
filesWritten
|
protected GuidePane |
guidePane
|
protected ComponentHelper |
helpers
|
protected java.lang.String |
implementingClassName
|
protected PageResource |
includedPageResources
|
protected java.util.Stack<java.lang.String> |
includeStack
|
protected LayoutHelper |
layoutHelper
|
protected java.util.Hashtable |
pageAttribs
|
protected PageResource |
pageResources
|
protected XmlParserFactory |
parserFactory
|
protected java.util.Stack<java.lang.String> |
repeatStack
|
protected Page |
targetPage
|
| Constructor Summary | |
|---|---|
AriaWriter(EditorProject project,
PageResource resources,
GuidePane gp)
Create a new XML writer |
|
| Method Summary | |
|---|---|
protected void |
addPluginProperties(java.lang.Object comp,
XmlElement childXml)
Allow each plugin to add attributes to the pages |
protected void |
addPluginProperties(XmlElement element)
Allow each plugin to add attributes to the pages |
protected void |
addUserProperties(java.lang.Object owner,
XmlElement element,
PropertyHelper helper)
Allow each plugin to add attributes to the pages |
XmlElement |
getBaseElement()
|
java.lang.String |
getXml()
Get the XML for the styles as a String ready for writing to file |
protected boolean |
isIncluded(java.awt.Component comp)
Check if the specified component is a child of the top level include component. |
protected boolean |
isRepeated(java.awt.Component comp)
Check if the specified component is a child of the top level repeat component. |
void |
write(java.io.FileOutputStream fos)
Write the XML definition of the current Aria page |
protected int |
writeBindings(java.awt.Container page,
XmlElement element)
Write out the component data bindings and their attributes. |
protected void |
writeComponents(java.awt.Container page,
XmlElement element)
Write out the components and their attributes |
int |
writeEvent(XmlElement element,
java.lang.String methodName,
java.lang.String target,
java.lang.String handlerName)
Append the XML for an event node |
protected int |
writeEvents(java.awt.Container page,
XmlElement element)
Write out the component events and their attributes |
protected void |
writeGuides(XmlElement element)
Write the guides |
protected void |
writeInclude(java.lang.String pageName,
java.awt.Container page,
XmlElement element)
Write out the components and their attributes in a page to be included |
protected void |
writeLayout(java.lang.Object comp,
XmlElement element)
Write out the layout properties |
protected void |
writeMenu(javax.swing.JMenuBar menuBar,
XmlElement childXml,
javax.swing.JMenu menu)
Write the menus |
protected int |
writeMenuEvents(java.awt.Container page,
javax.swing.JMenu menu,
XmlElement element)
|
protected void |
writeMenus(XmlElement element,
java.awt.Container cont)
Write the menus |
void |
writeProperties(java.lang.Object owner,
XmlElement element,
PropertyHelper helper)
|
protected void |
writeRepeat(java.lang.String expression,
java.awt.Container repeatReferenceComponent,
XmlElement element)
Write out the components and their attributes in a page to be repeated |
protected int |
writeValidations(java.awt.Container page,
XmlElement element)
Append the XML for the validations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Page targetPage
protected PageResource pageResources
protected PageResource includedPageResources
protected java.lang.String implementingClassName
protected EditorProject currentProject
protected ComponentHelper helpers
protected GuidePane guidePane
protected XmlParserFactory parserFactory
protected java.util.Hashtable pageAttribs
protected LayoutHelper layoutHelper
protected java.util.ArrayList<java.lang.String> filesWritten
protected java.util.Stack<java.lang.String> includeStack
protected java.util.Stack<java.lang.String> repeatStack
| Constructor Detail |
|---|
public AriaWriter(EditorProject project,
PageResource resources,
GuidePane gp)
resources - the page to write| Method Detail |
|---|
public void write(java.io.FileOutputStream fos)
throws java.io.IOException
writer - the IO Writer
java.io.IOException
public java.lang.String getXml()
throws java.io.IOException
java.io.IOExceptionpublic XmlElement getBaseElement()
protected void writeComponents(java.awt.Container page,
XmlElement element)
page - element -
public void writeProperties(java.lang.Object owner,
XmlElement element,
PropertyHelper helper)
protected void writeInclude(java.lang.String pageName,
java.awt.Container page,
XmlElement element)
pageName - page - element -
protected void writeRepeat(java.lang.String expression,
java.awt.Container repeatReferenceComponent,
XmlElement element)
expression - repeatReferenceComponent - element -
protected void addUserProperties(java.lang.Object owner,
XmlElement element,
PropertyHelper helper)
element - protected void addPluginProperties(XmlElement element)
element -
protected void addPluginProperties(java.lang.Object comp,
XmlElement childXml)
element -
protected void writeLayout(java.lang.Object comp,
XmlElement element)
page - the target pageelement - the XML element to which the node is added
protected int writeEvents(java.awt.Container page,
XmlElement element)
page - the target pageelement - the XML element to which the node is added
protected int writeMenuEvents(java.awt.Container page,
javax.swing.JMenu menu,
XmlElement element)
public int writeEvent(XmlElement element,
java.lang.String methodName,
java.lang.String target,
java.lang.String handlerName)
element - the parent elementmethod - the response method nametarget - the componentto which the method respondshandlerName - the name/type of event handler to be used
protected int writeValidations(java.awt.Container page,
XmlElement element)
element - the parent elementmethod - the response method nametarget - the componentto which the method respondshandlerName - the name/type of event handler to be used
protected int writeBindings(java.awt.Container page,
XmlElement element)
page - the page being loadedelement - the bindings xml element
protected boolean isIncluded(java.awt.Component comp)
comp - the component to check
protected boolean isRepeated(java.awt.Component comp)
comp - the component to check
protected void writeGuides(XmlElement element)
element - the parent xml element
protected void writeMenus(XmlElement element,
java.awt.Container cont)
element - the parent xml elementcont - the page/container that owns the menu
protected void writeMenu(javax.swing.JMenuBar menuBar,
XmlElement childXml,
javax.swing.JMenu menu)
element - the parent xml elementcont - the page/container that owns the menu
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||