|
||||||||||
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
edu.umd.cs.piccolo.event.PPanEventHandler
public class PPanEventHandler
PPanEventHandler provides event handlers for basic panning of the canvas view with the left mouse. The interaction is that clicking and dragging the mouse translates the view so that the point on the surface stays under the mouse.
Constructor Summary | |
---|---|
PPanEventHandler()
Constructs a Pan Event Handler that will by default perform auto-panning. |
Method Summary | |
---|---|
protected void |
drag(PInputEvent event)
Updates the view in response to a user initiated drag event. |
protected void |
dragActivityStep(PInputEvent event)
Performs auto-panning if enabled, even when the mouse is not moving. |
boolean |
getAutopan()
Returns whether the auto-panning functoinality is enabled. |
double |
getMaxAutoPanSpeed()
Returns the maxAutoPan speed in pixels per second. |
double |
getMinAutoPanSpeed()
Returns the minAutoPan speed in pixels per second. |
protected void |
pan(PInputEvent event)
Pans the camera in response to the pan event provided. |
void |
setAutopan(boolean autopan)
Determines if auto-panning will occur or not. |
void |
setMaxAutopanSpeed(double maxAutopanSpeed)
Set the maxAutoPan speed in pixels per second. |
void |
setMinAutopanSpeed(double minAutopanSpeed)
Set the minAutoPan speed in pixels per second. |
protected double |
validatePanningSpeed(double delta)
Clips the panning speed to the minimum and maximum auto-pan speeds assigned. |
Methods inherited from class edu.umd.cs.piccolo.event.PDragSequenceEventHandler |
---|
dragActivityFinalStep, dragActivityFirstStep, endDrag, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, mouseReleased, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDrag, startDragActivity, stopDragActivity |
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler |
---|
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PPanEventHandler()
Method Detail |
---|
protected void drag(PInputEvent event)
drag
in class PDragSequenceEventHandler
event
- event responsible for the dragprotected void pan(PInputEvent event)
event
- contains details about the drag used to translate the viewpublic void setAutopan(boolean autopan)
autopan
- true if auto-panning functionality will be activepublic boolean getAutopan()
public void setMinAutopanSpeed(double minAutopanSpeed)
minAutopanSpeed
- number of pixels to assign as the minimum the
autopan feature can pan the viewpublic void setMaxAutopanSpeed(double maxAutopanSpeed)
maxAutopanSpeed
- number of pixels to assign as the maximum the
autopan feature can pan the viewpublic double getMinAutoPanSpeed()
public double getMaxAutoPanSpeed()
protected void dragActivityStep(PInputEvent event)
dragActivityStep
in class PDragSequenceEventHandler
event
- current drag relevant details about the drag activityprotected double validatePanningSpeed(double delta)
delta
- auto-pan delta to be clipped
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |