edu.umd.cfar.lamp.viper.gui.canvas
Class GenericBoxEditor
java.lang.Object
edu.umd.cs.piccolo.event.PBasicInputEventHandler
edu.umd.cfar.lamp.viper.gui.canvas.CanvasEditor
edu.umd.cfar.lamp.viper.gui.canvas.GenericBoxEditor
- All Implemented Interfaces:
- java.util.EventListener, edu.umd.cs.piccolo.event.PInputEventListener, Selectable
- Direct Known Subclasses:
- BboxCanvasEditor, OboxCanvasEditor
- public abstract class GenericBoxEditor
- extends CanvasEditor
- Author:
- davidm
TODO To change the template for this generated type comment go to
Window - Preferences - Java - Code Generation - Code and Comments
Methods inherited from class edu.umd.cfar.lamp.viper.gui.canvas.CanvasEditor |
doNotProcessEvent, doWhenSelected, doWhenUnselected, getAttributable, getMediator, getName, getShape, inRangeOfInterest, isDisplayWRTmode, isLeftClicked, isLocked, isLockedMode, isSelected, refresh, setDisplayWRTmode, setMediator, setSelected, updateAttributable, zap |
Methods inherited from class edu.umd.cs.piccolo.event.PBasicInputEventHandler |
acceptsEvent, getEventFilter, keyboardFocusGained, keyboardFocusLost, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_DRAW_FROM_CENTER
protected static final boolean DEFAULT_DRAW_FROM_CENTER
- See Also:
- Constant Field Values
LEFT_MOUSE_MASK
protected static final int LEFT_MOUSE_MASK
- See Also:
- Constant Field Values
currDir
protected CanvasDir currDir
origPts
protected java.awt.geom.Point2D[] origPts
currPts
protected java.awt.geom.Point2D[] currPts
pressPoint
protected java.awt.geom.Point2D pressPoint
dragPoint
protected java.awt.geom.Point2D dragPoint
box
protected PBoxNode box
CORNER_THRESHOLD
protected int CORNER_THRESHOLD
SIDE_THRESHOLD
protected int SIDE_THRESHOLD
GenericBoxEditor
public GenericBoxEditor(Attributable attrIn)
findDirection
protected CanvasDir findDirection(java.awt.geom.Point2D refPoint)
isDrawnFromCenter
public boolean isDrawnFromCenter()
- Returns:
setDrawnFromCenter
public void setDrawnFromCenter(boolean b)
- Parameters:
b
-
resizeBox
public abstract void resizeBox(CanvasDir dir)
isCorner
public static boolean isCorner(CanvasDir dir)
isEdge
public static boolean isEdge(CanvasDir dir)
cornerPointsValid
protected boolean cornerPointsValid()
- Returns:
keyPressed
public void keyPressed(edu.umd.cs.piccolo.event.PInputEvent e)
keyReleased
public void keyReleased(edu.umd.cs.piccolo.event.PInputEvent e)