|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
public abstract class AbstractCursorTool
A tool that draws an XOR visual indicator. Subclasses need not keep track of the XOR state of the indicator -- that logic is all handled by this class. Even if the LayerViewPanel is repainted while the XOR indicator is on-screen.
| Nested Class Summary | |
|---|---|
static interface |
AbstractCursorTool.Listener
|
| Constructor Summary | |
|---|---|
AbstractCursorTool()
|
|
| Method Summary | |
|---|---|
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(java.awt.Graphics2D graphics)
|
protected void |
clearShape()
|
static java.awt.Cursor |
createCursor(java.awt.Image image)
The cursor will look best if the image is a 32 x 32 transparent GIF. |
static java.awt.Cursor |
createCursor(java.awt.Image image,
java.awt.Point hotSpot)
|
static java.util.List |
createStandardSnappingPolicies(Blackboard blackboard)
|
void |
deactivate()
|
protected void |
drawShapeXOR(java.awt.Graphics2D g)
|
protected void |
drawShapeXOR(java.awt.Shape shape,
java.awt.Graphics2D graphics)
|
protected void |
execute(UndoableCommand command)
Optional means of execution, with undoability. |
protected void |
fireGestureFinished()
|
protected abstract void |
gestureFinished()
|
java.awt.Color |
getColor()
|
java.awt.Cursor |
getCursor()
|
java.lang.String |
getName()
Returns a very brief description of this CursorTool. |
protected LayerViewPanel |
getPanel()
|
protected abstract java.awt.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(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
static java.lang.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(java.awt.Color color)
|
protected void |
setFilling(boolean filling)
|
protected void |
setStroke(java.awt.Stroke stroke)
|
protected void |
setStrokeWidth(int strokeWidth)
Deprecated. Use #setStroke instead. |
protected void |
setup(java.awt.Graphics2D graphics)
|
protected com.vividsolutions.jts.geom.Coordinate |
snap(com.vividsolutions.jts.geom.Coordinate modelCoordinate)
|
protected com.vividsolutions.jts.geom.Coordinate |
snap(java.awt.geom.Point2D viewPoint)
|
java.lang.String |
toString()
|
protected boolean |
wasControlPressed()
|
protected boolean |
wasShiftPressed()
|
static JUMPWorkbench |
workbench(LayerViewPanel panel)
|
static WorkbenchFrame |
workbenchFrame(LayerViewPanel layerViewPanel)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.vividsolutions.jump.workbench.ui.cursortool.CursorTool |
|---|
getIcon |
| Constructor Detail |
|---|
public AbstractCursorTool()
| Method Detail |
|---|
public void allowSnapping()
protected boolean wasShiftPressed()
protected boolean wasControlPressed()
public static java.awt.Cursor createCursor(java.awt.Image image)
public static java.awt.Cursor createCursor(java.awt.Image image,
java.awt.Point hotSpot)
public java.awt.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 java.util.List createStandardSnappingPolicies(Blackboard blackboard)
protected boolean isRollingBackInvalidEdits()
public void deactivate()
deactivate in interface CursorToolpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void setColor(java.awt.Color color)
protected void setFilling(boolean filling)
protected void setStrokeWidth(int strokeWidth)
protected void setStroke(java.awt.Stroke stroke)
protected void setup(java.awt.Graphics2D graphics)
protected LayerViewPanel getPanel()
protected abstract java.awt.Shape getShape()
throws java.lang.Exception
java.lang.Exceptionprotected void cleanup(java.awt.Graphics2D graphics)
protected void clearShape()
public void cancelGesture()
CursorTool
cancelGesture in interface CursorTool
protected void drawShapeXOR(java.awt.Graphics2D g)
throws java.lang.Exception
java.lang.Exception
protected void drawShapeXOR(java.awt.Shape shape,
java.awt.Graphics2D graphics)
protected void redrawShape()
throws java.lang.Exception
java.lang.Exception
protected com.vividsolutions.jts.geom.Coordinate snap(java.awt.geom.Point2D viewPoint)
throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.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)
protected abstract void gestureFinished()
throws java.lang.Exception
java.lang.Exception
protected void fireGestureFinished()
throws java.lang.Exception
java.lang.Exceptionpublic void add(AbstractCursorTool.Listener listener)
protected void execute(UndoableCommand command)
protected void reportNothingToUndoYet()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getName()
CursorTool
getName in interface CursorToolpublic static java.lang.String name(CursorTool tool)
protected boolean check(EnableCheck check)
public SnapManager getSnapManager()
public java.awt.Color getColor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||