Class TLcdBeanGUIFactory

java.lang.Object
com.luciad.beans.TLcdBeanGUIFactory
All Implemented Interfaces:
ILcdBeanEditor, Serializable

@Deprecated public class TLcdBeanGUIFactory extends Object implements ILcdBeanEditor, Serializable
Deprecated.
Use a UI builder (e.g. Swing) or binding framework instead.
This is a support class to analyze a Bean and build a GUI for editing that bean. The setObject() method analyzes the properties of the given Bean.

After calling that method, the PropertyEditors and PropertyDescriptors are available, as well as Components that are each capable of editing one property taking a corresponding PropertyEditor into account.

If its AutoUpdateFromPropertyEditors property is true, a instance of TLcdBeanGUIFactory will automatically update the bean with the values of its properties stored in the corresponding PropertyEditor (PropertyEditor.getValue()). This update will be done each time one of the PropertyEditor fires a PropertyChangeEvent. Note that only the values that have been changed by their corresponding PropertyEditor will be set (the test will be done using Object.equals()). If the AutoUpdateFromPropertyEditors property is not set, the update of the object properties from the corresponding PropertyEditor can be done manually by calling updateObjectFromPropertyEditors(). in the PropertyEditors.

See Also:
  • Field Details

  • Constructor Details

    • TLcdBeanGUIFactory

      public TLcdBeanGUIFactory()
      Deprecated.
    • TLcdBeanGUIFactory

      public TLcdBeanGUIFactory(Object aObject)
      Deprecated.
  • Method Details

    • setClassTraceOn

      public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then only the informative, warning and error log messages are recorded.
      Parameters:
      aTraceOn - if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
    • isTraceOn

      public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • getSharedBeanGUIFactory

      public static ILcdBeanGUIFactory getSharedBeanGUIFactory()
      Deprecated.
    • setSharedBeanGUIFactory

      public static void setSharedBeanGUIFactory(ILcdBeanGUIFactory aBeanGUIFactory)
      Deprecated.
    • getBeanDescriptor

      public BeanDescriptor getBeanDescriptor()
      Deprecated.
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Deprecated.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
      Deprecated.
    • firePropertyChangeEvent

      protected void firePropertyChangeEvent(PropertyChangeEvent aPropertyChangeEvent)
      Deprecated.
    • hasCustomizer

      public boolean hasCustomizer()
      Deprecated.
    • numberOfProperties

      public static int numberOfProperties(Object aBean)
      Deprecated.
      Gets the number of editable properties of the given Object
    • getCustomizer

      public static Customizer getCustomizer(Object aBean)
      Deprecated.
      Look if the given bean has a Customizer or not.
      Returns:
      a Customizer if the bean has one, or null if not
      See Also:
    • getClassCustomizer

      public static Class getClassCustomizer(Object aBean)
      Deprecated.
      Look if the given bean has a Customizer or not.
      Returns:
      a Class that implements Customizer if the bean has one, or null if not
      See Also:
    • getDisplayName

      public static String getDisplayName(Object aBean)
      Deprecated.
      Try to get the display name of the given Bean
      See Also:
    • getCustomizer

      public Customizer getCustomizer()
      Deprecated.
      Try to get the Customizer of the Bean set with the setObject method
      See Also:
    • setObject

      public void setObject(Object aObject)
      Deprecated.
      Set the bean to be analyzed. Call setObject(aObject,true).
      Specified by:
      setObject in interface ILcdBeanEditor
    • setObject

      public void setObject(Object aObject, boolean withSetValues)
      Deprecated.
      Set the bean to be analyzed.
      Parameters:
      aObject - the bean to be analyzed
      withSetValues - if true, the valid PropertyEditors will receive the property value (PropertyEditor.setValue()). The PropertyEditors, Labels, Components to editing the properties can be get by calling getEditors(), getLabels and getComponent(). Note that some of them might be null.
    • findPropertyEditor

      public static PropertyEditor findPropertyEditor(Object aObject, Object aPropertyValue, PropertyDescriptor aPropertyDescriptor)
      Deprecated.
    • findPropertyEditor

      public static PropertyEditor findPropertyEditor(Object aBean, String aPropertyDisplayName)
      Deprecated.
      Try to find a PropertyEditor for the property named aPropertyDisplayName in the Object aBean.
    • createPropertyEditorComponent

      public static Component createPropertyEditorComponent(PropertyEditor aPropertyEditor, ILcdBeanEditor aBeanEditor)
      Deprecated.
    • filterNonValidPropertyEditors

      public void filterNonValidPropertyEditors()
      Deprecated.
      This method will filter the null PropertyEditors, Labels, and Components generated by the setObject. This method is not called in setObject for performance consideration.
    • updateObjectFromPropertyEditors

      public void updateObjectFromPropertyEditors()
      Deprecated.
      This method will set all the properties of the bean set using setObject, that have been changed by their corresponding PropertyEditor. The test will be done using Object.equals().
      Specified by:
      updateObjectFromPropertyEditors in interface ILcdBeanEditor
    • wasNewClass

      public boolean wasNewClass()
      Deprecated.
      Returns:
      true if the Class of the last bean set using the setObject method is different from the Class of the previous one.
    • getObject

      public Object getObject()
      Deprecated.
      Specified by:
      getObject in interface ILcdBeanEditor
      Returns:
      the last bean set using the setObject method.
    • getPropertyDescriptors

      public PropertyDescriptor[] getPropertyDescriptors()
      Deprecated.
      Returns:
      an array of PropertyDescriptor that have been found by the setObject method. Note that some of the PropertyDescriptor might be null, unless a call of filterNonValidPropertyEditors has been done after the setObject.
    • getPropertyEditors

      public PropertyEditor[] getPropertyEditors()
      Deprecated.
      Returns:
      an array of PropertyEditor that have been found by the setObject method. Note that some of the PropertyEditor might be null, unless a call of filterNonValidPropertyEditors has been done after the setObject.
    • getComponents

      public Component[] getComponents()
      Deprecated.
      Returns:
      an array of Components (for editing the bean properties) that have been found by the setObject method. Note that some of the Components might be null, unless a call of filterNonValidPropertyEditors has been done after the setObject.
    • setAutoUpdateFromPropertyEditors

      public void setAutoUpdateFromPropertyEditors(boolean newAutoUpdateProperties)
      Deprecated.
      When this property if true, the current TLcdBeanGUIFactory will update the properties of its Object bean each time one one of the Object bean PropertyEditor sends a PropertyChangeEvent. The property update is done by calling updateObjectFromPropertyEditors();
      Specified by:
      setAutoUpdateFromPropertyEditors in interface ILcdBeanEditor
    • isAutoUpdateFromPropertyEditors

      public boolean isAutoUpdateFromPropertyEditors()
      Deprecated.
      Tests if this TLcdBeanGUIFactory is in auto update property mode.
      Specified by:
      isAutoUpdateFromPropertyEditors in interface ILcdBeanEditor
      See Also: