@Deprecated public class TLcdPropertySheetAWT extends Object implementsILcdPropertySheet, Customizer
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 buttons. This can be specified by setting the ButtonPanelVisible
property.
This class can be used as a Customizer
or as a PropertyEditor
custom editor.
For a Customizer, the setObject method is used. For a custom editor, the
PropertyEditor
must be set.
TLcdBeanGUIFactory
,
TLcdOkCancelButtonPanel
Constructor and Description |
---|
TLcdPropertySheetAWT()
Deprecated.
Default constructor.
|
TLcdPropertySheetAWT(boolean aButtonPanelVisible)
Deprecated.
Constructor with a flag to indicate if the Apply, OK, Cancel button Panel
has to be visible or not.
|
TLcdPropertySheetAWT(boolean aButtonPanelVisible,
PropertyEditor aPropertyEditor)
Deprecated.
Same as
TLcdPropertySheetAWT ( PropertyEditor ), with a flag
to indicate if the Apply, OK, Cancel button Panel has to be visible or not. |
TLcdPropertySheetAWT(PropertyEditor aPropertyEditor)
Deprecated.
Constructor with a PropertyEditor, when this class needs to be used
as a custom editor for aPropertyEditor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener aListener)
Deprecated.
Registers a listener for the PropertyChange event.
|
void |
firePropertyChange(PropertyChangeEvent aPropertyChangeEvent)
Deprecated.
Fires a
PropertyChangeEvent to all registered PropertyChangeListeners. |
Component |
getComponent()
Deprecated.
|
String |
getHelpIDString()
Deprecated.
|
Object |
getObject()
Deprecated.
|
boolean |
isAutoUpdateFromPropertyEditors()
Deprecated.
Tests if the AutoUpdateFromPropertyEditors property is
true or not. |
boolean |
isButtonPanelVisible()
Deprecated.
Tests if the Apply, OK, Cancel button
Panel is currently visible or not. |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
boolean |
isVisible()
Deprecated.
|
void |
removePropertyChangeListener(PropertyChangeListener aListener)
Deprecated.
Removes a listener for the PropertyChange event.
|
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). |
void |
setButtonPanelVisible(boolean aButtonPanelVisible)
Deprecated.
Sets the visibility of the Apply, OK, Cancel button Panel.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setHelpIDString(String aHelpIDString)
Deprecated.
Sets the help id for this panel.
|
void |
setObject(Object aObject)
Deprecated.
Implements
Customizer.setObject() and ILcdBeanEditor.setObject |
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setVisible(boolean aVisible)
Deprecated.
|
void |
updateObjectFromPropertyEditors()
Deprecated.
Updates the properties of the bean set, from the values stored in the
corresponding PropertyEditors.
|
public TLcdPropertySheetAWT()
public TLcdPropertySheetAWT(boolean aButtonPanelVisible)
false
.aButtonPanelVisible
- indicates whether the button button panel should be visible.public TLcdPropertySheetAWT(PropertyEditor 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.aPropertyEditor
- the property editor to display in this panel.public TLcdPropertySheetAWT(boolean aButtonPanelVisible, PropertyEditor aPropertyEditor)
TLcdPropertySheetAWT
( PropertyEditor
), with a flag
to indicate if the Apply, OK, Cancel button Panel
has to be visible or not.aButtonPanelVisible
- indicates whether the button button panel should be visible.aPropertyEditor
- the property editor to display in this panel.public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
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.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.public boolean isTraceOn()
true
if tracing is enabled for this class.public Object getObject()
getObject
in interface ILcdBeanEditor
public void setObject(Object aObject)
Customizer.setObject()
and ILcdBeanEditor.setObject
setObject
in interface ILcdBeanEditor
setObject
in interface Customizer
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.public String getHelpIDString()
getHelpIDString
in interface ILcdPropertySheet
public void setHelpIDString(String aHelpIDString)
ILcdPropertySheet
setHelpIDString
in interface ILcdPropertySheet
aHelpIDString
- The help id for this panel.public boolean isButtonPanelVisible()
Panel
is currently visible or not.isButtonPanelVisible
in interface ILcdPropertySheet
public void setButtonPanelVisible(boolean aButtonPanelVisible)
setButtonPanelVisible
in interface ILcdPropertySheet
public boolean isAutoUpdateFromPropertyEditors()
true
or not.isAutoUpdateFromPropertyEditors
in interface ILcdBeanEditor
setAutoUpdateFromPropertyEditors(boolean)
public void setAutoUpdateFromPropertyEditors(boolean aBoolean)
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.
setAutoUpdateFromPropertyEditors
in interface ILcdBeanEditor
PropertyEditor.addPropertyChangeListener(java.beans.PropertyChangeListener)
public void updateObjectFromPropertyEditors()
PropertyEditor
(the bean object is then
the value returned by PropertyEditor.getValue()
), the PropertyEditor.setValue()
is called with the updated bean.updateObjectFromPropertyEditors
in interface ILcdBeanEditor
TLcdBeanGUIFactory.updateObjectFromPropertyEditors()
public void addPropertyChangeListener(PropertyChangeListener aListener)
addPropertyChangeListener
in interface ILcdPropertySheet
addPropertyChangeListener
in interface Customizer
aListener
- an object to be invoked when a PropertyChange event is fired.public void removePropertyChangeListener(PropertyChangeListener aListener)
removePropertyChangeListener
in interface ILcdPropertySheet
removePropertyChangeListener
in interface Customizer
aListener
- the PropertyChange listener to be removed.public void firePropertyChange(PropertyChangeEvent aPropertyChangeEvent)
PropertyChangeEvent
to all registered PropertyChangeListeners.aPropertyChangeEvent
- contains the changes of which the listeners should be notified.public Component getComponent()
getComponent
in interface ILcdPropertySheet
public boolean isVisible()
public void setVisible(boolean aVisible)