Package com.luciad.beans.swing
Class TLcdPropertySheetSW
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.luciad.beans.swing.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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorDescriptionDeprecated.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 asTLcdPropertySheetSW
(PropertyEditor
), with a flag to indicate if the Apply, OK, Cancel buttonPanel
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. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aListener) Deprecated.Registers a listener for the PropertyChange event.void
firePropertyChange
(PropertyChangeEvent aPropertyChangeEvent) Deprecated.Fires aPropertyChangeEvent
to all registered PropertyChangeListeners.Deprecated.Deprecated.Returns the associatedILcdCustomizerComponentBuilder
.Deprecated.Returns the help id string set by setHelpIDString.Deprecated.boolean
Deprecated.Tests if the AutoUpdateFromPropertyEditors property istrue
or not.boolean
Deprecated.Tests if the Apply, OK, Cancel, Help buttonPanel
is currently visible or not.boolean
Deprecated.This method has been deprecated.void
Deprecated.Removes a listener for the PropertyChange event.void
setAutoUpdateFromPropertyEditors
(boolean aBoolean) Deprecated.When this property istrue
, 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 correspondingPropertyEditor
(thePropertyEditor
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.void
setCustomizerComponentBuilder
(ILcdCustomizerComponentBuilder aCustomizerComponentBuilder) Deprecated.Sets theILcdCustomizerComponentBuilder
associated with this object.void
setHelpIDString
(String aHelpID) Deprecated.Sets the help id string for this property sheet.void
Deprecated.ImplementsCustomizer.setObject()
andILcdBeanEditor.setObject
final void
setStringTranslator
(ILcdStringTranslator aStringTranslator) Deprecated.Sets theILcdStringTranslator
which will be used to translate the labels in front of the editors.void
setTraceOn
(boolean aTraceOn) Deprecated.This method has been deprecated.void
Deprecated.Updates the properties of the bean set, from the values stored in the corresponding PropertyEditors.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
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
Methods inherited from class java.awt.Container
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
Methods inherited from class java.awt.Component
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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
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 isfalse
.- Parameters:
aButtonPanelVisible
- indicates whether the button button panel should be visible.
-
TLcdPropertySheetSW
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 returntrue
), 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
Deprecated.Same asTLcdPropertySheetSW
(PropertyEditor
), with a flag to indicate if the Apply, OK, Cancel buttonPanel
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 istrue
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 eithertrue
orfalse
as argument automatically turns off tracing for all other class instances for whichsetTraceOn
has not been called. If the argument isfalse
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.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setStringTranslator
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
Deprecated.- Specified by:
getObject
in interfaceILcdBeanEditor
-
setObject
Deprecated.ImplementsCustomizer.setObject()
andILcdBeanEditor.setObject
- Specified by:
setObject
in interfaceCustomizer
- Specified by:
setObject
in interfaceILcdBeanEditor
- 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 publicclone()
method, or anIllegalArgumentException
will be thrown.
-
getHelpIDString
Deprecated.Returns the help id string set by setHelpIDString.- Specified by:
getHelpIDString
in interfaceILcdPropertySheet
- Returns:
- the help id string set by setHelpIDString.
- See Also:
-
setHelpIDString
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 interfaceILcdPropertySheet
- Parameters:
aHelpID
- The help id to set.- See Also:
-
isButtonPanelVisible
public boolean isButtonPanelVisible()Deprecated.Tests if the Apply, OK, Cancel, Help buttonPanel
is currently visible or not.- Specified by:
isButtonPanelVisible
in interfaceILcdPropertySheet
-
setButtonPanelVisible
public void setButtonPanelVisible(boolean aButtonPanelVisible) Deprecated.Sets the visibility of the Apply, OK, Cancel, Help button Panel.- Specified by:
setButtonPanelVisible
in interfaceILcdPropertySheet
-
isAutoUpdateFromPropertyEditors
public boolean isAutoUpdateFromPropertyEditors()Deprecated.Tests if the AutoUpdateFromPropertyEditors property istrue
or not.- Specified by:
isAutoUpdateFromPropertyEditors
in interfaceILcdBeanEditor
- See Also:
-
setAutoUpdateFromPropertyEditors
public void setAutoUpdateFromPropertyEditors(boolean aBoolean) Deprecated.When this property istrue
, 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 correspondingPropertyEditor
(thePropertyEditor
fires then a PropertyChangeEvent).If this property is
false
, one can make this update manually by calling updateObjectFromPropertyEditors.- Specified by:
setAutoUpdateFromPropertyEditors
in interfaceILcdBeanEditor
- 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 aPropertyEditor
(the bean object is then the value returned byPropertyEditor.getValue()
), thePropertyEditor.setValue()
is called with the updated bean.- Specified by:
updateObjectFromPropertyEditors
in interfaceILcdBeanEditor
- See Also:
-
addPropertyChangeListener
Deprecated.Registers a listener for the PropertyChange event.- Specified by:
addPropertyChangeListener
in interfaceCustomizer
- Specified by:
addPropertyChangeListener
in interfaceILcdPropertySheet
- Overrides:
addPropertyChangeListener
in classContainer
- Parameters:
aListener
- an object to be invoked when a PropertyChange event is fired.
-
removePropertyChangeListener
Deprecated.Removes a listener for the PropertyChange event.- Specified by:
removePropertyChangeListener
in interfaceCustomizer
- Specified by:
removePropertyChangeListener
in interfaceILcdPropertySheet
- Overrides:
removePropertyChangeListener
in classComponent
- Parameters:
aListener
- the PropertyChange listener to be removed.
-
firePropertyChange
Deprecated.Fires aPropertyChangeEvent
to all registered PropertyChangeListeners.- Parameters:
aPropertyChangeEvent
- contains information of which to inform the listeners.
-
getCustomizerComponentBuilder
Deprecated.Returns the associatedILcdCustomizerComponentBuilder
.- Returns:
- the associated
ILcdCustomizerComponentBuilder
. - See Also:
-
setCustomizerComponentBuilder
public void setCustomizerComponentBuilder(ILcdCustomizerComponentBuilder aCustomizerComponentBuilder) Deprecated.Sets theILcdCustomizerComponentBuilder
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.- Parameters:
aCustomizerComponentBuilder
- The new builder to set.- See Also:
-
getComponent
Deprecated.- Specified by:
getComponent
in interfaceILcdPropertySheet
-