public abstract class AbstractCursorTool extends Object implements CursorTool
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractCursorTool.Listener |
| Constructor and Description |
|---|
AbstractCursorTool() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(LayerViewPanel layerViewPanel) |
void |
add(AbstractCursorTool.Listener listener) |
void |
allowSnapping()
Makes this CursorTool obey the snapping settings in the Options dialog.
|
void |
cancelGesture()
Notifies the CursorTool that a party is requesting that the gesture
currently in progress be aborted.
|
protected boolean |
check(EnableCheck check) |
protected void |
cleanup(Graphics2D graphics) |
protected void |
clearShape() |
static Cursor |
createCursor(Image image)
The cursor will look best if the image is a 32 x 32 transparent GIF.
|
static Cursor |
createCursor(Image image,
Point hotSpot) |
static List |
createStandardSnappingPolicies(Blackboard blackboard) |
void |
deactivate() |
protected void |
drawShapeXOR(Graphics2D g) |
protected void |
drawShapeXOR(Shape shape,
Graphics2D graphics) |
protected void |
execute(UndoableCommand command)
Optional means of execution, with undoability.
|
protected void |
fireGestureFinished() |
protected abstract void |
gestureFinished() |
Color |
getColor() |
Cursor |
getCursor() |
String |
getName()
Returns a very brief description of this CursorTool.
|
protected LayerViewPanel |
getPanel() |
protected abstract Shape |
getShape() |
SnapManager |
getSnapManager() |
protected TaskFrame |
getTaskFrame() |
JUMPWorkbench |
getWorkbench() |
boolean |
isGestureInProgress()
Used by OrCompositeTool to determine whether a CursorTool is busy
interacting with the user.
|
boolean |
isRightMouseButtonUsed() |
protected boolean |
isRollingBackInvalidEdits() |
boolean |
isShapeOnScreen()
Important for XOR drawing.
|
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
static String |
name(CursorTool tool) |
protected void |
redrawShape() |
protected void |
reportNothingToUndoYet()
Notifies the UndoManager that this PlugIn did not modify any model
states, and therefore the undo history should remain unchanged.
|
void |
setColor(Color color) |
protected void |
setFilling(boolean filling) |
protected void |
setStroke(Stroke stroke) |
protected void |
setStrokeWidth(int strokeWidth)
Deprecated.
Use #setStroke instead.
|
protected void |
setup(Graphics2D graphics) |
protected com.vividsolutions.jts.geom.Coordinate |
snap(com.vividsolutions.jts.geom.Coordinate modelCoordinate) |
protected com.vividsolutions.jts.geom.Coordinate |
snap(Point2D viewPoint) |
String |
toString() |
protected boolean |
wasControlPressed() |
protected boolean |
wasShiftPressed() |
static JUMPWorkbench |
workbench(LayerViewPanel panel) |
static WorkbenchFrame |
workbenchFrame(LayerViewPanel layerViewPanel) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIconpublic void allowSnapping()
protected boolean wasShiftPressed()
protected boolean wasControlPressed()
public static Cursor createCursor(Image image)
public Cursor getCursor()
getCursor in interface CursorToolpublic boolean isGestureInProgress()
isGestureInProgress in interface CursorToolpublic boolean isRightMouseButtonUsed()
isRightMouseButtonUsed in interface CursorToolpublic boolean isShapeOnScreen()
public void activate(LayerViewPanel layerViewPanel)
activate in interface CursorToolpublic static WorkbenchFrame workbenchFrame(LayerViewPanel layerViewPanel)
public static List createStandardSnappingPolicies(Blackboard blackboard)
protected boolean isRollingBackInvalidEdits()
public void deactivate()
deactivate in interface CursorToolpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void setColor(Color color)
protected void setFilling(boolean filling)
protected void setStrokeWidth(int strokeWidth)
protected void setStroke(Stroke stroke)
protected void setup(Graphics2D graphics)
protected LayerViewPanel getPanel()
protected abstract Shape getShape() throws Exception
Exceptionprotected void cleanup(Graphics2D graphics)
protected void clearShape()
public void cancelGesture()
CursorToolcancelGesture in interface CursorToolprotected void drawShapeXOR(Graphics2D g) throws Exception
Exceptionprotected void drawShapeXOR(Shape shape, Graphics2D graphics)
protected com.vividsolutions.jts.geom.Coordinate snap(Point2D viewPoint) throws NoninvertibleTransformException
NoninvertibleTransformExceptionprotected com.vividsolutions.jts.geom.Coordinate snap(com.vividsolutions.jts.geom.Coordinate modelCoordinate)
protected TaskFrame getTaskFrame()
public JUMPWorkbench getWorkbench()
public static JUMPWorkbench workbench(LayerViewPanel panel)
public void add(AbstractCursorTool.Listener listener)
protected void execute(UndoableCommand command)
protected void reportNothingToUndoYet()
public String getName()
CursorToolgetName in interface CursorToolpublic static String name(CursorTool tool)
protected boolean check(EnableCheck check)
public SnapManager getSnapManager()
public Color getColor()
Copyright © 2015. All rights reserved.