com.bbn.openmap.layer.editor
Class AbstractEditorTool

java.lang.Object
  extended by com.bbn.openmap.omGraphics.event.StandardMapMouseInterpreter
      extended by com.bbn.openmap.layer.editor.AbstractEditorTool
All Implemented Interfaces:
MapMouseListener, EditorTool, LightMapHandlerChild, MapMouseInterpreter
Direct Known Subclasses:
DrawingEditorTool

public class AbstractEditorTool
extends StandardMapMouseInterpreter
implements EditorTool


Nested Class Summary
 
Nested classes/interfaces inherited from class com.bbn.openmap.omGraphics.event.StandardMapMouseInterpreter
StandardMapMouseInterpreter.GeometryOfInterest, StandardMapMouseInterpreter.MouseTimerListener
 
Field Summary
protected  java.awt.Container face
           
protected  boolean visible
          Used as a placeholder if face is null.
protected  boolean wantsEvents
          Flag to let it's layer know when it wants control over mouse events.
 
Fields inherited from class com.bbn.openmap.omGraphics.event.StandardMapMouseInterpreter
active, clickInterest, consumeEvents, currentMouseEvent, DEBUG, grp, lastToolTip, layer, mouseModeServiceList, mouseTimer, mouseTimerInterval, mouseTimerListener, movementInterest, noTimerOverOMGraphic
 
Constructor Summary
protected AbstractEditorTool()
          Make sure you set the EditorLayer at some point.
  AbstractEditorTool(EditorLayer eLayer)
          The preferred constructor.
 
Method Summary
 void dispose()
          Called when the parent layer detects that it has been removed from the application.
 void drawingComplete(OMGraphic omg, OMAction action)
          Method where the EditorLayer lets the tool know that the editing function has come full circle, so the user interface can be adjusted.
 void findAndInit(java.lang.Object obj)
          Part of the interface where the EditorLayer can provide components that are available via the MapHandler/BeanContext.
 void findAndUndo(java.lang.Object obj)
          Part of the interface where the EditorLayer can provide components that are available via the MapHandler/BeanContext.
 java.awt.Container getFace()
          The tool's interface.
 boolean isVisible()
          A method that lets the EditorTool respond to queries wondering whether its interface is visible.
 void setLayer(OMGraphicHandlerLayer eLayer)
           
 void setVisible(boolean value)
          A method that lets the EditorTool know whether its interface should be visible.
 void setWantsEvents(boolean value)
          Set whether the tool should want MouseEvents.
 boolean wantsEvents()
          Whether the Tool is expecting to be fed MouseEvents.
 
Methods inherited from class com.bbn.openmap.omGraphics.event.StandardMapMouseInterpreter
deselect, displayPopup, getClickInterest, getConsumeEvents, getCurrentMouseEvent, getGeometryUnder, getGRP, getLayer, getMouseModeServiceList, getMouseTimerInterval, getMovementInterest, getNoTimerOverOMGraphic, handleInfoLine, handleToolTip, isActive, isLeftMouseButton, leftClick, leftClick, leftClickOff, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mouseNotOver, mouseOver, mouseOver, mousePressed, mouseReleased, rightClick, rightClick, rightClickOff, select, setActive, setClickInterest, setClickInterestFromMouseEvent, setConsumeEvents, setCurrentMouseEvent, setGRP, setMouseModeServiceList, setMouseTimerInterval, setMovementInterest, setNoTimerOverOMGraphic, testForAndHandlePopupTrigger, updateMouseMoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bbn.openmap.omGraphics.event.MapMouseInterpreter
getCurrentMouseEvent, getGRP, isActive, leftClick, leftClick, leftClickOff, mouseNotOver, mouseOver, mouseOver, rightClick, rightClick, rightClickOff, setActive, setGRP
 
Methods inherited from interface com.bbn.openmap.event.MapMouseListener
getMouseModeServiceList, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased
 

Field Detail

wantsEvents

protected boolean wantsEvents
Flag to let it's layer know when it wants control over mouse events.


visible

protected boolean visible
Used as a placeholder if face is null.


face

protected java.awt.Container face
Constructor Detail

AbstractEditorTool

protected AbstractEditorTool()
Make sure you set the EditorLayer at some point.


AbstractEditorTool

public AbstractEditorTool(EditorLayer eLayer)
The preferred constructor.

Method Detail

setLayer

public void setLayer(OMGraphicHandlerLayer eLayer)
Overrides:
setLayer in class StandardMapMouseInterpreter

setWantsEvents

public void setWantsEvents(boolean value)
Set whether the tool should want MouseEvents.


wantsEvents

public boolean wantsEvents()
Whether the Tool is expecting to be fed MouseEvents.

Specified by:
wantsEvents in interface EditorTool

findAndInit

public void findAndInit(java.lang.Object obj)
Part of the interface where the EditorLayer can provide components that are available via the MapHandler/BeanContext. The object is something that has been added to the MapHandler.

Specified by:
findAndInit in interface LightMapHandlerChild

findAndUndo

public void findAndUndo(java.lang.Object obj)
Part of the interface where the EditorLayer can provide components that are available via the MapHandler/BeanContext. The object is something that has been removed from the MapHandler.

Specified by:
findAndUndo in interface LightMapHandlerChild

drawingComplete

public void drawingComplete(OMGraphic omg,
                            OMAction action)
Method where the EditorLayer lets the tool know that the editing function has come full circle, so the user interface can be adjusted.

Specified by:
drawingComplete in interface EditorTool

setVisible

public void setVisible(boolean value)
A method that lets the EditorTool know whether its interface should be visible.

Specified by:
setVisible in interface EditorTool

isVisible

public boolean isVisible()
A method that lets the EditorTool respond to queries wondering whether its interface is visible.

Specified by:
isVisible in interface EditorTool

getFace

public java.awt.Container getFace()
The tool's interface. This is added to the tool bar.

Specified by:
getFace in interface EditorTool
Returns:
String The key for this tool.

dispose

public void dispose()
Called when the parent layer detects that it has been removed from the application.

Specified by:
dispose in interface EditorTool


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details