Class TLcdPropertySheetSW

All Implemented Interfaces:
ILcdBeanEditor, ILcdPropertySheet, ImageObserver, MenuContainer, Customizer, Serializable, Accessible

@Deprecated public class TLcdPropertySheetSW extends JPanel implements ILcdPropertySheet, Customizer
Deprecated.
Use a UI builder (e.g. Swing) or binding framework instead.
This is a property sheet for editing the properties of a bean. The setObject method takes a bean as a parameter, analyzes it to display all its editable properties.

The setObjectCloner should be used to provide a way to this class to clone the Object and allow canceling the editing process.

It makes use of a TLcdBeanGUIFactory instance to perform the bean analysis and find, for each property, a PropertyEditor as well as an AWT Component to display and edit the property value.

This sheet can have a button Panel with an Apply button and optionally OK and Cancel and help buttons. This can be specified by setting the ButtonPanelVisible property.

The help button will only be displayed if a help id is set. You can set the help id explicitly (setHelpIDString). If no help id is set, the help id of the CustomizerComponentBuilder will be used. The CustomizerComponentBuilder will be used to build the gui part of the Customizer. If this builder is null, or if it fails with any kind of exception, a default layout will be used.

This class can be used as a Customizer or as a PropertyEditor's custom editor. For a Customizer, the setObject method is used. For a custom editor, the PropertyEditor must be set.

