|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.ui.options.xml.OptionsPageBuilder
public class OptionsPageBuilder
Instances of this class build options pages from XML descriptors.
| Field Summary | |
|---|---|
static String |
BASE_NAME
Base name used to localize labels and tooltips. |
| Constructor Summary | |
|---|---|
OptionsPageBuilder()
Default constructor. |
|
OptionsPageBuilder(boolean enableEvents)
Initialize this page builder. |
|
| Method Summary | |
|---|---|
List<OptionElement> |
build(OptionDescriptor desc)
Add all the children elements in a page. |
OptionElement |
buildPage(String xmlPath,
String baseName)
Build an option page from the specified XML descriptor. |
OptionElement |
buildPageFromContent(String content,
String baseName)
Build an option page from the specified XML descriptor. |
OptionElement |
buildPageFromURL(String urlString,
String baseName)
Build an option page from an XML descriptor specified as a URL. |
ValueChangeListener |
createListener(OptionDescriptor.ListenerDescriptor listenerDesc)
Create a value change listener from a listener descriptor. |
String |
getBaseName()
Get the base name used to localize labels and tooltips. |
OptionElementFactory |
getFactory()
Get the element factory used by this builder. |
void |
initCommonAttributes(AbstractOptionElement elt,
OptionDescriptor desc)
Initialize the attributes common to all option elements from an option descriptor. |
void |
initCommonOptionAttributes(AbstractOption option,
OptionDescriptor desc)
Initialize the attributes common to all options from an option descriptor. |
boolean |
isEventEnabled()
Determine whether events should be triggered after the component is built. |
void |
setBaseName(String baseName)
Set the base name used to localize labels and tooltips. |
void |
triggerFinalEvents(OptionElement elt)
Trigger all finalizers for all options, before they are disposed. |
void |
triggerInitialEvents(OptionElement elt)
Trigger all initializers for all options, immediately after the page has been built. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BASE_NAME
| Constructor Detail |
|---|
public OptionsPageBuilder()
public OptionsPageBuilder(boolean enableEvents)
enableEvents - determines if events triggering should be performed
once the page is built.| Method Detail |
|---|
public OptionElement buildPageFromContent(String content,
String baseName)
throws Exception
content - the text of the XML document to parse.baseName - the base path where the localization resources are located.
OptionElement instance, or null if the page could not be build.
Exception - if an error was raised while parsing the xml document or building the page.
public OptionElement buildPageFromURL(String urlString,
String baseName)
throws Exception
urlString - the URL of the XML descriptor file.baseName - the base path where the localization resources are located.
OptionsPage instance, or null if the page could not be build.
Exception - if an error was raised while parsing the xml document or building the page.
public OptionElement buildPage(String xmlPath,
String baseName)
throws Exception
xmlPath - the path to the XML descriptor file.baseName - the base path where the localization resources are located.
OptionElement instance, or null if the page could not be build.
Exception - if an error was raised while parsing the xml document or building the page.public void triggerInitialEvents(OptionElement elt)
elt - the root element of the options on which to trigger the events.public void triggerFinalEvents(OptionElement elt)
elt - the root element of the options on which to trigger the events.
public void initCommonAttributes(AbstractOptionElement elt,
OptionDescriptor desc)
throws Exception
elt - the element whose attributes are to be initialized.desc - the descriptor to get the attribute values from.
Exception - if an error was raised while building the page.
public void initCommonOptionAttributes(AbstractOption option,
OptionDescriptor desc)
throws Exception
option - the option whose attributes are to be initialized.desc - the descriptor to get the attribute values from.
Exception - if an error was raised while building the page.
public ValueChangeListener createListener(OptionDescriptor.ListenerDescriptor listenerDesc)
throws Exception
listenerDesc - the listener descriptor to get the listener properties from.
Exception - if an error was raised while building the page.
public List<OptionElement> build(OptionDescriptor desc)
throws Exception
desc - the descriptor for the page.
Exception - if an error was raised while building the page.public OptionElementFactory getFactory()
OptionElementFactory instance.public String getBaseName()
public void setBaseName(String baseName)
baseName - the base name as a string value.public boolean isEventEnabled()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||