| java.lang.Object com.jeta.forms.gui.beans.JETABeanFactory
JETABeanFactory | public class JETABeanFactory (Code) | | This is a factory for creating a JETABean wrapper for a given Swing component
and its associated custom properties. We need this because we want to support
dynamic properties for Swing components. For example, we would like to have a
buttonGroup property for JRadioButtons. This is easier for the user than
having to programmatically manage ButtonGroups. The buttonGroup property will
handle this for the design and runtime systems. Each Swing component can have
different dynamic properties. For example, tabbed panes have tabs while JList
and JTables have scrollBar properties. So, we use this factory to properly
initialize a JETABean for a given Swing component.
author: Jeff Tassin |
Method Summary | |
public static void | clearCustomFactories() | public static JETABean | createBean(String compClass, String compName, boolean instantiateBean, boolean setDefaults) Creates a JETABean wrapper for managing a JavaBean.
Parameters: compClass - the class name of the Java Bean to create (e.g.javax.swing.JButton, javax.swing.JRadioButton, etc.) Parameters: compName - the name to assign to this component by callingComponent.setName Parameters: instantiateBean - set to true if the underlying Java Bean should be instantiatedas well. | public static DynamicBeanInfo | getBeanInfo(Class compClass) Creates a bean info object for the given class. | public static void | registerFactory(String compClass, BeanFactory factory) | public static void | tryRegisterCustomFactory(String compClass, boolean scrollable) This is for custom, imported Java Beans. | public static void | tryRegisterCustomFactory(Class compClass, boolean scrollable) This is for custom, imported Java Beans. |
clearCustomFactories | public static void clearCustomFactories()(Code) | | Removes all custom factories from the cache
|
createBean | public static JETABean createBean(String compClass, String compName, boolean instantiateBean, boolean setDefaults) throws FormException(Code) | | Creates a JETABean wrapper for managing a JavaBean.
Parameters: compClass - the class name of the Java Bean to create (e.g.javax.swing.JButton, javax.swing.JRadioButton, etc.) Parameters: compName - the name to assign to this component by callingComponent.setName Parameters: instantiateBean - set to true if the underlying Java Bean should be instantiatedas well. During deserialization we don't want to do thisbecause the XMLDecoder will create the JavaBean for us. Parameters: setDefaults - sets default properties for the bean. If false, no propertieswill be set (e.g. the text for a JButton) |
registerFactory | public static void registerFactory(String compClass, BeanFactory factory)(Code) | | Registers a factory for the given component class
|
tryRegisterCustomFactory | public static void tryRegisterCustomFactory(String compClass, boolean scrollable) throws FormException(Code) | | This is for custom, imported Java Beans. If those beans extend one of the
standard swing components, then we want to register a factory based on
the standard factory so we can still use any custom properties.
|
tryRegisterCustomFactory | public static void tryRegisterCustomFactory(Class compClass, boolean scrollable) throws FormException(Code) | | This is for custom, imported Java Beans. If those beans extend one of the
standard swing components, then we want to register a factory based on
the standard factory so we can still use any custom properties.
|
|
|