Class ALcdBeanCustomizerSW
- All Implemented Interfaces:
ILcdBeanEditor
,ILcdPropertySheet
,ImageObserver
,MenuContainer
,Customizer
,Serializable
,Accessible
Customizer
for editing the properties of a bean. It provides
a complete custom GUI. Therefore you need to create your own subclass of this class,
and implement the abstract method createCustomizer
.
The setObject method takes a bean as a parameter and analyzes it. From that point on, all utility methods like getPropertyDisplayName, getPropertyComponent, ... can be used.
It makes use of a TLcdBeanGUIFactory
instance to perform the bean analysis and
find, for each property, a PropertyEditor
as well as an AWT or Swing
Component
to display and edit the property value.
This ALcdBeanCustomizer
can have a button Panel
with Apply,
OK and Cancel buttons. This can be specified by setting the ButtonPanelVisible
property.
This class can be set to edit the bean itself or to edit a clone of the bean with the
method setEditClone
.
- 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.ALcdBeanCustomizerSW
(boolean aButtonPanelVisible) Deprecated.Constructor with a flag to indicate if the Apply, OK, Cancel button Panel has to be visible or not. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aListener) Deprecated.Registers a listener for the PropertyChange event.protected abstract Component
Deprecated.This method creates aComponent
to edit the bean set bysetObject
.Deprecated.This method generates some useful info when you are in development stage.void
firePropertyChange
(PropertyChangeEvent aPropertyChangeEvent) Deprecated.Fires aPropertyChangeEvent
to all registered PropertyChangeListeners.String[]
Deprecated.Deprecated.Deprecated.getPropertyComponent
(String aPropertyName) Deprecated.getPropertyComponent
(String aPropertyName, boolean aExpandIfPossible) Deprecated.Returns a property component.getPropertyDisplayName
(String aPropertyName) Deprecated.getPropertyLabel
(String aPropertyName) Deprecated.boolean
Deprecated.Tests if the AutoUpdateFromPropertyEditors property istrue
or not.boolean
Deprecated.Tests if the Apply, OK, Cancel buttonPanel
is currently visible or not.boolean
Deprecated.Returns true if this object edits a clone of the bean set bysetObject
, false otherwise.boolean
isPropertyExpandable
(String aPropertyName) Deprecated.boolean
isPropertyNameValid
(String aPropertyName) Deprecated.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 button Panel.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.void
setEditClone
(boolean aEditClone) Deprecated.Set true if you want this object to edit a clone of the bean when usingsetObject
, false otherwise.void
Deprecated.ImplementsCustomizer.setObject()
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.beans.ILcdPropertySheet
getHelpIDString, setHelpIDString
-
Constructor Details
-
ALcdBeanCustomizerSW
public ALcdBeanCustomizerSW()Deprecated.Default constructor. -
ALcdBeanCustomizerSW
public ALcdBeanCustomizerSW(boolean aButtonPanelVisible) Deprecated.Constructor with a flag to indicate if the Apply, OK, Cancel button Panel has to be visible or not. Default istrue
.- Parameters:
aButtonPanelVisible
- true if the panel containing the Apply, OK and Cancel buttons should be displayed.
-
-
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.
-
isEditClone
public boolean isEditClone()Deprecated.Returns true if this object edits a clone of the bean set bysetObject
, false otherwise.- Returns:
- true if this object edits a clone of the bean set by
setObject
, false otherwise.
-
setEditClone
public void setEditClone(boolean aEditClone) Deprecated.Set true if you want this object to edit a clone of the bean when usingsetObject
, false otherwise.- Parameters:
aEditClone
- true if you want this object to edit a clone of the bean when usingsetObject
, false otherwise.
-
getObject
Deprecated.- Specified by:
getObject
in interfaceILcdBeanEditor
-
setObject
Deprecated.ImplementsCustomizer.setObject()
- Specified by:
setObject
in interfaceCustomizer
- Specified by:
setObject
in interfaceILcdBeanEditor
- Parameters:
aObject
- the object to be customized. If isEditClone() the object must have a publicclone()
method, or anIllegalArgumentException
will be thrown.
-
getComponent
Deprecated.- Specified by:
getComponent
in interfaceILcdPropertySheet
-
isButtonPanelVisible
public boolean isButtonPanelVisible()Deprecated.Tests if the Apply, OK, Cancel 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 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 the information of which the listeners should be notified.
-
createCustomizer
Deprecated.This method creates aComponent
to edit the bean set bysetObject
. To facilitate the creation of this gui, a bunch of utility methods are provided (e.g. getPropertyComponent, getPropertyDisplayName, ...). They can only be used aftersetObject
is invoked.There is also a helper class
TLcdBeanPanel
to which these components can be easily added by name. Note that you don't have to use this helper class, but it makes life easier. The most simple implementation of this method is like this:TLcdBeanPanel panel = createNewPanel();
panel.addProperties( this.getAllPropertyNames() );
return panel;- Returns:
- a Component to edit the bean set in setObject.
-
isPropertyNameValid
Deprecated. -
isPropertyExpandable
Deprecated. -
getPropertyComponent
Deprecated. -
getPropertyComponent
Deprecated.Returns a property component. These components are the actual gui modifiers for a certain property (e.g. a text field for a text property, a checkbox for a boolean, a fancy panel with all bells and whistles for your own class, ...). The actual components are retrieved from the with this object associatedfBeanGUIFactory
. A component has two 'modes': expanded or not. Expand if possible is the default. Expanding is only possible for those components that have a button to show up an extra dialog with the actual editor. Expanding means that instead of popping up an extra dialog, the content of that dialog is put in this gui directly. So no popup button is needed.- Parameters:
aPropertyName
- the name of the propertyaExpandIfPossible
- whether or not dialogs behind a button should be included directly.- Returns:
- a component to edit a property.
-
getPropertyLabel
Deprecated. -
getPropertyDisplayName
Deprecated. -
getAllPropertyNames
Deprecated. -
feedBackOnPropertyUsages
Deprecated.This method generates some useful info when you are in development stage. For every component that was never referenced, a line is generated. For every component that was referenced more than once, a line is generated. Call this method after you created your gui, otherwise the reference count will be zero for every property.- Returns:
- information on the specified property descriptors.
-