|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.builder.AriaBuilder
org.formaria.editor.project.EditorAriaBuilder
public class EditorAriaBuilder
Subclasses the AriaBuilder primarily to listen for the events being registered for components
Copyright (c) Formaria Ltd., 1998-2004
$Revision: 1.37 $ License: see license.txt
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,java.awt.Component> |
componentNames
|
protected java.lang.String |
currentInclude
|
protected EditorProject |
currentProject
|
protected java.lang.String |
currentRepeat
|
protected PageResource |
currentResource
|
protected boolean |
duplicateNamesCorrected
|
protected java.util.Stack<org.formaria.editor.project.EditorAriaBuilder.IncludeReference> |
includeStack
|
protected PageDesigner |
pageDesigner
|
protected java.util.Stack<java.lang.String> |
repeatStack
|
| Fields inherited from class org.formaria.builder.AriaBuilder |
|---|
adapter, attributeSets, checkBoxGroup, componentFactory, currentAttributes, customizer, DEFAULT_PAGE_CLASS, evaluator, eventHandler, includeFileName, layoutHelper, menuBar, packageName, page, rootPage, secondaryClassloader, validationFactories |
| Constructor Summary | |
|---|---|
EditorAriaBuilder(EditorProject project,
StyleFactory stylefact)
Construct a new builder and set a custom StyleFactory |
|
| Method Summary | |
|---|---|
protected java.awt.Component |
addComponent(XmlElement childNode)
Adds an individual component element to the page (this method may be called recursively for nested elements). |
protected void |
addComponents(java.lang.Object page,
XmlElement model)
Adds the elements specified by the Components element and its children |
void |
addHandler(PageSupport page,
java.lang.Object targetComp,
java.lang.String typeStr,
java.lang.String name)
Overrides the super method. |
protected void |
addMenu(PageSupport page,
XmlElement model)
Adds a menu to the application. |
void |
addMenuHandler(PageSupport xpage,
java.lang.String targetStr,
java.lang.String methodStr)
Deprecated. - is this even used? |
protected void |
addValidations(PageSupport page,
XmlElement model)
Adds validation rules to the components |
void |
checkComponentName(java.awt.Component comp)
Check that the component names are not duplicated. |
DataBinding |
getFactoryBinding(PageSupport page,
java.lang.Object compType,
java.util.Hashtable instanceConfig)
Try to get a binding factory to construct the binding |
protected ValidationFactory |
getValidationFactory(java.lang.String validationFileName)
Construct a validation factory appropriate to this builder |
protected PageSupport |
loadClass(java.lang.String className)
Loads a class as the basis for a page. |
protected void |
loadOtherElement(PageSupport page,
XmlElement childNode)
Load any element other than the predefined node types e.g. |
PageSupport |
loadPage(java.lang.String defPackageName,
java.lang.String pageName,
boolean include)
Loads an Page via a reader obtained from the ResourceManager (searches the classpath). |
java.util.Hashtable |
popIncludeReference(java.lang.String includeFileName)
A method that the editor can overload to keep track of includes |
void |
popRepeatReference(java.lang.String repeatReference)
A method that the editor can overload to keep track of repeats |
void |
pushIncludeReference(java.lang.String includeFileName,
java.util.Hashtable store)
A method that the editor can overload to keep track of includes |
void |
pushRepeatReference(java.lang.String repeatReference)
A method that the editor can overload to keep track of repeats |
PageSupport |
readPage(java.io.Reader reader,
java.lang.String pageName,
java.lang.String ext,
boolean include)
Read an XML description of the page and construct a new Page. |
protected void |
setComponentAttributes(java.lang.String compType,
java.lang.Object comp,
java.util.Hashtable attribs)
Iterate through the attributes and set the attributes for a component |
void |
setPageAttribute(java.lang.Object c,
java.lang.String attributeName,
java.lang.String attributeValue)
Get a page attribute (this version does nothing) |
void |
setPageDesigner(PageDesigner designer)
|
protected void |
setPageName(java.lang.String pageName,
java.lang.String ext)
|
protected void |
setResourceBundle(PageSupport page,
java.lang.String attribValue)
Set the name of the page's resource bundle |
| Methods inherited from class org.formaria.builder.AriaBuilder |
|---|
addBinding, addBindings, addEvent, addEvents, addScripts, evaluateAttribute, evaluateAttributeAsString, getCurrentAttributes, getInt, getMenuItem, getType, init, insertAttributes, loadAttributeSet, loadFrames, loadSingleTarget, setAttributeEvaluator, setClassLoader, setPackageName, setPage, setPageExtension, setPageName, setupPage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PageDesigner pageDesigner
protected EditorProject currentProject
protected PageResource currentResource
protected java.util.Stack<org.formaria.editor.project.EditorAriaBuilder.IncludeReference> includeStack
protected java.lang.String currentInclude
protected java.util.Stack<java.lang.String> repeatStack
protected java.lang.String currentRepeat
protected java.util.HashMap<java.lang.String,java.awt.Component> componentNames
protected boolean duplicateNamesCorrected
| Constructor Detail |
|---|
public EditorAriaBuilder(EditorProject project,
StyleFactory stylefact)
stylefact - A custom StyleFactory| Method Detail |
|---|
public void setPageDesigner(PageDesigner designer)
setPageDesigner in interface EditorBuilder
protected void loadOtherElement(PageSupport page,
XmlElement childNode)
loadOtherElement in class AriaBuilderpage - the page currently being loadedchildNode - the xml element to process
protected void setResourceBundle(PageSupport page,
java.lang.String attribValue)
setResourceBundle in class AriaBuilderpage - the page that owns the resourcethe - resource bundle name, minus any extension
public DataBinding getFactoryBinding(PageSupport page,
java.lang.Object compType,
java.util.Hashtable instanceConfig)
getFactoryBinding in class AriaBuildercurrentProject - the current projectpage - the page that will own the bindingcompType - the component typebindingNode - the XML element defining the binding
protected java.awt.Component addComponent(XmlElement childNode)
addComponent in class AriaBuilderchildNode - the XML element containing the component specification.
protected void addComponents(java.lang.Object page,
XmlElement model)
addComponents in class AriaBuilderpage - the new page objectmodel - the Components XML element (and implicitly its children)public void checkComponentName(java.awt.Component comp)
public void pushIncludeReference(java.lang.String includeFileName,
java.util.Hashtable store)
pushIncludeReference in class AriaBuilderincludeFileName - the name of the include file being embeddedstore - the current state prior to the includepublic java.util.Hashtable popIncludeReference(java.lang.String includeFileName)
popIncludeReference in class AriaBuilderincludeFileName - the name of the include file that was embedded
public void pushRepeatReference(java.lang.String repeatReference)
pushRepeatReference in class AriaBuilderpublic void popRepeatReference(java.lang.String repeatReference)
popRepeatReference in class AriaBuilder
public void addHandler(PageSupport page,
java.lang.Object targetComp,
java.lang.String typeStr,
java.lang.String name)
addHandler in class AriaBuilderxpage - The page that contains the response methodstargetComp - the component to which the event handler is addedtypeStr - the type of handlername - the name of the response method
public void addMenuHandler(PageSupport xpage,
java.lang.String targetStr,
java.lang.String methodStr)
xpage - the owner pagetargetStr - the name of the menu/menuItemmethodStr - the name of teh response method
protected void addValidations(PageSupport page,
XmlElement model)
addValidations in class AriaBuilderpage - the pagemodel - the Validations XML element
protected void addMenu(PageSupport page,
XmlElement model)
addMenu in class AriaBuilderpage - the pagemodel - the Menu XML element
protected void setPageName(java.lang.String pageName,
java.lang.String ext)
public PageSupport readPage(java.io.Reader reader,
java.lang.String pageName,
java.lang.String ext,
boolean include)
readPage in interface PageLoaderreadPage in interface EditorBuilderreadPage in class AriaBuilderreader - a input stream from which to read the pagepageName - the name of the pageext - the file extensioninclude - the page to be loaded is being included in another page
protected PageSupport loadClass(java.lang.String className)
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException
loadClass in class AriaBuilderclassName - the full class name
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public PageSupport loadPage(java.lang.String defPackageName,
java.lang.String pageName,
boolean include)
loadPage in interface PageLoaderloadPage in class AriaBuilderdefPackageName - the package or path to the pagepageName - the page name or the name of the class implementing the pageinclude - true if the page to be loaded is being included in another
page in which case any class attribute of the included page is ignoredfullPathProvided - the full path to the page name is provided
public void setPageAttribute(java.lang.Object c,
java.lang.String attributeName,
java.lang.String attributeValue)
AriaBuilder
setPageAttribute in class AriaBuilderc - the component associated with an attributeattributeName - the attribute nameattributeValue - the attribute value
protected void setComponentAttributes(java.lang.String compType,
java.lang.Object comp,
java.util.Hashtable attribs)
setComponentAttributes in class AriaBuildercomp - the componentattribs - the attributes.protected ValidationFactory getValidationFactory(java.lang.String validationFileName)
getValidationFactory in class AriaBuildervalidationFileName - the validations file to read
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||