jaxx.compiler.tags.swing
Class JSpinnerHandler

java.lang.Object
  extended by jaxx.compiler.tags.DefaultObjectHandler
      extended by jaxx.compiler.tags.DefaultComponentHandler
          extended by jaxx.compiler.tags.swing.JSpinnerHandler
All Implemented Interfaces:
TagHandler

public class JSpinnerHandler
extends DefaultComponentHandler


Nested Class Summary
static class JSpinnerHandler.CompiledSpinner
           
 
Nested classes/interfaces inherited from class jaxx.compiler.tags.DefaultObjectHandler
DefaultObjectHandler.ProxyEventInfo
 
Field Summary
static java.lang.String MAXIMUM_PROPERTY
           
static java.lang.String MINIMUM_PROPERTY
           
static java.lang.String VALUE_PROPERTY
           
 
Fields inherited from class jaxx.compiler.tags.DefaultComponentHandler
ACTION_ICON_ATTRIBUTE, CONTAINER_DELEGATE_ATTRIBUTE, FONT_FACE_ATTRIBUTE, FONT_SIZE_ATTRIBUTE, FONT_STYLE_ATTRIBUTE, FONT_WEIGHT_ATTRIBUTE, HEIGHT_ATTRIBUTE, ICON_ATTRIBUTE, log, NAME_ATTRIBUTE, WIDTH_ATTRIBUTE, X_ATTRIBUTE, Y_ATTRIBUTE
 
Fields inherited from class jaxx.compiler.tags.DefaultObjectHandler
ABSTRACT_ATTRIBUTE, CONSTRAINTS_ATTRIBUTE, CONSTRUCTOR_PARAMS_ATTRIBUTE, DECORATOR_ATTRIBUTE, DISPLAYED_MNEMONIC_ATTRIBUTE, DISPLAYED_MNEMONIC_INDEX_ATTRIBUTE, GENERICTYPE_ATTRIBUTE, ID_ATTRIBUTE, IMPLEMENTS_ATTRIBUTE, INITIALIZER_ATTRIBUTE, JAVA_BEAN_ATTRIBUTE, jaxxBeanInfo, LAYOUT_ATTRIBUTE, MNEMONIC_ATTRIBUTE, objectMap, STYLE_CLASS_ATTRIBUTE, SUPER_GENERIC_TYPE_ATTRIBUTE
 
Fields inherited from interface jaxx.compiler.tags.TagHandler
XMLNS_ATTRIBUTE
 
Constructor Summary
JSpinnerHandler(ClassDescriptor beanClass)
           
 
Method Summary
protected  void closeComponent(CompiledObject object, org.w3c.dom.Element tag, JAXXCompiler compiler)
           
protected  void configureProxyEventInfo()
          Configures the event handling for members which do not fire PropertyChangeEvent when modified.
 CompiledObject createCompiledObject(java.lang.String id, JAXXCompiler compiler)
          Creates the CompiledObject which will represent the object created by this TagHandler.
 ClassDescriptor getPropertyType(CompiledObject object, java.lang.String propertyName, JAXXCompiler compiler)
          Returns the type of the named property.
 void setProperty(CompiledObject object, java.lang.String name, java.lang.Object value, JAXXCompiler compiler)
          Appends Java code to a CompiledObject in order to implement a property assignment.
 
Methods inherited from class jaxx.compiler.tags.DefaultComponentHandler
compileFirstPass, compileSecondPass, constantValue, getContainerDelegate, getGetPropertyCode, getSetPropertyCode, init, isContainer, isPropertyInherited, openComponent, scanAttributesForDependencies, setAttribute, setDefaults
 
Methods inherited from class jaxx.compiler.tags.DefaultObjectHandler
addEventHandler, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, applyStylesheets, compileChildrenFirstPass, compileChildrenSecondPass, compileChildTagFirstPass, compileChildTagSecondPass, convertFromString, getAttributeComparator, getAttributeOrdering, getBeanClass, getEventClass, getEventInfo, getJAXXBeanInfo, getJAXXBeanInfo, isEventHandlerName, isMemberBound, registerCompiledObject, safeInit, setAttributes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MINIMUM_PROPERTY

public static java.lang.String MINIMUM_PROPERTY

MAXIMUM_PROPERTY

public static java.lang.String MAXIMUM_PROPERTY

VALUE_PROPERTY

public static java.lang.String VALUE_PROPERTY
Constructor Detail

JSpinnerHandler

public JSpinnerHandler(ClassDescriptor beanClass)
Method Detail

createCompiledObject

public CompiledObject createCompiledObject(java.lang.String id,
                                           JAXXCompiler compiler)
                                    throws CompilerException
Description copied from class: DefaultObjectHandler
Creates the CompiledObject which will represent the object created by this TagHandler.

Overrides:
createCompiledObject in class DefaultObjectHandler
Parameters:
id - the CompiledObject's ID.
compiler - compiler to use
Returns:
the CompiledObject to use
Throws:
CompilerException

configureProxyEventInfo

protected void configureProxyEventInfo()
Description copied from class: DefaultObjectHandler
Configures the event handling for members which do not fire PropertyChangeEvent when modified. The default implementation does nothing. Subclasses should override this method to call addProxyEventInfo for each member which requires special handling.

Overrides:
configureProxyEventInfo in class DefaultComponentHandler

getPropertyType

public ClassDescriptor getPropertyType(CompiledObject object,
                                       java.lang.String propertyName,
                                       JAXXCompiler compiler)
                                throws CompilerException
Description copied from class: DefaultObjectHandler
Returns the type of the named property. This is the return type of the property's get method; for instance JLabel's text property is a String.

Overrides:
getPropertyType in class DefaultComponentHandler
Parameters:
object - the object being compiled
propertyName - the simple JavaBeans-style name of the property
compiler - the current JAXXCompiler
Returns:
the property's type
Throws:
CompilerException - if the type cannot be determined

setProperty

public void setProperty(CompiledObject object,
                        java.lang.String name,
                        java.lang.Object value,
                        JAXXCompiler compiler)
                 throws CompilerException
Description copied from class: DefaultObjectHandler
Appends Java code to a CompiledObject in order to implement a property assignment. setProperty is 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 value has already been converted from its XML string representation to the appropriate destination type for the property (i.e. if JLabel.foreground is being set, value will be a Color).

Overrides:
setProperty in class DefaultObjectHandler
Parameters:
object - the object being modified
name - the name of the property to set
value - the value to set the property to
compiler - the current JAXXCompiler
Throws:
CompilerException - if a compilation error occurs

closeComponent

protected void closeComponent(CompiledObject object,
                              org.w3c.dom.Element tag,
                              JAXXCompiler compiler)
                       throws CompilerException
Overrides:
closeComponent in class DefaultComponentHandler
Throws:
CompilerException


Copyright © 2008-2010 CodeLutin. All Rights Reserved.