edu.umd.cfar.lamp.viper.gui.data.obox
Class OboxCanvasEditor
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
edu.umd.cfar.lamp.viper.gui.data.obox.OboxCanvasEditor
- All Implemented Interfaces:
- java.util.EventListener, edu.umd.cs.piccolo.event.PInputEventListener, Selectable
- public class OboxCanvasEditor
- extends GenericBoxEditor
- Author:
- clin
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, getAttributable, getMediator, getShape, 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, mouseEntered, mouseExited, mouseWheelRotated, mouseWheelRotatedByBlock, paramString, processEvent, setEventFilter, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HANDLE_RADIUS
public static final int HANDLE_RADIUS
- See Also:
- Constant Field Values
isNearNorthHandle
protected boolean isNearNorthHandle
isNearRightHandle
protected boolean isNearRightHandle
MIN_HEIGHT
public static double MIN_HEIGHT
MIN_WIDTH
public static double MIN_WIDTH
OboxCanvasEditor
public OboxCanvasEditor(Attributable attrIn)
getName
public java.lang.String getName()
- Specified by:
getName
in class CanvasEditor
minDist
public double minDist(java.awt.geom.Point2D select)
- Gets the distance from the selection point to the edge of the box.
- Parameters:
select
- the point to test
- Returns:
- the shortest distance from select to the edge of the box
contains
public boolean contains(java.awt.geom.Point2D select)
mouseMoved
public void mouseMoved(edu.umd.cs.piccolo.event.PInputEvent e)
doWhenUnselected
public void doWhenUnselected()
- Specified by:
doWhenUnselected
in class CanvasEditor
mousePressed
public void mousePressed(edu.umd.cs.piccolo.event.PInputEvent e)
nearRightHandle
public boolean nearRightHandle(java.awt.geom.Point2D pt)
nearNorthHandle
public boolean nearNorthHandle(java.awt.geom.Point2D pt)
mouseDragged
public void mouseDragged(edu.umd.cs.piccolo.event.PInputEvent e)
verifyCtrlIsPressed
protected void verifyCtrlIsPressed(edu.umd.cs.piccolo.event.PInputEvent e)
- Checks to see if the event has the ctrl mask. Puts the controller in the
appropriate draw state, depending on event.
- Parameters:
e
- the (mouse?) event to check
mouseReleased
public void mouseReleased(edu.umd.cs.piccolo.event.PInputEvent e)
shift
public void shift()
resizeBox
public void resizeBox(CanvasDir dir)
- Specified by:
resizeBox
in class GenericBoxEditor
inRangeOfInterest
public boolean inRangeOfInterest(java.awt.geom.Point2D point)
- Specified by:
inRangeOfInterest
in class CanvasEditor
- Parameters:
point
-
- Returns:
- true if the CanvasEditor thinks this point is close enough to do
something with. It returns false if point is far away enough that
it's willing to let the EditorManager find a new shape to be
selected as editor.