Class TabWithValidatorHandler
- java.lang.Object
-
- org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
-
- org.nuiton.jaxx.compiler.tags.swing.TabWithValidatorHandler
-
- All Implemented Interfaces:
TagHandler
public class TabWithValidatorHandler extends DefaultObjectHandler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
DefaultObjectHandler.ProxyEventInfo
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTRIBUTE_BACKGROUNDstatic StringATTRIBUTE_DISABLED_ICONstatic StringATTRIBUTE_DISPLAYED_MNEMONIC_INDEXstatic StringATTRIBUTE_ENABLEDstatic StringATTRIBUTE_FOREGROUNDstatic StringATTRIBUTE_ICONstatic StringATTRIBUTE_IDstatic StringATTRIBUTE_MNEMONICstatic StringATTRIBUTE_TAB_COMPONENTstatic StringATTRIBUTE_TITLEstatic StringATTRIBUTE_TOOL_TIP_TEXTstatic StringATTRIBUTE_VALIDATOR_IDprotected static Map<JAXXCompiler,List<TabInfoWithValidator>>tabsstatic StringTAG_NAME-
Fields inherited from class org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
ABSTRACT_ATTRIBUTE, BORDER_LAYOUT_PREFIX, CONSTRAINTS_ATTRIBUTE, CONSTRUCTOR_PARAMS_ATTRIBUTE, DECORATOR_ATTRIBUTE, DISPLAYED_MNEMONIC_ATTRIBUTE, DISPLAYED_MNEMONIC_INDEX_ATTRIBUTE, GENERIC_TYPE_ATTRIBUTE, GRID_LAYOUT_PREFIX, HANDLER_ATTRIBUTE, I18N_ATTRIBUTE, I18N_PROPERTY_ATTRIBUTE, ID_ATTRIBUTE, IMPLEMENTS_ATTRIBUTE, INITIALIZER_ATTRIBUTE, JAVA_BEAN_ATTRIBUTE, jaxxBeanInfo, LAYOUT_ATTRIBUTE, MNEMONIC_ATTRIBUTE, objectMap, OVERRIDE_PARAMETER, STYLE_CLASS_ATTRIBUTE, SUPER_GENERIC_TYPE_ATTRIBUTE
-
Fields inherited from interface org.nuiton.jaxx.compiler.tags.TagHandler
XMLNS_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description TabWithValidatorHandler(ClassDescriptor beanClass)Creates a newDefaultObjectHandlerwhich provides support for the specified class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompileChildrenFirstPass(Element tag, JAXXCompiler compiler)Compiles the child tags of the current tag.protected voidcompileChildrenSecondPass(Element tag, JAXXCompiler compiler)Compiles the child tags of the current tag.protected voidcompileChildTagFirstPass(Element tag, JAXXCompiler compiler)Compiles a child of the current tag.protected voidcompileChildTagSecondPass(Element tag, JAXXCompiler compiler)Compiles a child of the current tag.voidcompileFirstPass(Element tag, JAXXCompiler compiler)Performs the first pass of compilation on an XML tag from a JAXX source file.voidcompileSecondPass(Element tag, JAXXCompiler compiler)Performs the second pass of compilation on an XML tag from a JAXX source file.protected CompiledObjectcreateCompiledObject(String id, JAXXCompiler compiler)Creates theCompiledObjectwhich will represent the object created by thisTagHandler.static List<TabInfoWithValidator>getTabs(JAXXCompiler compiler)voidsetAttribute(CompiledObject object, String propertyName, String stringValue, boolean inline, JAXXCompiler compiler)Set a single property on an object.static voidsetAttribute(CompiledObject compiledTabInfo, TabInfoWithValidator tabInfo, String name, String value, JAXXCompiler compiler)voidsetAttributes(CompiledObject compiledTabInfo, TabInfo tabInfo, Element tag, JAXXCompiler compiler)-
Methods inherited from class org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
addEventHandler, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, applyStylesheets, cleanConstructorParams, configureProxyEventInfo, constantValue, convertFromString, getAttributeComparator, getAttributeOrdering, getBeanClass, getEventClass, getEventInfo, getGetPropertyCode, getJAXXBeanInfo, getJAXXBeanInfo, getPropertyType, getSafeCompiledObject, getSetPropertyCode, init, isEventHandlerName, isMemberBound, isPropertyInherited, registerCompiledObject, safeInit, scanAttributesForDependencies, setAttributeFromCss, setAttributes, setDefaults, setProperty, toString
-
-
-
-
Field Detail
-
TAG_NAME
public static final String TAG_NAME
- See Also:
- Constant Field Values
-
ATTRIBUTE_ID
public static final String ATTRIBUTE_ID
- See Also:
- Constant Field Values
-
ATTRIBUTE_TITLE
public static final String ATTRIBUTE_TITLE
- See Also:
- Constant Field Values
-
ATTRIBUTE_TOOL_TIP_TEXT
public static final String ATTRIBUTE_TOOL_TIP_TEXT
- See Also:
- Constant Field Values
-
ATTRIBUTE_ICON
public static final String ATTRIBUTE_ICON
- See Also:
- Constant Field Values
-
ATTRIBUTE_ENABLED
public static final String ATTRIBUTE_ENABLED
- See Also:
- Constant Field Values
-
ATTRIBUTE_DISABLED_ICON
public static final String ATTRIBUTE_DISABLED_ICON
- See Also:
- Constant Field Values
-
ATTRIBUTE_MNEMONIC
public static final String ATTRIBUTE_MNEMONIC
- See Also:
- Constant Field Values
-
ATTRIBUTE_DISPLAYED_MNEMONIC_INDEX
public static final String ATTRIBUTE_DISPLAYED_MNEMONIC_INDEX
- See Also:
- Constant Field Values
-
ATTRIBUTE_FOREGROUND
public static final String ATTRIBUTE_FOREGROUND
- See Also:
- Constant Field Values
-
ATTRIBUTE_BACKGROUND
public static final String ATTRIBUTE_BACKGROUND
- See Also:
- Constant Field Values
-
ATTRIBUTE_TAB_COMPONENT
public static final String ATTRIBUTE_TAB_COMPONENT
- See Also:
- Constant Field Values
-
ATTRIBUTE_VALIDATOR_ID
public static final String ATTRIBUTE_VALIDATOR_ID
- See Also:
- Constant Field Values
-
tabs
protected static final Map<JAXXCompiler,List<TabInfoWithValidator>> tabs
-
-
Constructor Detail
-
TabWithValidatorHandler
public TabWithValidatorHandler(ClassDescriptor beanClass)
Creates a newDefaultObjectHandlerwhich provides support for the specified class. The class is not actually introspected until thecompileFirstPass(org.w3c.dom.Element, org.nuiton.jaxx.compiler.JAXXCompiler)method is invoked.- Parameters:
beanClass- the class which this handler supports
-
-
Method Detail
-
setAttribute
public static void setAttribute(CompiledObject compiledTabInfo, TabInfoWithValidator tabInfo, String name, String value, JAXXCompiler compiler) throws CompilerException
- Throws:
CompilerException
-
getTabs
public static List<TabInfoWithValidator> getTabs(JAXXCompiler compiler)
-
compileFirstPass
public void compileFirstPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from interface:TagHandlerPerforms the first pass of compilation on an XML tag from a JAXX source file.TagHandlerimplementations affect the generated.javafile by calling methods in theJAXXCompiler.- Specified by:
compileFirstPassin interfaceTagHandler- Overrides:
compileFirstPassin classDefaultObjectHandler- Parameters:
tag- the XML tag to compilecompiler- the active JAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
createCompiledObject
protected CompiledObject createCompiledObject(String id, JAXXCompiler compiler)
Description copied from class:DefaultObjectHandlerCreates theCompiledObjectwhich will represent the object created by thisTagHandler.- Overrides:
createCompiledObjectin classDefaultObjectHandler- Parameters:
id- theCompiledObject'sID.compiler- compiler to use- Returns:
- the
CompiledObjectto use
-
compileSecondPass
public void compileSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from interface:TagHandlerPerforms the second pass of compilation on an XML tag from a JAXX source file.TagHandlerimplementations affect the generated.javafile by calling methods in theJAXXCompiler.- Specified by:
compileSecondPassin interfaceTagHandler- Overrides:
compileSecondPassin classDefaultObjectHandler- Parameters:
tag- the XML tag to compilecompiler- the active JAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
setAttribute
public void setAttribute(CompiledObject object, String propertyName, String stringValue, boolean inline, JAXXCompiler compiler)
Description copied from class:DefaultObjectHandlerSet a single property on an object. The value may be either a simple value or contain data binding expressions. Simple values are first converted to the property's type usingDefaultObjectHandler.convertFromString(String, String, Class).- Overrides:
setAttributein classDefaultObjectHandler- Parameters:
object- the object on which to set the propertypropertyName- the name of the property to setstringValue- the raw string value of the property from the XMLinline-trueif the value was directly specified as an inline class tag attribute,falseotherwise (a default value, specified in CSS, etc.)compiler- the currentJAXXCompiler
-
setAttributes
public void setAttributes(CompiledObject compiledTabInfo, TabInfo tabInfo, Element tag, JAXXCompiler compiler) throws CompilerException
- Throws:
CompilerException
-
compileChildrenFirstPass
protected void compileChildrenFirstPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from class:DefaultObjectHandlerCompiles the child tags of the current tag. The default implementation invokesDefaultObjectHandler.compileChildTagFirstPass(org.w3c.dom.Element, org.nuiton.jaxx.compiler.JAXXCompiler)for each child tag.- Overrides:
compileChildrenFirstPassin classDefaultObjectHandler- Parameters:
tag- the tag whose children to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileChildTagFirstPass
protected void compileChildTagFirstPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from class:DefaultObjectHandlerCompiles a child of the current tag. The default implementation callsJAXXCompiler.compileFirstPass.- Overrides:
compileChildTagFirstPassin classDefaultObjectHandler- Parameters:
tag- the child tag to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileChildrenSecondPass
protected void compileChildrenSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from class:DefaultObjectHandlerCompiles the child tags of the current tag. The default implementation invokesDefaultObjectHandler.compileChildTagFirstPass(org.w3c.dom.Element, org.nuiton.jaxx.compiler.JAXXCompiler)for each child tag.- Overrides:
compileChildrenSecondPassin classDefaultObjectHandler- Parameters:
tag- the tag whose children to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
compileChildTagSecondPass
protected void compileChildTagSecondPass(Element tag, JAXXCompiler compiler) throws CompilerException, IOException
Description copied from class:DefaultObjectHandlerCompiles a child of the current tag. The default implementation callsJAXXCompiler.compileSecondPass.- Overrides:
compileChildTagSecondPassin classDefaultObjectHandler- Parameters:
tag- the child tag to runcompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occursIOException- if an I/O error occurs
-
-