public class ToolDrawBox extends ToolDrawState
Tool
Modifier and Type | Field and Description |
---|---|
protected K2DStyledElement |
styledLabel |
protected K2DStyledElement |
styledPoly |
state, STATE_FIRST_CLICK, STATE_NONE, STATE_SECOND_CLICK
altKeyEventManager, altLastPressed, createStyledElement, cursorCrosshair, cursorWait, df, displayLabel, drawLayer, drawLayerId, eventDispatcher, firstPointWc, ID_DISTANCE_LINE, ID_LABEL, ID_LINE_TMP, ID_SNAP_POINT, isPersistant, lastMousePositionDc, secPointWc, showAttributesEditor, snapLayers, styleContainer, t, toRedrawDc, useHighlightHandles, useUndoManager
Constructor and Description |
---|
ToolDrawBox() |
ToolDrawBox(int nbDecimals,
boolean displayLabel,
boolean isPersistant,
int drawLayerId,
StyleContainer styleContainer) |
ToolDrawBox(int nbDecimals,
boolean displayLabel,
boolean isPersistant,
int drawLayerId,
StyleContainer styleContainer,
boolean useUndoManager) |
ToolDrawBox(StyleContainer styleContainer) |
Modifier and Type | Method and Description |
---|---|
void |
keyPressed(java.awt.event.KeyEvent e)
KeyListener methods
|
void |
onToolClicked(java.awt.event.MouseEvent e)
This method is called by the view (View instance) after mouse clicked events generated by the user.
|
void |
onToolDragged(java.awt.event.MouseEvent e)
This method overrides onToolDragged in Tool.
|
void |
onToolMoved(java.awt.event.MouseEvent e)
This method is called by the view (View instance) after mouse moved events generated by the user.
|
void |
onToolPressed(java.awt.event.MouseEvent e)
This method overrides onToolPressed in Tool.
|
void |
onToolReleased(java.awt.event.MouseEvent e)
This method overrides onToolReleased in Tool.
|
void |
terminate()
Terminates the current tool
|
void |
viewRepaintOccurred(ViewRepaintEvent e)
This method handles viewRepaintOccurred
|
init
addEditionEventListener, altIsPressed, altLastPressed, ctrlIsPressed, dispatchEvent, fireEditionEvent, genTrnsprntFillContainer, getCursor, getDrawLayer, getLabelAlignment, getLabelStyle, getLineStyle, getStyleContainer, initEventDispatcher, isCreateStyledElement, isPersistant, isPersistent, isUseUndoManager, keyReleased, keyTyped, offsetGeometry, removeEditionEventListener, setCreateStyledElement, setDrawLayer, setPersistant, setPersistent, setShowAttributesEditor, setStyleContainer, setUseUndoManager, shiftIsPressed, unoffsetGeometry, updatePtMouseVars, updatePtMouseVars, viewActivated, viewAdded, viewChangedOccurred, viewDeactivated, viewPopupMenuShowing, viewReadyOccurred, viewRedrawOccurred, viewRemoved, viewStaticElementChanged, viewToolChangedOccurred
getView, isAutoPan, setAutoPan, toWCPoint
protected K2DStyledElement styledPoly
protected K2DStyledElement styledLabel
public ToolDrawBox()
public ToolDrawBox(StyleContainer styleContainer)
public ToolDrawBox(int nbDecimals, boolean displayLabel, boolean isPersistant, int drawLayerId, StyleContainer styleContainer)
public ToolDrawBox(int nbDecimals, boolean displayLabel, boolean isPersistant, int drawLayerId, StyleContainer styleContainer, boolean useUndoManager)
public void onToolPressed(java.awt.event.MouseEvent e)
onToolPressed
in class Tool
e
- the MouseEventpublic void onToolDragged(java.awt.event.MouseEvent e)
onToolDragged
in class Tool
e
- the corresponding the MouveEventpublic void onToolReleased(java.awt.event.MouseEvent e)
onToolReleased
in class Tool
e
- the corresponding MouveEventpublic void onToolMoved(java.awt.event.MouseEvent e)
Tool
onToolMoved
in class Tool
e
- the corresponding mouse event.public void terminate()
ToolDraw
terminate
in class ToolDrawState
public void keyPressed(java.awt.event.KeyEvent e)
ToolDraw
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class ToolDraw
public void viewRepaintOccurred(ViewRepaintEvent e)
ViewEventListener
viewRepaintOccurred
in interface ViewEventListener
viewRepaintOccurred
in class ToolDraw
e
- the corresponding ViewRepaintEvent objectpublic void onToolClicked(java.awt.event.MouseEvent e)
Tool
onToolClicked
in class Tool
e
- the corresponding mouse event.