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
|
isLinuxOS, panel
Constructor and Description |
---|
DragTool() |
Modifier and Type | Method and Description |
---|---|
void |
deactivate() |
protected com.vividsolutions.jts.geom.Envelope |
getBoxInModelCoordinates() |
protected com.vividsolutions.jts.geom.Coordinate |
getModelDestination() |
protected com.vividsolutions.jts.geom.Coordinate |
getModelSource() |
protected java.awt.Shape |
getShape() |
protected java.awt.Shape |
getShape(java.awt.geom.Point2D source,
java.awt.geom.Point2D destination) |
protected java.awt.geom.Point2D |
getViewDestination() |
protected java.awt.geom.Point2D |
getViewSource() |
protected double |
modelClickBuffer() |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e)
Begins handling of the drag.
|
void |
mouseReleased(java.awt.event.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(java.awt.geom.Point2D destination) |
protected void |
setViewSource(java.awt.geom.Point2D source) |
protected boolean |
wasClick() |
activate, add, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, createCursor, createCursor, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, gestureFinished, getColor, getCursor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getTaskFrame, getWorkbench, getWorkbenchFrame, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setFilling, setPanel, setStroke, setStrokeWidth, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIcon
public static final int DEFAULT_VIEW_CLICK_BUFFER
protected com.vividsolutions.jts.geom.Coordinate modelSource
protected com.vividsolutions.jts.geom.Coordinate modelDestination
public void deactivate()
deactivate
in interface CursorTool
deactivate
in class AbstractCursorTool
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class AbstractCursorTool
protected void setViewClickBuffer(int clickBuffer)
protected boolean wasClick()
protected com.vividsolutions.jts.geom.Envelope getBoxInModelCoordinates() throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
protected double modelClickBuffer()
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class AbstractCursorTool
protected 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(java.awt.geom.Point2D source) throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
protected void setViewDestination(java.awt.geom.Point2D destination) throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
protected void setModelDestination(com.vividsolutions.jts.geom.Coordinate destination)
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class AbstractCursorTool
protected java.awt.Shape getShape() throws java.lang.Exception
getShape
in class AbstractCursorTool
java.lang.Exception
protected java.awt.geom.Point2D getViewSource() throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
protected java.awt.geom.Point2D getViewDestination() throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
protected java.awt.Shape getShape(java.awt.geom.Point2D source, java.awt.geom.Point2D destination) throws java.lang.Exception
java.lang.Exception