Package org.geotools.swing.tool
Class ZoomOutTool
- Object
- 
- MapMouseAdapter
- 
- CursorTool
- 
- AbstractZoomTool
- 
- ZoomOutTool
 
 
 
 
- 
- All Implemented Interfaces:
- MapMouseListener
 
 public class ZoomOutTool extends AbstractZoomTool A cursor tool to zoom out the map pane display.For mouse clicks, the display will be zoomed-out such that the map centre is the position of the mouse click and the map width and height are calculated as: 
 wherelen = len.old * zzis the linear zoom increment(>= 1.0)- Since:
- 2.6
- Author:
- Michael Bedward
 
- 
- 
Field SummaryFields Modifier and Type Field Description static PointCURSOR_HOTSPOTCursor hotspot coordinatesstatic StringCURSOR_IMAGECursorstatic StringICON_IMAGEIcon for the controlstatic StringTOOL_NAMETool namestatic StringTOOL_TIPTool tip text- 
Fields inherited from class AbstractZoomToolDEFAULT_ZOOM_FACTOR, zoom
 
- 
 - 
Constructor SummaryConstructors Constructor Description ZoomOutTool()Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandrawDragBox()Returns false to indicate that this tool does not draw a box on the map display when the mouse is being draggedCursorgetCursor()Get the mouse cursor for this toolvoidonMouseClicked(MapMouseEvent ev)Zoom out by the currently set increment, with the map centred at the location (in world coords) of the mouse click- 
Methods inherited from class AbstractZoomToolgetZoom, setZoom
 - 
Methods inherited from class CursorToolgetMapPane, setMapPane
 - 
Methods inherited from class MapMouseAdapteronMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onMouseWheelMoved
 
- 
 
- 
- 
- 
Field Detail- 
TOOL_NAMEpublic static final String TOOL_NAME Tool name
 - 
TOOL_TIPpublic static final String TOOL_TIP Tool tip text
 - 
CURSOR_IMAGEpublic static final String CURSOR_IMAGE Cursor- See Also:
- Constant Field Values
 
 - 
CURSOR_HOTSPOTpublic static final Point CURSOR_HOTSPOT Cursor hotspot coordinates
 - 
ICON_IMAGEpublic static final String ICON_IMAGE Icon for the control- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
onMouseClickedpublic void onMouseClicked(MapMouseEvent ev) Zoom out by the currently set increment, with the map centred at the location (in world coords) of the mouse click- Specified by:
- onMouseClickedin interface- MapMouseListener
- Overrides:
- onMouseClickedin class- MapMouseAdapter
- Parameters:
- ev- the mouse event
 
 - 
getCursorpublic Cursor getCursor() Get the mouse cursor for this tool- Overrides:
- getCursorin class- CursorTool
- Returns:
- the default cursor
 
 - 
drawDragBoxpublic boolean drawDragBox() Returns false to indicate that this tool does not draw a box on the map display when the mouse is being dragged- Overrides:
- drawDragBoxin class- CursorTool
- Returns:
- true if this tool supports drawing a drag-box on the map; false otherwise
 
 
- 
 
-