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
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 |
itemListenerList
protected EventListenerList itemListenerList
GestureSetDisplay
public GestureSetDisplay(GestureSet gs)
GestureSetDisplay
public GestureSetDisplay(boolean experimenting)
GestureSetDisplay
public GestureSetDisplay(GestureSet gs,
boolean experimenting)
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)