public class PropertySheet extends JPanel
ExplorerManager
).
For example to display properties of a JavaBean one could use:
Object bean = ...;
JPanel container = ...;
PropertySheet ps = new PropertySheet();
ps.setNodes(new Node[] { new BeanNode
(bean) });
container.add(ps);
Note that this class should be final, but for backward compatibility,
cannot be. Subclassing this class is strongly discouragedJPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static int |
ALWAYS_AS_STRING
Deprecated.
Relic of the original property sheet implementation, useless.
|
protected static Icon |
iAlphaSort
Deprecated.
Presumably noone uses this variable. If you want to customize
the property sheet look you can change the image files directly (or use your
own).
|
protected static Icon |
iCustomize
Deprecated.
Presumably noone uses this variable. If you want to customize
the property sheet look you can change the image files directly (or use your
own).
|
protected static Icon |
iDisplayWritableOnly
Deprecated.
Presumably noone uses this variable. If you want to customize
the property sheet look you can change the image files directly (or use your
own).
|
protected static Icon |
iNoSort
Deprecated.
Presumably noone uses this variable. If you want to customize
the property sheet look you can change the image files directly (or use your
own).
|
protected static Icon |
iTypeSort
Deprecated.
Presumably noone uses this variable. If you want to customize
the property sheet look you can change the image files directly (or use your
own).
|
static int |
PAINTING_PREFERRED
Deprecated.
Relic of the original property sheet implementation, does useless.
|
static String |
PROPERTY_CURRENT_PAGE
Deprecated.
Relic of the original property sheet implementation, , will never be fired.
|
static String |
PROPERTY_DISABLED_PROPERTY_COLOR
Deprecated.
Relic of the original property sheet implementation, , will never be fired.
|
static String |
PROPERTY_DISPLAY_WRITABLE_ONLY
Deprecated.
Relic of the original property sheet implementation, will never be fired.
|
static String |
PROPERTY_PLASTIC
Deprecated.
Relic of the original property sheet implementation, , will never be fired.
|
static String |
PROPERTY_PROPERTY_PAINTING_STYLE
Deprecated.
Relic of the original property sheet implementation, will never be fired.
|
static String |
PROPERTY_SORTING_MODE
Deprecated.
Relic of the original property sheet implementation, will never be fired.
|
static String |
PROPERTY_VALUE_COLOR
Deprecated.
Relic of the original property sheet implementation, will never be fired.
|
static int |
SORTED_BY_NAMES
Constant for by-name sorting mode.
|
static int |
SORTED_BY_TYPES
Deprecated.
Not supported since NetBeans 3.6
|
static int |
STRING_PREFERRED
Deprecated.
Relic of the original property sheet implementation, does useless.
|
static int |
UNSORTED
Constant for unsorted sorting mode.
|
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 |
---|
PropertySheet()
Create a new property sheet
|
Modifier and Type | Method and Description |
---|---|
void |
addNotify() |
protected JPopupMenu |
createPopupMenu()
Subclasses may override this method to create a custom popup menu that will
show on right-click in the property sheet.
|
void |
firePropertyChange(String propertyName,
boolean oldValue,
boolean newValue) |
int |
getCurrentPage()
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
Color |
getDisabledPropertyColor()
Deprecated.
Relic of the original property sheet implementation. Display of properties
is handled by the look and feel.
|
boolean |
getDisplayWritableOnly()
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
boolean |
getPlastic()
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
int |
getPropertyPaintingStyle()
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
protected FeatureDescriptor |
getSelection()
Retrieve currently selected property or PropertySet.
|
int |
getSortingMode()
Get the sorting mode.
|
Color |
getValueColor()
Deprecated.
Relic of the original property sheet implementation. Display of properties
is handled by the look and feel.
|
protected boolean |
isExpanded(FeatureDescriptor fd)
Check if the PropertySet the given property belongs to is expanded or not.
|
boolean |
isQuickSearchAllowed() |
void |
removeNotify() |
void |
requestFocus()
Overridden to route focus requests to the table
|
boolean |
requestFocusInWindow()
Overridden to route focus requests to the table
|
void |
setCurrentPage(int index)
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
boolean |
setCurrentPage(String str)
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
void |
setDescriptionAreaVisible(boolean val)
Set the visibility of the description area.
|
void |
setDisabledPropertyColor(Color color)
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
void |
setDisplayWritableOnly(boolean b)
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
void |
setNodes(Node[] nodes)
Set the nodes explored by this property sheet.
|
void |
setPlastic(boolean plastic)
Deprecated.
Relic of the original property sheet implementation. Display of properties
is handled by the look and feel.
|
void |
setPopupEnabled(boolean val)
Set whether or not the popup menu should be available on
right-click.
|
void |
setPropertyPaintingStyle(int style)
Deprecated.
Relic of the original property sheet implementation. Does nothing.
|
void |
setQuickSearchAllowed(boolean isQuickSearchAllowed)
Allows one to set whether or not the quick search feature should be
enabled on this instance.
|
void |
setSortingMode(int sortingMode)
Set the sorting mode.
|
void |
setValueColor(Color color)
Deprecated.
Relic of the original property sheet implementation. Display of properties
is handled by the look and feel.
|
protected void |
toggleExpanded(FeatureDescriptor fd)
Expand or collapse the PropertySet the given property belongs to.
|
void |
updateUI() |
getAccessibleContext, getUI, getUIClassID, paramString, setUI
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, 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, 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, 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, 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
@Deprecated public static final String PROPERTY_SORTING_MODE
@Deprecated public static final String PROPERTY_VALUE_COLOR
@Deprecated public static final String PROPERTY_DISABLED_PROPERTY_COLOR
@Deprecated public static final String PROPERTY_CURRENT_PAGE
@Deprecated public static final String PROPERTY_PLASTIC
@Deprecated public static final String PROPERTY_PROPERTY_PAINTING_STYLE
@Deprecated public static final String PROPERTY_DISPLAY_WRITABLE_ONLY
@Deprecated public static final int ALWAYS_AS_STRING
@Deprecated public static final int STRING_PREFERRED
@Deprecated public static final int PAINTING_PREFERRED
public static final int UNSORTED
public static final int SORTED_BY_NAMES
@Deprecated public static final int SORTED_BY_TYPES
@Deprecated protected static Icon iNoSort
@Deprecated protected static Icon iAlphaSort
@Deprecated protected static Icon iTypeSort
@Deprecated protected static Icon iDisplayWritableOnly
@Deprecated protected static Icon iCustomize
public void addNotify()
addNotify
in class JComponent
public void removeNotify()
removeNotify
in class JComponent
public boolean isQuickSearchAllowed()
public void setQuickSearchAllowed(boolean isQuickSearchAllowed)
isQuickSearchAllowed
- true if the quick search feature should be
allowed on this instance, false otherwise.public final void setPopupEnabled(boolean val)
val
- If true, right-clicking the property sheet will show a popup
offering sorting options, show/hide description area, etc.public final void setDescriptionAreaVisible(boolean val)
val
- Whether or not it should be visiblepublic void requestFocus()
requestFocus
in class JComponent
public boolean requestFocusInWindow()
requestFocusInWindow
in class JComponent
public void setNodes(Node[] nodes)
nodes
- nodes to be explored or null to clear the sheet@Deprecated public void setPropertyPaintingStyle(int style)
style
- Irrelevant@Deprecated public int getPropertyPaintingStyle()
PropertySheet.setPropertyPaintingStyle(int)
public void setSortingMode(int sortingMode) throws PropertyVetoException
sortingMode
- one of PropertySheet.UNSORTED
or PropertySheet.SORTED_BY_NAMES
. PropertySheet.SORTED_BY_TYPES
is
no longer supported.PropertyVetoException
- if a value other than one of the defined sorting modes is setpublic int getSortingMode()
PropertySheet.setSortingMode(int)
@Deprecated public void setCurrentPage(int index)
index
- index of the page to select@Deprecated public boolean setCurrentPage(String str)
str
- name of the tab to select@Deprecated public int getCurrentPage()
@Deprecated public void setPlastic(boolean plastic)
plastic
- true if so@Deprecated public boolean getPlastic()
true
if so@Deprecated public void setValueColor(Color color)
color
- the new color@Deprecated public Color getValueColor()
@Deprecated public void setDisabledPropertyColor(Color color)
color
- the new color@Deprecated public Color getDisabledPropertyColor()
@Deprecated public void setDisplayWritableOnly(boolean b)
b
- true
if this is desired@Deprecated public boolean getDisplayWritableOnly()
true
if soprotected JPopupMenu createPopupMenu()
protected final boolean isExpanded(FeatureDescriptor fd)
fd
- Property or PropertySet to check.protected final void toggleExpanded(FeatureDescriptor fd)
fd
- protected final FeatureDescriptor getSelection()
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
firePropertyChange
in class JComponent