public class PPanEventHandler extends PDragSequenceEventHandler
Constructor and Description |
---|
PPanEventHandler()
Constructs a Pan Event Handler that will by default perform auto-panning.
|
Modifier and Type | Method and Description |
---|---|
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.
|
dragActivityFinalStep, dragActivityFirstStep, endDrag, getDragActivity, getMinDragStartDistance, getMousePressedCanvasPoint, isDragging, mouseDragged, mousePressed, mouseReleased, setIsDragging, setMinDragStartDistance, shouldStartDragInteraction, startDrag, startDragActivity, stopDragActivity
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelRotated, mouseWheelRotatedByBlock, processEvent, setEventFilter
public PPanEventHandler()
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 clippedCopyright © 1995-2013 Piccolo2D. All Rights Reserved.