See Also:
  • Constructor Details

    • TLcdPropertySheetSW

      public TLcdPropertySheetSW()
      Deprecated.
      Default constructor.
    • TLcdPropertySheetSW

      public TLcdPropertySheetSW(boolean aButtonPanelVisible)
      Deprecated.
      Constructor with a flag to indicate if the Apply, OK, Cancel button Panel has to be visible or not. Default is false.
      Parameters:
      aButtonPanelVisible - indicates whether the button button panel should be visible.
    • TLcdPropertySheetSW

      public TLcdPropertySheetSW(PropertyEditor aPropertyEditor)
      Deprecated.
      Constructor with a PropertyEditor, when this class needs to be used as a custom editor for aPropertyEditor. aPropertyEditor must therefore support custom editor (aPropertyEditor.supportCustomEditor must return true), and aPropertyEditor.getCustomEditor must return an instance of this class that has been instantiated using this constructor.
      Parameters:
      aPropertyEditor - the property editor to display in this panel.
    • TLcdPropertySheetSW

      public TLcdPropertySheetSW(boolean aButtonPanelVisible, PropertyEditor aPropertyEditor)
      Deprecated.
      Same as TLcdPropertySheetSW( PropertyEditor ), with a flag to indicate if the Apply, OK, Cancel button Panel has to be visible or not.
      Parameters:
      aButtonPanelVisible - indicates whether the button button panel should be visible.
      aPropertyEditor - the property editor to display in this panel.
  • 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.
    • setStringTranslator

      public final void setStringTranslator(ILcdStringTranslator aStringTranslator)
      Deprecated.

      Sets the ILcdStringTranslator which will be used to translate the labels in front of the editors.

      Note: the current implementation does not yet use the string translator for all the labels

      Parameters:
      aStringTranslator - The string translator
      Since:
      2015.1.x
    • getObject

      public Object getObject()
      Deprecated.
      Specified by:
      getObject in interface ILcdBeanEditor
    • setObject

      public void setObject(Object aObject)
      Deprecated.
      Implements Customizer.setObject() and ILcdBeanEditor.setObject
      Specified by:
      setObject in interface Customizer
      Specified by:
      setObject in interface ILcdBeanEditor
      Parameters:
      aObject - the object to be customized. If the property sheet is used as a custom editor of a property editor, the object must have a public clone() method, or an IllegalArgumentException will be thrown.
    • getHelpIDString

      public String getHelpIDString()
      Deprecated.
      Returns the help id string set by setHelpIDString.
      Specified by:
      getHelpIDString in interface ILcdPropertySheet
      Returns:
      the help id string set by setHelpIDString.
      See Also:
    • setHelpIDString

      public void setHelpIDString(String aHelpID)
      Deprecated.
      Sets the help id string for this property sheet. The help id will be attached to the help button in the button panel, if the button panel is visible. You can set null (default) to leave the retrieval of the help id to the CustomizerComponentBuilder.
      Specified by:
      setHelpIDString in interface ILcdPropertySheet
      Parameters:
      aHelpID - The help id to set.
      See Also:
    • isButtonPanelVisible

      public boolean isButtonPanelVisible()
      Deprecated.
      Tests if the Apply, OK, Cancel, Help button Panel is currently visible or not.
      Specified by:
      isButtonPanelVisible in interface ILcdPropertySheet
    • setButtonPanelVisible

      public void setButtonPanelVisible(boolean aButtonPanelVisible)
      Deprecated.
      Sets the visibility of the Apply, OK, Cancel, Help button Panel.
      Specified by:
      setButtonPanelVisible in interface ILcdPropertySheet
    • isAutoUpdateFromPropertyEditors

      public boolean isAutoUpdateFromPropertyEditors()
      Deprecated.
      Tests if the AutoUpdateFromPropertyEditors property is true or not.
      Specified by:
      isAutoUpdateFromPropertyEditors in interface ILcdBeanEditor
      See Also:
    • setAutoUpdateFromPropertyEditors

      public void setAutoUpdateFromPropertyEditors(boolean aBoolean)
      Deprecated.
      When this property is true, the property values will be automatically set to the bean set using the setObject method, each time one of its property value has been changed by the corresponding PropertyEditor (the PropertyEditor fires then a PropertyChangeEvent).

      If this property is false, one can make this update manually by calling updateObjectFromPropertyEditors.

      Specified by:
      setAutoUpdateFromPropertyEditors in interface ILcdBeanEditor
      See Also:
    • updateObjectFromPropertyEditors

      public void updateObjectFromPropertyEditors()
      Deprecated.
      Updates the properties of the bean set, from the values stored in the corresponding PropertyEditors. If the bean has been set using a PropertyEditor (the bean object is then the value returned by PropertyEditor.getValue()), the PropertyEditor.setValue() is called with the updated bean.
      Specified by:
      updateObjectFromPropertyEditors in interface ILcdBeanEditor
      See Also:
    • addPropertyChangeListener

      public void addPropertyChangeListener(PropertyChangeListener aListener)
      Deprecated.
      Registers a listener for the PropertyChange event.
      Specified by:
      addPropertyChangeListener in interface Customizer
      Specified by:
      addPropertyChangeListener in interface ILcdPropertySheet
      Overrides:
      addPropertyChangeListener in class Container
      Parameters:
      aListener - an object to be invoked when a PropertyChange event is fired.
    • removePropertyChangeListener

      public void removePropertyChangeListener(PropertyChangeListener aListener)
      Deprecated.
      Removes a listener for the PropertyChange event.
      Specified by:
      removePropertyChangeListener in interface Customizer
      Specified by:
      removePropertyChangeListener in interface ILcdPropertySheet
      Overrides:
      removePropertyChangeListener in class Component
      Parameters:
      aListener - the PropertyChange listener to be removed.
    • firePropertyChange

      public void firePropertyChange(PropertyChangeEvent aPropertyChangeEvent)
      Deprecated.
      Fires a PropertyChangeEvent to all registered PropertyChangeListeners.
      Parameters:
      aPropertyChangeEvent - contains information of which to inform the listeners.
    • getCustomizerComponentBuilder

      public ILcdCustomizerComponentBuilder getCustomizerComponentBuilder()
      Deprecated.
      Returns the associated ILcdCustomizerComponentBuilder.
      Returns:
      the associated ILcdCustomizerComponentBuilder.
      See Also:
    • setCustomizerComponentBuilder

      public void setCustomizerComponentBuilder(ILcdCustomizerComponentBuilder aCustomizerComponentBuilder)
      Deprecated.
      Sets the ILcdCustomizerComponentBuilder associated with this object. It will be used to build the visual Component of this Customizer. If for some reason this builder returns null or throws any kind of exception, a default (internal) builder will be used.

      A builder can have a help id, if the help id was not explicitly set to this property sheet, that help id will be used to attach to the help button of the button panel (if it is visible). If that help id is null (and no help id explicitly set), the help button will not be visible.

      Parameters:
      aCustomizerComponentBuilder - The new builder to set.
      See Also:
    • getComponent

      public Component getComponent()
      Deprecated.
      Specified by:
      getComponent in interface ILcdPropertySheet