edu.umd.cs.piccolox.event
Class PNavigationEventHandler
java.lang.Object
edu.umd.cs.piccolo.event.PBasicInputEventHandler
edu.umd.cs.piccolox.event.PNavigationEventHandler
- All Implemented Interfaces:
- PInputEventListener, java.util.EventListener
public class PNavigationEventHandler
- extends PBasicInputEventHandler
PNavigationEventHandler implements simple focus based navigation. Uses
mouse button one or the arrow keys to set a new focus. Animates the canvas
view to keep the focus node on the screen and at 100 percent scale with minimal
view movement.
- Version:
- 1.0
- Author:
- Jesse Grosjean
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler |
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseReleased, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NORTH
public static final int NORTH
- See Also:
- Constant Field Values
SOUTH
public static final int SOUTH
- See Also:
- Constant Field Values
EAST
public static final int EAST
- See Also:
- Constant Field Values
WEST
public static final int WEST
- See Also:
- Constant Field Values
IN
public static final int IN
- See Also:
- Constant Field Values
OUT
public static final int OUT
- See Also:
- Constant Field Values
PNavigationEventHandler
public PNavigationEventHandler()
keyPressed
public void keyPressed(PInputEvent e)
- Overrides:
keyPressed
in class PBasicInputEventHandler
mousePressed
public void mousePressed(PInputEvent aEvent)
- Overrides:
mousePressed
in class PBasicInputEventHandler
moveFocusDown
public void moveFocusDown(PInputEvent e)
moveFocusIn
public void moveFocusIn(PInputEvent e)
moveFocusLeft
public void moveFocusLeft(PInputEvent e)
moveFocusOut
public void moveFocusOut(PInputEvent e)
moveFocusRight
public void moveFocusRight(PInputEvent e)
moveFocusUp
public void moveFocusUp(PInputEvent e)
moveFocusToMouseOver
public void moveFocusToMouseOver(PInputEvent e)
getNeighborInDirection
public PNode getNeighborInDirection(int aDirection)
getNeighbors
public java.util.List getNeighbors()
nodeIsNeighborInDirection
public boolean nodeIsNeighborInDirection(PNode aNode,
int aDirection)
sortNodesByDistanceFromPoint
public void sortNodesByDistanceFromPoint(java.util.List aNodesList,
java.awt.geom.Point2D aPoint)
animateCameraViewTransformTo
protected PActivity animateCameraViewTransformTo(PCamera aCamera,
java.awt.geom.AffineTransform aTransform,
int duration)
directCameraViewToFocus
public PActivity directCameraViewToFocus(PCamera aCamera,
PNode aFocusNode,
int duration)
fillViewWhiteSpace
protected void fillViewWhiteSpace(PCamera aCamera)
Copyright © 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.
Web Accessibility