diva.whiteboard
Class WhiteboardView.SketchInterpreter
java.lang.Object
diva.canvas.interactor.AbstractInteractor
diva.sketch.BasicInterpreter
diva.sketch.MultiStateInterpreter
diva.whiteboard.WhiteboardView.SketchInterpreter
- All Implemented Interfaces:
- LayerListener, LayerMotionListener, Interactor, EventListener
- Enclosing class:
- WhiteboardView
public class WhiteboardView.SketchInterpreter
- extends MultiStateInterpreter
Methods inherited from class diva.sketch.BasicInterpreter |
appendStroke, finishStroke, getController, getCurrentStroke, getCurrentSymbol, isMotionEnabled, mouseEntered, mouseExited, mouseMoved, removeCurrentSymbol, startStroke |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WhiteboardView.SketchInterpreter
public WhiteboardView.SketchInterpreter(SketchController c)
mousePressed
public void mousePressed(LayerEvent evt)
- Description copied from class:
MultiStateInterpreter
- Consume the event so it doesn't get passed down to the * layer
below. Start a Timer for HOLD_TIMEOUT amount of time.
- Specified by:
mousePressed
in interface LayerListener
- Overrides:
mousePressed
in class MultiStateInterpreter
mouseDragged
public void mouseDragged(LayerEvent evt)
- Description copied from class:
MultiStateInterpreter
- Consume the event so it doesn't get passed down to the layer
below.
If the previous event was a mouse press, check to see how far
the cursor has moved. If the distance is >= MIN_DRAG_DISTANCE,
send each stroke listener both a pressed event(_pressedEvent)
and a dragged event (e).
If the previous event was a mouse drag, send the event (e) to
the stroke listeners.
- Specified by:
mouseDragged
in interface LayerListener
- Overrides:
mouseDragged
in class MultiStateInterpreter
mouseReleased
public void mouseReleased(LayerEvent evt)
- Description copied from class:
MultiStateInterpreter
- Consume the event. If the previous event was a mouse press,
start a Timer for CLICK_TIMEOUT amount of time. If the
previous event was a mouse drag, notify stroke listeners of
this mouse released event (e).
- Specified by:
mouseReleased
in interface LayerListener
- Overrides:
mouseReleased
in class MultiStateInterpreter
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.