public class GenericPropertySheet
extends javax.swing.JDialog
implements java.beans.PropertyChangeListener
BeanBox
to
display the properties of a bean that the user has clicked on the map. An
instance of GenericPropertySheet can also be used as a custom editor
component for a bean property that is itself a bean.javax.swing.JDialog.AccessibleJDialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected BeanBox |
beanBox
A GenericPropertySheet can be optionally associated with a BeanBox.
|
protected java.awt.Rectangle |
bounds
contains the rectangular bounds of this GenericPropertySheet.
|
protected java.beans.PropertyEditor |
editor
If an instance of this class is used as a custom editor component of a
bean's property that is itself a bean, this member contains a reference
to the custom editor.
|
protected int |
numEditorsToDisplay
contains the number of editors displayed in this GenericPropertySheet.
|
protected com.bbn.openmap.tools.beanbox.PropertySheetPanel |
panel
contains a reference to an internal panel that displays the bean's
properties.
|
protected java.lang.Object |
targetBean
the bean that this property sheet is associated with.
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
GenericPropertySheet(boolean isModal,
java.lang.Object target,
java.awt.Rectangle bounds,
java.beans.PropertyEditor pe,
BeanBox beanBox)
Constructs a property sheet dialog.
|
GenericPropertySheet(boolean isModal,
java.lang.String title)
Constructs a property sheet dialog.
|
GenericPropertySheet(java.lang.Object target,
int x,
int y,
java.beans.PropertyEditor pe,
BeanBox beanBox)
Constructs a property sheet dialog.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addWindowListener()
adds a window listener to this property sheet.
|
protected com.bbn.openmap.tools.beanbox.PropertySheetPanel |
getPropertySheetPanel()
Returns the JPanel object used to display all the editors in this
property sheet.
|
protected void |
init()
Initializes the background, bounds, title, panel and adds a window
listener.
|
protected void |
initPanel()
Initializes the property sheet panel.
|
protected void |
initTitle()
Initializes the property sheet's title.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Required by interface PropertyChangeListener.
|
protected void |
setFrameSize()
Sets the frame size in order to accommodate all property editors.
|
protected void |
setNumEditorsToDisplay(int numEditorsToDisplay)
Sets the number of editors to be displayed on this property sheet.
|
void |
setTarget(java.lang.Object bean)
Sets the bean associated with this property sheet.
|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected com.bbn.openmap.tools.beanbox.PropertySheetPanel panel
protected java.beans.PropertyEditor editor
protected java.lang.Object targetBean
protected BeanBox beanBox
protected java.awt.Rectangle bounds
protected int numEditorsToDisplay
public GenericPropertySheet(boolean isModal, java.lang.String title)
isModal
- whether the propertysheet should be displayed in a modal
dialog.title
- the title of this propertysheet.public GenericPropertySheet(java.lang.Object target, int x, int y, java.beans.PropertyEditor pe, BeanBox beanBox)
target
- the bean associated with this property sheet.x
- the top-left x position of this property sheet.y
- the top-left y position of this property sheet.beanBox
- the beanBox that this propertysheet is associated with.
This param is usually non-null only if this is a top-level
property-sheet. When this param is non-null, this propertysheet
will inform the BeanBox whenever a property on the bean changes by
calling the beanChanged method on BeanBox. Additionally the
propertysheet will call the editComplete method on the BeanBox
when the user closes the window.public GenericPropertySheet(boolean isModal, java.lang.Object target, java.awt.Rectangle bounds, java.beans.PropertyEditor pe, BeanBox beanBox)
isModal
- whether to display the propertysheet as a modal dialog.target
- the bean property that this class handles.bounds
- the boundaries to usepe
- the parent PropertyEditor of this sheet. An instance of
GenericPropertySheet is invoked from the getCustomEditor method of
pe. The parent editor can be null, in which case this class
behaves exactly as a regular property sheet class.beanBox
- the beanBox that this propertysheet is associated with.
This param is usually non-null only if this is a top-level
property-sheet. When this param is non-null, this propertysheet
will inform the BeanBox whenever a property on the bean changes by
calling the beanChanged method on BeanBox.protected void init()
protected void initPanel()
protected void initTitle()
protected void addWindowListener()
protected com.bbn.openmap.tools.beanbox.PropertySheetPanel getPropertySheetPanel()
protected void setFrameSize()
protected void setNumEditorsToDisplay(int numEditorsToDisplay)
public void setTarget(java.lang.Object bean)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details