Package jaxx.compiler.tags.swing
Class JRadioButtonHandler
java.lang.Object
jaxx.compiler.tags.DefaultObjectHandler
jaxx.compiler.tags.DefaultComponentHandler
jaxx.compiler.tags.swing.JRadioButtonHandler
- All Implemented Interfaces:
TagHandler
public class JRadioButtonHandler extends DefaultComponentHandler
-
Nested Class Summary
Nested classes/interfaces inherited from class jaxx.compiler.tags.DefaultObjectHandler
DefaultObjectHandler.ProxyEventInfo -
Field Summary
Fields inherited from class jaxx.compiler.tags.DefaultComponentHandler
ACTION_ICON_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_PREFIX, WIDTH_ATTRIBUTE, X_ATTRIBUTE, Y_ATTRIBUTEFields inherited from class 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, ID_ATTRIBUTE, IMPLEMENTS_ATTRIBUTE, INITIALIZER_ATTRIBUTE, JAVA_BEAN_ATTRIBUTE, jaxxBeanInfo, LAYOUT_ATTRIBUTE, MNEMONIC_ATTRIBUTE, objectMap, STYLE_CLASS_ATTRIBUTE, SUPER_GENERIC_TYPE_ATTRIBUTEFields inherited from interface jaxx.compiler.tags.TagHandler
XMLNS_ATTRIBUTE -
Constructor Summary
Constructors Constructor Description JRadioButtonHandler(ClassDescriptor beanClass) -
Method Summary
Modifier and Type Method Description protected voidconfigureProxyEventInfo()Configures the event handling for members which do not firePropertyChangeEventwhen modified.ClassDescriptorgetPropertyType(CompiledObject object, java.lang.String name, JAXXCompiler compiler)Returns the type of the named property.java.lang.StringgetSetPropertyCode(java.lang.String id, java.lang.String name, java.lang.String valueCode, JAXXCompiler compiler)Returns a snippet of Java code which will set an object property at runtime.booleanisMemberBound(java.lang.String name)voidsetProperty(CompiledObject object, java.lang.String name, java.lang.Object value, JAXXCompiler compiler)Appends Java code to aCompiledObjectin order to implement a property assignment.Methods inherited from class jaxx.compiler.tags.DefaultComponentHandler
closeComponent, compileFirstPass, compileSecondPass, constantValue, getContainerDelegate, getGetPropertyCode, init, isContainer, isPropertyInherited, openComponent, scanAttributesForDependencies, setAttribute, setDefaultsMethods inherited from class jaxx.compiler.tags.DefaultObjectHandler
addEventHandler, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, addProxyEventInfo, applyStylesheets, compileChildrenFirstPass, compileChildrenSecondPass, compileChildTagFirstPass, compileChildTagSecondPass, convertFromString, createCompiledObject, getAttributeComparator, getAttributeOrdering, getBeanClass, getEventClass, getEventInfo, getJAXXBeanInfo, getJAXXBeanInfo, isEventHandlerName, registerCompiledObject, safeInit, setAttributeFromCss, setAttributes, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
JRadioButtonHandler
-
-
Method Details
-
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, java.lang.String name, JAXXCompiler compiler) throws CompilerExceptionDescription 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 compiledname- the simple JavaBeans-style name of the propertycompiler- the currentJAXXCompiler- Returns:
- the property's type
- Throws:
CompilerException- if the type cannot be determined
-
isMemberBound
- Overrides:
isMemberBoundin classDefaultObjectHandler- Parameters:
name- name of the property- Returns:
trueif the named member is bound (firesPropertyChangeEventwhen modified). Members are either fields (represented by the simple name of the field) orget/ismethods (represented by the simple name of the method, not the simplified JavaBeans-style name). Methods which are not actually bound in their native class, but for which proxy events have been configured (such asJTextField.getText, returntrue.- Throws:
UnsupportedAttributeException- if attribute is not supported
-
setProperty
public void setProperty(CompiledObject object, java.lang.String name, java.lang.Object value, JAXXCompiler compiler)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, thevaluehas 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
-
getSetPropertyCode
public java.lang.String getSetPropertyCode(java.lang.String id, java.lang.String name, java.lang.String valueCode, JAXXCompiler compiler) throws CompilerExceptionDescription copied from class:DefaultObjectHandlerReturns a snippet of Java code which will set an object property at runtime. Typically the code is just a call to the property'ssetmethod, but it can be arbitrarily complex.- Overrides:
getSetPropertyCodein classDefaultComponentHandler- Parameters:
id- Java code for the object whose property is being setname- the name of the property to setvalueCode- Java expression representing the value to set the property tocompiler- the currentJAXXCompiler- Returns:
- the snippet
- Throws:
CompilerException- if a compilation error occurs
-