UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.gesture
Class GestureSetDisplay

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--edu.berkeley.guir.lib.gesture.util.FlowScrollPanel
                                |
                                +--edu.berkeley.guir.lib.gesture.GestureSetDisplay
All Implemented Interfaces:
Accessible, ImageObserver, ItemSelectable, MenuContainer, Observer, Scrollable, Serializable

public class GestureSetDisplay
extends FlowScrollPanel
implements Observer, ItemSelectable

Displays the elements (i.e. GestureCategories) of a GestureSet. Emits an ItemEvent when a Category is (de)selected.

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
protected  EventListenerList itemListenerList
           
 
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
GestureSetDisplay(boolean experimenting)
           
GestureSetDisplay(GestureSet gs)
           
GestureSetDisplay(GestureSet gs, boolean experimenting)
           
 
Method Summary
 void addGestureCategory(GestureCategory gestureCategory)
           
 void addGestureCategory(GestureCategory gestureCategory, boolean showFrame)
          Add a new GestureCategory to the GestureSet, and bring up its corresponding GestureCategoryFrame if showFrame is true.
 void addItemListener(ItemListener l)
           
protected  void fireItemChange(int type, GestureCategoryThumbnail item, int selectState)
           
 GestureCategoryThumbnail getGestureCategoryThumbnail(int gcIndex)
          Note: assumes that our only children are GestureCategoryThumbnails
 GestureSet getGestureSet()
           
 Object[] getSelectedObjects()
          Returns an array of selected GestureCategoryThumbnails or null if none are selected.
 GestureCategory getSelection()
          Return the currently selected GestureCategory (or null if there isn't one).
 GestureCategoryThumbnail getSelectionDisplay()
          Return the GestureCategoryThumbnail corresponding to the current selection (or null if there isn't one).
protected  void initUI()
           
 boolean isOpaque()
           
 boolean isOptimizedDrawingEnabled()
          This component does tile its children
 void removeItemListener(ItemListener l)
           
 void setAuthorsVisible(boolean on)
           
 void setGestureSet(GestureSet gs)
           
 void setSelection(GestureCategoryThumbnail newSelection)
           
 GestureCategoryFrame showCategoryFrame(GestureCategory category)
          Create, display, and raise the corresponding GestureCategoryFrame
 void update(Observable o, Object arg)
          Normally, o is a GestureSet and arg is the GestureCategory that changed
 
Methods inherited from class edu.berkeley.guir.lib.gesture.util.FlowScrollPanel
getPreferredScrollableViewportSize, getPreferredSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, main, setLayout, setScroller
 
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, 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, 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

itemListenerList

protected EventListenerList itemListenerList
Constructor Detail

GestureSetDisplay

public GestureSetDisplay(GestureSet gs)

GestureSetDisplay

public GestureSetDisplay(boolean experimenting)

GestureSetDisplay

public GestureSetDisplay(GestureSet gs,
                         boolean experimenting)
Method Detail

setGestureSet

public void setGestureSet(GestureSet gs)

getGestureSet

public GestureSet getGestureSet()

getGestureCategoryThumbnail

public GestureCategoryThumbnail getGestureCategoryThumbnail(int gcIndex)
Note: assumes that our only children are GestureCategoryThumbnails

update

public void update(Observable o,
                   Object arg)
Normally, o is a GestureSet and arg is the GestureCategory that changed
Specified by:
update in interface Observer

addGestureCategory

public void addGestureCategory(GestureCategory gestureCategory)

addGestureCategory

public void addGestureCategory(GestureCategory gestureCategory,
                               boolean showFrame)
Add a new GestureCategory to the GestureSet, and bring up its corresponding GestureCategoryFrame if showFrame is true.

initUI

protected void initUI()

isOpaque

public boolean isOpaque()
Overrides:
isOpaque in class JComponent

getSelectionDisplay

public GestureCategoryThumbnail getSelectionDisplay()
Return the GestureCategoryThumbnail corresponding to the current selection (or null if there isn't one).

getSelection

public GestureCategory getSelection()
Return the currently selected GestureCategory (or null if there isn't one).

isOptimizedDrawingEnabled

public boolean isOptimizedDrawingEnabled()
This component does tile its children
Overrides:
isOptimizedDrawingEnabled in class JComponent

setSelection

public void setSelection(GestureCategoryThumbnail newSelection)

getSelectedObjects

public Object[] getSelectedObjects()
Returns an array of selected GestureCategoryThumbnails or null if none are selected. Currently, this array will have one element.
Specified by:
getSelectedObjects in interface ItemSelectable

addItemListener

public void addItemListener(ItemListener l)
Specified by:
addItemListener in interface ItemSelectable

removeItemListener

public void removeItemListener(ItemListener l)
Specified by:
removeItemListener in interface ItemSelectable

fireItemChange

protected void fireItemChange(int type,
                              GestureCategoryThumbnail item,
                              int selectState)

showCategoryFrame

public GestureCategoryFrame showCategoryFrame(GestureCategory category)
Create, display, and raise the corresponding GestureCategoryFrame

setAuthorsVisible

public void setAuthorsVisible(boolean on)

Copyright Information