@Deprecated public class TLcdPropertySheetSW extends JPanel 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 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.JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TLcdPropertySheetSW()
Deprecated.
Default constructor.
|
TLcdPropertySheetSW(boolean aButtonPanelVisible)
Deprecated.
Constructor with a flag to indicate if the Apply, OK, Cancel button Panel
has to be visible or not.
|
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. |
TLcdPropertySheetSW(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.
|
ILcdCustomizerComponentBuilder |
getCustomizerComponentBuilder()
Deprecated.
Returns the associated
ILcdCustomizerComponentBuilder . |
String |
getHelpIDString()
Deprecated.
Returns the help id string set by setHelpIDString.
|
Object |
getObject()
Deprecated.
|
boolean |
isAutoUpdateFromPropertyEditors()
Deprecated.
Tests if the AutoUpdateFromPropertyEditors property is
true or not. |
boolean |
isButtonPanelVisible()
Deprecated.
Tests if the Apply, OK, Cancel, Help 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.
|
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, Help 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 |
setCustomizerComponentBuilder(ILcdCustomizerComponentBuilder aCustomizerComponentBuilder)
Deprecated.
Sets the
ILcdCustomizerComponentBuilder associated with this
object. |
void |
setHelpIDString(String aHelpID)
Deprecated.
Sets the help id string for this property sheet.
|
void |
setObject(Object aObject)
Deprecated.
Implements
Customizer.setObject() and ILcdBeanEditor.setObject |
void |
setStringTranslator(ILcdStringTranslator aStringTranslator)
Deprecated.
Sets the
ILcdStringTranslator which will be used to translate the labels in front of the editors. |
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
updateObjectFromPropertyEditors()
Deprecated.
Updates the properties of the bean set, from the values stored in the
corresponding PropertyEditors.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TLcdPropertySheetSW()
public TLcdPropertySheetSW(boolean aButtonPanelVisible)
false
.aButtonPanelVisible
- indicates whether the button button panel should be visible.public TLcdPropertySheetSW(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 TLcdPropertySheetSW(boolean aButtonPanelVisible, PropertyEditor aPropertyEditor)
TLcdPropertySheetSW
( 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 final void setStringTranslator(ILcdStringTranslator aStringTranslator)
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
aStringTranslator
- The string translatorpublic 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
setHelpIDString(java.lang.String)
public void setHelpIDString(String aHelpID)
setHelpIDString
in interface ILcdPropertySheet
aHelpID
- The help id to set.getHelpIDString()
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
addPropertyChangeListener
in class Container
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
removePropertyChangeListener
in class Component
aListener
- the PropertyChange listener to be removed.public void firePropertyChange(PropertyChangeEvent aPropertyChangeEvent)
PropertyChangeEvent
to all registered PropertyChangeListeners.aPropertyChangeEvent
- contains information of which to inform the listeners.public ILcdCustomizerComponentBuilder getCustomizerComponentBuilder()
ILcdCustomizerComponentBuilder
.ILcdCustomizerComponentBuilder
.setCustomizerComponentBuilder(com.luciad.beans.ILcdCustomizerComponentBuilder)
public void setCustomizerComponentBuilder(ILcdCustomizerComponentBuilder aCustomizerComponentBuilder)
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.
aCustomizerComponentBuilder
- The new builder to set.getCustomizerComponentBuilder()
public Component getComponent()
getComponent
in interface ILcdPropertySheet