Package com.kheops.jmap.client.tools
Class ToolDrawBox
java.lang.Object
com.kheops.jmap.client.tools.Tool
com.kheops.jmap.client.tools.ToolDraw
com.kheops.jmap.client.tools.ToolDrawState
com.kheops.jmap.client.tools.ToolDrawBox
- All Implemented Interfaces:
- JMapEventDispatcher,- ViewEventListener,- ViewManagerEventListener,- KeyListener,- EventListener
- Direct Known Subclasses:
- ToolSelectBox,- ToolZoomInBox,- ToolZoomOutBox
This subclass of Tool automatically draws a rectangle on the view when the
 mouse is dragged.
- See Also:
- 
Field SummaryFieldsFields inherited from class com.kheops.jmap.client.tools.ToolDrawStatestate, STATE_FIRST_CLICK, STATE_NONE, STATE_SECOND_CLICKFields inherited from class com.kheops.jmap.client.tools.ToolDrawaltKeyEventManager, 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 SummaryConstructorsConstructorDescriptionToolDrawBox(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) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidKeyListener methodsvoidThis method is called by the view (View instance) after mouse clicked events generated by the user.voidThis method overrides onToolDragged in Tool.voidThis method is called by the view (View instance) after mouse moved events generated by the user.voidThis method overrides onToolPressed in Tool.voidThis method overrides onToolReleased in Tool.voidTerminates the current toolvoidThis method handles viewRepaintOccurredMethods inherited from class com.kheops.jmap.client.tools.ToolDrawStateinitMethods inherited from class com.kheops.jmap.client.tools.ToolDrawaddEditionEventListener, 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, viewToolChangedOccurredMethods inherited from class com.kheops.jmap.client.tools.ToolgetView, isAutoPan, setAutoPan, toWCPoint
- 
Field Details- 
styledPoly
- 
styledLabel
 
- 
- 
Constructor Details- 
ToolDrawBoxpublic ToolDrawBox()
- 
ToolDrawBox
- 
ToolDrawBoxpublic ToolDrawBox(int nbDecimals, boolean displayLabel, boolean isPersistant, int drawLayerId, StyleContainer styleContainer) 
- 
ToolDrawBoxpublic ToolDrawBox(int nbDecimals, boolean displayLabel, boolean isPersistant, int drawLayerId, StyleContainer styleContainer, boolean useUndoManager) 
 
- 
- 
Method Details- 
onToolPressedThis method overrides onToolPressed in Tool. It is called after a mouse pressed event on the view to determine the starting corner coordinates of the box.- Overrides:
- onToolPressedin class- Tool
- Parameters:
- e- the MouseEvent
 
- 
onToolDraggedThis method overrides onToolDragged in Tool. It is called after an mouse drag event on the view to draw dynamically a box from the starting corner location (where the mouse pressed event occurred.) to the ending corner location (the present mouse location)- Overrides:
- onToolDraggedin class- Tool
- Parameters:
- e- the corresponding the MouveEvent
 
- 
onToolReleasedThis method overrides onToolReleased in Tool. It is called after an mouse released event on the view.- Overrides:
- onToolReleasedin class- Tool
- Parameters:
- e- the corresponding MouveEvent
 
- 
onToolMovedDescription copied from class:ToolThis method is called by the view (View instance) after mouse moved events generated by the user. It will handle these events by making the necessary changes. This method should be overridden by the subclasses that needs to perform specific tasks when such events occur.- Overrides:
- onToolMovedin class- Tool
- Parameters:
- e- the corresponding mouse event.
 
- 
terminatepublic void terminate()Description copied from class:ToolDrawTerminates the current tool- Overrides:
- terminatein class- ToolDrawState
 
- 
keyPressedDescription copied from class:ToolDrawKeyListener methods- Specified by:
- keyPressedin interface- KeyListener
- Overrides:
- keyPressedin class- ToolDraw
 
- 
viewRepaintOccurredDescription copied from interface:ViewEventListenerThis method handles viewRepaintOccurred- Specified by:
- viewRepaintOccurredin interface- ViewEventListener
- Overrides:
- viewRepaintOccurredin class- ToolDraw
- Parameters:
- e- the corresponding ViewRepaintEvent object
 
- 
onToolClickedDescription copied from class:ToolThis method is called by the view (View instance) after mouse clicked events generated by the user. It will handle these events by making the necessary changes. This method should be overridden by the subclasses that needs to perform specific tasks when such events occur.- Overrides:
- onToolClickedin class- Tool
- Parameters:
- e- the corresponding mouse event.
 
 
-