public abstract class DragTool extends AbstractCursorTool
AbstractCursorTool.Listener| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_VIEW_CLICK_BUFFER |
protected com.vividsolutions.jts.geom.Coordinate |
modelDestination
Modify using #setDestination
|
protected com.vividsolutions.jts.geom.Coordinate |
modelSource
Modify using #setSource
|
| Constructor and Description |
|---|
DragTool() |
| Modifier and Type | Method and Description |
|---|---|
protected com.vividsolutions.jts.geom.Envelope |
getBoxInModelCoordinates() |
protected com.vividsolutions.jts.geom.Coordinate |
getModelDestination() |
protected com.vividsolutions.jts.geom.Coordinate |
getModelSource() |
protected Shape |
getShape() |
protected Shape |
getShape(Point2D source,
Point2D destination) |
protected Point2D |
getViewDestination() |
protected Point2D |
getViewSource() |
protected double |
modelClickBuffer() |
void |
mouseDragged(MouseEvent e) |
void |
mousePressed(MouseEvent e)
Begins handling of the drag.
|
void |
mouseReleased(MouseEvent e) |
protected void |
setModelDestination(com.vividsolutions.jts.geom.Coordinate destination) |
protected void |
setModelSource(com.vividsolutions.jts.geom.Coordinate source) |
protected void |
setViewClickBuffer(int clickBuffer)
A click is converted into a box by being expanded by this amount in the
four directions.
|
protected void |
setViewDestination(Point2D destination) |
protected void |
setViewSource(Point2D source) |
protected boolean |
wasClick() |
activate, add, allowSnapping, cancelGesture, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, deactivate, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, gestureFinished, getColor, getCursor, getName, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, setStrokeWidth, setup, snap, snap, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIconpublic static final int DEFAULT_VIEW_CLICK_BUFFER
protected com.vividsolutions.jts.geom.Coordinate modelSource
protected com.vividsolutions.jts.geom.Coordinate modelDestination
public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenermousePressed in class AbstractCursorToolprotected void setViewClickBuffer(int clickBuffer)
protected boolean wasClick()
protected com.vividsolutions.jts.geom.Envelope getBoxInModelCoordinates()
throws NoninvertibleTransformException
NoninvertibleTransformExceptionprotected double modelClickBuffer()
public void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenermouseDragged in class AbstractCursorToolprotected com.vividsolutions.jts.geom.Coordinate getModelSource()
protected com.vividsolutions.jts.geom.Coordinate getModelDestination()
protected void setModelSource(com.vividsolutions.jts.geom.Coordinate source)
protected void setViewSource(Point2D source) throws NoninvertibleTransformException
NoninvertibleTransformExceptionprotected void setViewDestination(Point2D destination) throws NoninvertibleTransformException
NoninvertibleTransformExceptionprotected void setModelDestination(com.vividsolutions.jts.geom.Coordinate destination)
public void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenermouseReleased in class AbstractCursorToolprotected Shape getShape() throws Exception
getShape in class AbstractCursorToolExceptionprotected Point2D getViewSource() throws NoninvertibleTransformException
NoninvertibleTransformExceptionprotected Point2D getViewDestination() throws NoninvertibleTransformException
NoninvertibleTransformExceptionCopyright © 2015. All rights reserved.