|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.event.PBasicInputEventHandler
edu.umd.cs.piccolo.event.PDragSequenceEventHandler
public abstract class PDragSequenceEventHandler
PDragSequenceEventHandler is designed to support mouse pressed, dragged, and released interaction sequences. Support is also provided for running a continuous activity during the drag sequence.
PDragSequenceEventHandler should be subclassed by a concrete event handler that implements a particular interaction. See PPanEventHandler, PZoomEventHandler, and PDragEventHandler for examples.
Constructor Summary | |
---|---|
PDragSequenceEventHandler()
|
Method Summary | |
---|---|
protected void |
drag(PInputEvent e)
Subclasses should override this method to get notified of the drag events in a drag sequence. |
protected void |
dragActivityFinalStep(PInputEvent aEvent)
Override this method to get notified when the drag activity stops stepping. |
protected void |
dragActivityFirstStep(PInputEvent aEvent)
Override this method to get notified when the drag activity starts stepping. |
protected void |
dragActivityStep(PInputEvent aEvent)
During a drag sequence an activity is scheduled that runs continuously while the drag sequence is active. |
protected void |
endDrag(PInputEvent e)
Subclasses should override this method to get notified of the end event in a drag sequence. |
protected PActivity |
getDragActivity()
|
double |
getMinDragStartDistance()
|
java.awt.geom.Point2D |
getMousePressedCanvasPoint()
Return the point in canvas coordinates where the mouse was last pressed. |
boolean |
isDragging()
|
void |
mouseDragged(PInputEvent e)
|
void |
mousePressed(PInputEvent e)
|
void |
mouseReleased(PInputEvent e)
|
protected java.lang.String |
paramString()
Returns a string representing the state of this node. |
void |
setIsDragging(boolean isDragging)
|
void |
setMinDragStartDistance(double minDistance)
Set the minimum distance that the mouse should be dragged (in screen coords) before a new drag sequence is initiate. |
protected boolean |
shouldStartDragInteraction(PInputEvent e)
|
protected void |
startDrag(PInputEvent e)
Subclasses should override this method to get notified of the start of a new drag sequence. |
protected void |
startDragActivity(PInputEvent aEvent)
|
protected void |
stopDragActivity(PInputEvent aEvent)
|
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler |
---|
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, processEvent, setEventFilter, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PDragSequenceEventHandler()
Method Detail |
---|
public boolean isDragging()
public void setIsDragging(boolean isDragging)
public double getMinDragStartDistance()
public void setMinDragStartDistance(double minDistance)
public java.awt.geom.Point2D getMousePressedCanvasPoint()
protected void startDrag(PInputEvent e)
protected void drag(PInputEvent e)
protected void endDrag(PInputEvent e)
protected boolean shouldStartDragInteraction(PInputEvent e)
protected PActivity getDragActivity()
protected void startDragActivity(PInputEvent aEvent)
protected void stopDragActivity(PInputEvent aEvent)
protected void dragActivityFirstStep(PInputEvent aEvent)
protected void dragActivityStep(PInputEvent aEvent)
protected void dragActivityFinalStep(PInputEvent aEvent)
public void mousePressed(PInputEvent e)
mousePressed
in class PBasicInputEventHandler
public void mouseDragged(PInputEvent e)
mouseDragged
in class PBasicInputEventHandler
public void mouseReleased(PInputEvent e)
mouseReleased
in class PBasicInputEventHandler
protected java.lang.String paramString()
null
.
paramString
in class PBasicInputEventHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |