org.openide.explorer.propertysheet
Class PropertySheet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.openide.explorer.propertysheet.PropertySheet
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
PropertySheetView

public class PropertySheet
extends JPanel

Implements a "property sheet" for a set of selected beans.

PropertyProperty TypeDescription
paintingStyle int style of painting properties (ALWAYS_AS_STRING, STRING_PREFERRED, PAINTING_PREFERRED)
currentPage int currently showed page (e.g. properties, expert, events)
expert boolean expert mode as in the JavaBeans specifications

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent
 
Field Summary
static int ALWAYS_AS_STRING
          Constant for showing properties as a string always.
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
          Constant for preferably painting property values.
static String PROPERTY_CURRENT_PAGE
          Property with the current page index.
static String PROPERTY_DISABLED_PROPERTY_COLOR
          Property giving current disabled property color.
static String PROPERTY_DISPLAY_WRITABLE_ONLY
          Property for whether only writable properties should be displayed.
static String PROPERTY_PLASTIC
          Property for "plastic" mode.
static String PROPERTY_PROPERTY_PAINTING_STYLE
          Property for the painting style.
static String PROPERTY_SORTING_MODE
          Property giving current sorting mode.
static String PROPERTY_VALUE_COLOR
          Property giving current value color.
static int SORTED_BY_NAMES
          Constant for by-name sorting mode.
static int SORTED_BY_TYPES
          Constant for by-type sorting mode.
static int STRING_PREFERRED
          Constant for preferably showing properties as string.
static int UNSORTED
          Constant for unsorted sorting mode.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
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
PropertySheet()
           
 
Method Summary
 int getCurrentPage()
          Get the currently selected page.
 Color getDisabledPropertyColor()
          Get the foreground color of disabled properties.
 boolean getDisplayWritableOnly()
          Test whether only writable properties are currently displayed.
 boolean getPlastic()
          Test whether buttons in sheet are plastic.
 int getPropertyPaintingStyle()
          Get property paint mode.
 int getSortingMode()
          Get the sorting mode.
 Color getValueColor()
          Get the foreground color of values.
 void setCurrentPage(int index)
          Set the currently selected page.
 boolean setCurrentPage(String str)
          Set the currently selected page.
 void setDisabledPropertyColor(Color color)
          Set the foreground color of disabled properties.
 void setDisplayWritableOnly(boolean b)
          Set whether only writable properties are displayed.
 void setNodes(Node[] node)
          Set the nodes explored by this property sheet.
 void setPlastic(boolean plastic)
          Set whether buttons in sheet should be plastic.
 void setPropertyPaintingStyle(int style)
          Set property paint mode.
 void setSortingMode(int sortingMode)
          Set the sorting mode.
 void setValueColor(Color color)
          Set the foreground color of values.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_SORTING_MODE

public static final String PROPERTY_SORTING_MODE
Property giving current sorting mode.

PROPERTY_VALUE_COLOR

public static final String PROPERTY_VALUE_COLOR
Property giving current value color.

PROPERTY_DISABLED_PROPERTY_COLOR

public static final String PROPERTY_DISABLED_PROPERTY_COLOR
Property giving current disabled property color.

PROPERTY_CURRENT_PAGE

public static final String PROPERTY_CURRENT_PAGE
Property with the current page index.

PROPERTY_PLASTIC

public static final String PROPERTY_PLASTIC
Property for "plastic" mode.

PROPERTY_PROPERTY_PAINTING_STYLE

public static final String PROPERTY_PROPERTY_PAINTING_STYLE
Property for the painting style.

PROPERTY_DISPLAY_WRITABLE_ONLY

public static final String PROPERTY_DISPLAY_WRITABLE_ONLY
Property for whether only writable properties should be displayed.

ALWAYS_AS_STRING

public static final int ALWAYS_AS_STRING
Constant for showing properties as a string always.

STRING_PREFERRED

public static final int STRING_PREFERRED
Constant for preferably showing properties as string.

PAINTING_PREFERRED

public static final int PAINTING_PREFERRED
Constant for preferably painting property values.

UNSORTED

public static final int UNSORTED
Constant for unsorted sorting mode.

SORTED_BY_NAMES

public static final int SORTED_BY_NAMES
Constant for by-name sorting mode.

SORTED_BY_TYPES

public static final int SORTED_BY_TYPES
Constant for by-type sorting mode.

iNoSort

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).

Icon for the toolbar.

iAlphaSort

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).

Icon for the toolbar.

iTypeSort

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).

Icon for the toolbar.

iDisplayWritableOnly

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).

Icon for the toolbar.

iCustomize

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).

Icon for the toolbar.
Constructor Detail

PropertySheet

public PropertySheet()
Method Detail

setNodes

public void setNodes(Node[] node)
Set the nodes explored by this property sheet.
Parameters:
node - nodes to be explored

setPropertyPaintingStyle

public void setPropertyPaintingStyle(int style)
Set property paint mode.
Parameters:
style - one of ALWAYS_AS_STRING, STRING_PREFERRED, or PAINTING_PREFERRED

getPropertyPaintingStyle

public int getPropertyPaintingStyle()
Get property paint mode.
Returns:
the mode
See Also:
setPropertyPaintingStyle(int)

setSortingMode

public void setSortingMode(int sortingMode)
                    throws PropertyVetoException
Set the sorting mode.
Parameters:
sortingMode - one of UNSORTED, SORTED_BY_NAMES, SORTED_BY_TYPES

getSortingMode

public int getSortingMode()
Get the sorting mode.
Returns:
the mode
See Also:
setSortingMode(int)

setCurrentPage

public void setCurrentPage(int index)
Set the currently selected page.
Parameters:
index - index of the page to select

setCurrentPage

public boolean setCurrentPage(String str)
Set the currently selected page.
Parameters:
str - name of the tab to select

getCurrentPage

public int getCurrentPage()
Get the currently selected page.
Returns:
index of currently selected page

setPlastic

public void setPlastic(boolean plastic)
Set whether buttons in sheet should be plastic.
Parameters:
plastic - true if so

getPlastic

public boolean getPlastic()
Test whether buttons in sheet are plastic.
Returns:
true if so

setValueColor

public void setValueColor(Color color)
Set the foreground color of values.
Parameters:
color - the new color

getValueColor

public Color getValueColor()
Get the foreground color of values.
Returns:
the color

setDisabledPropertyColor

public void setDisabledPropertyColor(Color color)
Set the foreground color of disabled properties.
Parameters:
color - the new color

getDisabledPropertyColor

public Color getDisabledPropertyColor()
Get the foreground color of disabled properties.
Returns:
the color

setDisplayWritableOnly

public void setDisplayWritableOnly(boolean b)
Set whether only writable properties are displayed.
Parameters:
b - true if this is desired

getDisplayWritableOnly

public boolean getDisplayWritableOnly()
Test whether only writable properties are currently displayed.
Returns:
true if so


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.