uci.ui
Class PropSheet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--uci.ui.PropSheet
Direct Known Subclasses:
PropSheetCategory

public class PropSheet
extends JPanel
implements PropertyChangeListener

Class that defines the interface for several different kinds of panels that can edit a group of properties. The only subclass supplied with GEF is PropSheetCategory, but others could be defined.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Field Summary
protected  boolean _autoApply
          True iff every change shold be immeadiatly carried out.
protected  Hashtable _editorsPds
           
protected  boolean _ignorePropChanges
           
protected  long _lastUpdateTime
           
protected  Hashtable _pdsEditors
           
protected  Hashtable _pendingStores
          The changes to that object that have not been carried out yet.
protected  Font _propertiesFont
           
protected  Object _sel
          The object being edited.
protected  String _tabName
          Name used to identify this sheet to the user.
static int MIN_UPDATE
           
 
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
 
Constructor Summary
PropSheet()
           
 
Method Summary
 void apply()
          Take all property changes that have been stored and actually change the state of the selected object.
protected  void applyProperty(PropertyDescriptor pd, Object value)
           
 boolean canEdit(Object item)
           
 Font getPropertiesFont()
           
 String getTabName()
           
 void propertyChange(PropertyChangeEvent e)
          The selected object may have changed one of its properties.
 void revert()
          Abandon any stored changes that have not been applied yet.
 void setAutoApply(boolean aa)
           
 void setPropertiesFont(Font f)
           
 void setSelection(Object s)
           
 void setTabName(String tn)
           
 void setVisible(boolean b)
           
 void store(PropertyDescriptor pd, Object value)
          When the user changes a value in a widget, record that fact until the next apply (which may be done immeadiatly).
 void updateComponent(PropertyDescriptor pd)
           
 void updateComponents()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUIClassID, paramString, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, 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, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, 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, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, 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

_sel

protected Object _sel
The object being edited.

_pendingStores

protected Hashtable _pendingStores
The changes to that object that have not been carried out yet.

_pdsEditors

protected Hashtable _pdsEditors

_editorsPds

protected Hashtable _editorsPds

_autoApply

protected boolean _autoApply
True iff every change shold be immeadiatly carried out.

_ignorePropChanges

protected boolean _ignorePropChanges

_tabName

protected String _tabName
Name used to identify this sheet to the user.

_propertiesFont

protected Font _propertiesFont

_lastUpdateTime

protected long _lastUpdateTime

MIN_UPDATE

public static final int MIN_UPDATE
Constructor Detail

PropSheet

public PropSheet()
Method Detail

setSelection

public void setSelection(Object s)

setAutoApply

public void setAutoApply(boolean aa)

getTabName

public String getTabName()

setTabName

public void setTabName(String tn)

canEdit

public boolean canEdit(Object item)

setVisible

public void setVisible(boolean b)
Overrides:
setVisible in class JComponent

getPropertiesFont

public Font getPropertiesFont()

setPropertiesFont

public void setPropertiesFont(Font f)

store

public void store(PropertyDescriptor pd,
                  Object value)
When the user changes a value in a widget, record that fact until the next apply (which may be done immeadiatly).

apply

public void apply()
Take all property changes that have been stored and actually change the state of the selected object.

applyProperty

protected void applyProperty(PropertyDescriptor pd,
                             Object value)

revert

public void revert()
Abandon any stored changes that have not been applied yet.

updateComponents

public void updateComponents()

updateComponent

public void updateComponent(PropertyDescriptor pd)

propertyChange

public void propertyChange(PropertyChangeEvent e)
The selected object may have changed one of its properties.
Specified by:
propertyChange in interface PropertyChangeListener