Class JSpinnerHandler
- java.lang.Object
-
- org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
-
- org.nuiton.jaxx.compiler.tags.DefaultComponentHandler
-
- org.nuiton.jaxx.compiler.tags.swing.JSpinnerHandler
-
- All Implemented Interfaces:
TagHandler
public class JSpinnerHandler extends DefaultComponentHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJSpinnerHandler.CompiledSpinner-
Nested classes/interfaces inherited from class org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
DefaultObjectHandler.ProxyEventInfo
-
-
Field Summary
Fields Modifier and Type Field Description static StringMAXIMUM_PROPERTYstatic StringMINIMUM_PROPERTYstatic StringVALUE_PROPERTY-
Fields inherited from class org.nuiton.jaxx.compiler.tags.DefaultComponentHandler
ACTION_ICON_ATTRIBUTE, ADD_TO_CONTAINER_ATTRIBUTE, BEAN_SCOPE_ATTRIBUTE, BORDER_ATTRIBUTE, BORDER_FACTORY_PREFIX, CONTAINER_DELEGATE_ATTRIBUTE, FONT_FACE_ATTRIBUTE, FONT_SIZE_ATTRIBUTE, FONT_STYLE_ATTRIBUTE, FONT_WEIGHT_ATTRIBUTE, HEIGHT_ATTRIBUTE, I18N_MNEMONIC_ATTRIBUTE, ICON_ATTRIBUTE, ICON_IMAGE_ATTRIBUTE, log, NAME_ATTRIBUTE, TITLED_BORDER_ATTRIBUTE, TITLED_BORDER_PREFIX, WIDTH_ATTRIBUTE, X_ATTRIBUTE, Y_ATTRIBUTE
-
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 JSpinnerHandler(ClassDescriptor beanClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseComponent(CompiledObject object, Element tag, JAXXCompiler compiler)protected voidconfigureProxyEventInfo()Configures the event handling for members which do not firePropertyChangeEventwhen modified.CompiledObjectcreateCompiledObject(String id, JAXXCompiler compiler)Creates theCompiledObjectwhich will represent the object created by thisTagHandler.ClassDescriptorgetPropertyType(CompiledObject object, String propertyName, JAXXCompiler compiler)Returns the type of the named property.voidsetProperty(CompiledObject object, String name, Object value, JAXXCompiler compiler)Appends Java code to aCompiledObjectin order to implement a property assignment.-
Methods inherited from class org.nuiton.jaxx.compiler.tags.DefaultComponentHandler
compileFirstPass, compileSecondPass, constantValue, getContainerDelegate, getGetPropertyCode, getSetPropertyCode, init, isContainer, isPropertyInherited, openComponent, scanAttributesForDependencies, setAttribute, setDefaults
-
Methods inherited from class org.nuiton.jaxx.compiler.tags.DefaultObjectHandler
addEventHandler, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, applyStylesheets, cleanConstructorParams, compileChildrenFirstPass, compileChildrenSecondPass, compileChildTagFirstPass, compileChildTagSecondPass, convertFromString, getAttributeComparator, getAttributeOrdering, getBeanClass, getEventClass, getEventInfo, getJAXXBeanInfo, getJAXXBeanInfo, getSafeCompiledObject, isEventHandlerName, isMemberBound, registerCompiledObject, safeInit, setAttributeFromCss, setAttributes, toString
-
-
-
-
Field Detail
-
MINIMUM_PROPERTY
public static final String MINIMUM_PROPERTY
- See Also:
- Constant Field Values
-
MAXIMUM_PROPERTY
public static final String MAXIMUM_PROPERTY
- See Also:
- Constant Field Values
-
VALUE_PROPERTY
public static final String VALUE_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JSpinnerHandler
public JSpinnerHandler(ClassDescriptor beanClass)
-
-
Method Detail
-
createCompiledObject
public CompiledObject createCompiledObject(String id, JAXXCompiler compiler) throws CompilerException
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 - Throws:
CompilerException
-
configureProxyEventInfo
protected void configureProxyEventInfo()
Description copied from class:DefaultObjectHandlerConfigures the event handling for members which do not firePropertyChangeEventwhen modified. The default implementation does nothing. Subclasses should override this method to calladdProxyEventInfofor each member which requires special handling.- Overrides:
configureProxyEventInfoin classDefaultComponentHandler
-
getPropertyType
public ClassDescriptor getPropertyType(CompiledObject object, String propertyName, JAXXCompiler compiler) throws CompilerException
Description copied from class:DefaultObjectHandlerReturns the type of the named property. This is the return type of the property'sgetmethod; for instanceJLabel'stextproperty is aString.- Overrides:
getPropertyTypein classDefaultComponentHandler- Parameters:
object- the object being compiledpropertyName- the simple JavaBeans-style name of the propertycompiler- the currentJAXXCompiler- Returns:
- the property's type
- Throws:
CompilerException- if the type cannot be determined
-
setProperty
public void setProperty(CompiledObject object, String name, Object value, JAXXCompiler compiler) throws CompilerException
Description copied from class:DefaultObjectHandlerAppends Java code to aCompiledObjectin order to implement a property assignment.setPropertyis invoked in response to most XML attributes (those which are not more complicated cases, like data bindings or event handlers).By the time it reaches this method, the
valuehas already been converted from its XML string representation to the appropriate destination type for the property (i.e. ifJLabel.foregroundis being set,valuewill be aColor).- Overrides:
setPropertyin classDefaultObjectHandler- Parameters:
object- the object being modifiedname- the name of the property to setvalue- the value to set the property tocompiler- the currentJAXXCompiler- Throws:
CompilerException- if a compilation error occurs
-
closeComponent
protected void closeComponent(CompiledObject object, Element tag, JAXXCompiler compiler) throws CompilerException
- Overrides:
closeComponentin classDefaultComponentHandler- Throws:
CompilerException
-
-