java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.berkeley.guir.quill.gesturelib.GesturePointsDisplay
edu.berkeley.guir.quill.gesturelib.GestureInteractor
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.Observer, java.io.Serializable
- public class GestureInteractor
- extends GesturePointsDisplay
- implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
Extends GestureDisplay to allow gesture to be entered with the mouse
(or tablet). Emits a ChangeEvent when the Gesture changes. For
performance reasons, this ChangEvent is emitted only when the Gesture
is finished (i.e., on mouse up) not while it's being drawn (i.e,
on mouse motion).
This software is distributed under the
Berkeley Software License.
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Fields inherited from class edu.berkeley.guir.quill.gesturelib.GesturePointsDisplay |
animate, animatePoints, autoCentering, defaultXOffset, defaultYOffset, dotRadius, gesture, isSelected, minDelay, narrowed, normalDelay, preferredSize, restartDelay, showPointsOn, showSelected, timer, validTimings, xoffset, yoffset |
Fields inherited from class java.awt.Container |
|
Methods inherited from class edu.berkeley.guir.quill.gesturelib.GesturePointsDisplay |
centerGesture, getAutoCentering, getGesture, getMinimumSize, getPreferredSize, getSelected, getShowPoints, getShowSelected, isAnimated, paint, setAnimated, setAutoCentering, setGesture, setNarrowed, setOffset, setPreferredSize, setSelected, setShowPoints, setShowSelected, startAnimation, stopAnimation, toggleNarrowed, toggleSelected, update |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
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, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
changeListenerList
protected javax.swing.event.EventListenerList changeListenerList
changeEvent
protected javax.swing.event.ChangeEvent changeEvent
enabled
private boolean enabled
GestureInteractor
public GestureInteractor()
GestureInteractor
public GestureInteractor(Gesture g)
initUI
private void initUI()
setEnabled
public void setEnabled(boolean on)
- Description copied from class:
javax.swing.JComponent
- Set the value of the
enabled
property.
getEnabled
public boolean getEnabled()
mouse1only
boolean mouse1only(java.awt.event.MouseEvent e)
- This works around a bug in AWT that causes the modifiers to sometimes
be 0, not BUTTON1_MASK, when mouse button 1 is pressed.
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse is pressed over a component.
- Specified by:
mousePressed
in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse is released over a component.
- Specified by:
mouseReleased
in interface java.awt.event.MouseListener
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse is clicked (pressed and released
in short succession) on a component.
- Specified by:
mouseClicked
in interface java.awt.event.MouseListener
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseMotionListener
- This method is called when the mouse is moved over a component
while no button is pressed.
- Specified by:
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseMotionListener
- This method is called when the mouse is moved over a component
while a button has been pressed.
- Specified by:
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse enters a component.
- Specified by:
mouseEntered
in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
- Description copied from interface:
java.awt.event.MouseListener
- This method is called when the mouse exits a component.
- Specified by:
mouseExited
in interface java.awt.event.MouseListener
drag_start
public boolean drag_start(java.awt.event.MouseEvent evt,
java.lang.Object user_info)
- This is a holdover from subArctic, which I'm keeping in case I
ever want to extend the event model to be more like it was
drag_feedback
public boolean drag_feedback(java.awt.event.MouseEvent evt,
java.lang.Object user_info)
- This is a holdover from subArctic, which I'm keeping in case I
ever want to extend the event model to be more like it was
drag_end
public boolean drag_end(java.awt.event.MouseEvent evt,
java.lang.Object user_info)
- This is a holdover from subArctic, which I'm keeping in case I
ever want to extend the event model to be more like it was
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener l)
- Adds a ChangeListener
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener l)
- Removes a ChangeListener
fireStateChange
protected void fireStateChange()