public class AdvancedMeasureTool extends PolygonTool implements java.awt.event.ActionListener
AbstractCursorTool.Listener
Modifier and Type | Field and Description |
---|---|
static int |
MEASURE_MODE_AREA
Measure mode area.
|
static int |
MEASURE_MODE_DISTANCE
Measure mode distance.
|
mouseLastLoc
isLinuxOS, panel
Constructor and Description |
---|
AdvancedMeasureTool(WorkbenchContext context)
Build a new AdvancedMeasureTool instance.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
ActionListener for the JMenuItems.
|
protected void |
gestureFinished()
Gesture is finished, now do the work, paint the measurement.
|
java.awt.Cursor |
getCursor()
Returns the Cursor depending on the measureMode.
|
javax.swing.Icon |
getIcon()
Returns the Icon depending on the measureMode.
|
javax.swing.JPopupMenu |
getPopupMenu()
Returns the popup menu for this tool.
|
javax.swing.JToggleButton |
getToolbarButton()
Returns the toolbar button for this tool.
|
protected boolean |
isFinishingRelease(java.awt.event.MouseEvent e)
For the possibility to start a gesture (measurement) with a double click,
only finish, if we have more then one click previously done
(coordinates > 1).
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Clickhandler for the measuretool.
|
void |
mouseLocationChanged(java.awt.event.MouseEvent e)
Handle mouse location changes.
|
checkPolygon, getPolygon
activate, add, cancelGesture, deactivate, finishGesture, getCoordinates, getMetrics, getShape, mouseDragged, mouseMoved, mousePressed, mouseReleased, setCloseRing, setMetricsDisplay, toArray
add, allowSnapping, check, cleanup, clearImage, clearShape, createCursor, createCursor, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getTaskFrame, getWorkbench, getWorkbenchFrame, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseEntered, mouseExited, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setFilling, setPanel, setStroke, setStrokeWidth, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
public static final int MEASURE_MODE_DISTANCE
public static final int MEASURE_MODE_AREA
public AdvancedMeasureTool(WorkbenchContext context)
context
- public javax.swing.Icon getIcon()
getIcon
in interface CursorTool
public java.awt.Cursor getCursor()
getCursor
in interface CursorTool
getCursor
in class AbstractCursorTool
public void mouseLocationChanged(java.awt.event.MouseEvent e)
mouseLocationChanged
in class MultiClickTool
e
- public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class AbstractCursorTool
e
- protected boolean isFinishingRelease(java.awt.event.MouseEvent e)
isFinishingRelease
in class MultiClickTool
e
- protected void gestureFinished() throws java.awt.geom.NoninvertibleTransformException
gestureFinished
in class AbstractCursorTool
java.awt.geom.NoninvertibleTransformException
public javax.swing.JPopupMenu getPopupMenu()
public javax.swing.JToggleButton getToolbarButton()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
-