OverviewMapHandler (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap.gui
Class OverviewMapHandler

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      com.bbn.openmap.gui.OMComponentPanel
                          com.bbn.openmap.gui.OMToolComponent
                              com.bbn.openmap.gui.OverviewMapHandler

All Implemented Interfaces:
  ProjectionListener, Tool, LightMapHandlerChild, PropertyConsumer, java.awt.event.ComponentListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

    public class OverviewMapHandler

extends OMToolComponent
implements ProjectionListener, java.io.Serializable, PropertyConsumer, java.beans.PropertyChangeListener, java.awt.event.ComponentListener

The OverviewMapHandler contains a MapBean that contains a projection that reflects another MapBean's projection. It manages the two MapBeans and the differences in the projections betwen them. The OverviewMapHandler can have a projection type independent of that of the source MapBean (the MapBean that the OverviewMapHandler's MapBean is paying attention to). It also contains a scale factor, which is a multiplier to use against the scale of the source MapBean's scale.

The OverviewMapHandler MapBean can also be used to control the source MapBean's projection center and scale. The source MapBean just needs to be added to the OverviewMapHandler by OverviewMapHandler.addControlledMap(MapBean).

The OverviewMapHandler needs to be added to the source MapBean as a ProjectionListener. Then, the overview MapBean can be added to the ContentPane of a Component by calling Component.setContentPane(OverviewMapHandler.getMap()); The OverviewMapHandler Should also be added as a ComponentListener to the Component.

After the first projectionChanged() call is received, the OverviewMapHandler knows about the source MapBean. Since the OverviewMapHandler is a ComponentListener and will therefore find out when it's parent is hidden, it will disengage and engage itself from the source MapBean as it's visibility changes.

To get the overview map to appear in the OpenMap application, add the following properties to your openmap.properties file:

           # First, add overviewMapHandler to the openmap.components marker name list.  Then, add:

           overviewMapHandler.class=com.bbn.opemap.gui.OverviewMapHandler
           overviewMapHandler.overviewLayers=overviewLayer
           overviewMapHandler.overviewScaleFactor=10f
           overviewMapHandler.overviewMinScale=100f
           # Set the Unit of Measure for the overviewMinScale property
           # Omission of  overviewMinScaleUom indicates that overviewMinScale
           # is an projection map scale instead of a distance.
           overviewMapHandler.overviewMinScaleUom=km

           # 'overviewStatusLayer' is a marker name for any attributes you may
           # want to pass to the overviewStatusLayer instance, in addition to
           # being used to define the class to use for that special layer.
           overviewMapHandler.overviewStatusLayer.class=com.bbn.openmap.layer.OverviewMapAreaLayer
           # Properties can be passed to the overview status layer by listing
           # them with the OverviewMapHandler prefix.

           # Set the line color for the coverage box outline...
           # overviewMapHandler.lineColor=FFFF0000

           # A sample overview map layer
           overviewLayer.class=com.bbn.openmap.layer.shape.ShapeLayer
           overviewLayer.prettyName=Overview
           overviewLayer.shapeFile=/home/dietrick/dev/openmap/share/dcwpo-browse.shp
           overviewLayer.spatialIndex=/home/dietrick/dev/openmap/share/dcwpo-browse.ssx
           overviewLayer.lineColor=ff000000
           overviewLayer.fillColor=ffbdde83

If layers are not added to the overview map, then it won't show up in the application.

See Also:
  Serialized Form

Nested Class Summary
`class` | `OverviewMapHandler.ControlledMapSupport` Support for directing the setCenter and setScale calls to any MapBeans that care to be listening.

Nested classes/interfaces inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes/interfaces inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes/interfaces inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes/interfaces inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

Field Summary
`protected boolean` | `backgroundSlave` Flag to change the background color to whatever the source map's is changed to.
`static java.lang.String` | `BackgroundSlaveProperty`
`protected OverviewMapHandler.ControlledMapSupport` | `controlledMaps` The support to send the source MapBean setCenter and setScale commands if a controlled map is added - usually the source map bean.
`protected boolean` | `controlSourceMap` Indicates if OverviewMap should be controlling sourceMap.
`static java.lang.String` | `ControlSourceMapProperty`
`static java.lang.String` | `defaultFrameTitle` Default Frame title for OverviewMapHandler
`static java.lang.String` | `defaultKey` Default key for Tool
`static float` | `defaultMinScale`
`static Length` | `defaultMinScaleUom`
`static float` | `defaultScaleFactor`
`protected java.lang.String` | `frameTitle` String The Frame Title
`static int` | `INITIAL_HEIGHT`
`static int` | `INITIAL_WIDTH`
`protected MapBean` | `map` The map of the overview panel.
`protected float` | `minScale` The minimum scale to use for the window.
`static java.lang.String` | `MinScaleProperty`
`protected Length` | `minScaleUom` The minimum scale unit of measure to use for the window.
`static java.lang.String` | `MinScaleUomProperty`
`protected MapMouseMode` | `mmm` The mouse mode to use for the overview map.
`protected java.awt.event.ActionListener` | `overviewFrameActionListener` The thing listening for a request to bring up a JFrame or JInternalFrame.
`static java.lang.String` | `OverviewMapHandlerLayerProperty`
`protected Proj` | `projection` The projection of the overview map bean.
`static java.lang.String` | `ProjectionTypeProperty`
`protected float` | `scaleFactor` The multiplier to apply to the scale of the project received.
`static java.lang.String` | `ScaleFactorProperty`
`protected MapBean` | `sourceMap` The source MapBean to show the overview of.
`protected Layer` | `statusLayer` A layer that can be set to constantly be on the top of the map.
`static java.lang.String` | `StatusLayerProperty`

Fields inherited from class com.bbn.openmap.gui.OMToolComponent
`c, gridbag, key, useAsTool, UseAsToolProperty`

Fields inherited from class com.bbn.openmap.gui.OMComponentPanel
`beanContextChildSupport, i18n, isolated, orientation, propertyPrefix, windowSupport`

Fields inherited from class javax.swing.JComponent
`accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW`

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`OverviewMapHandler()` Default constructor.
`OverviewMapHandler(MapBean srcMap, java.lang.String prefix, java.util.Properties props)` Create an OverviewMapHandler for given MapBean.
`OverviewMapHandler(java.util.Properties props)` Create an OverviewMapHandler with properties that do not contain a prefix.
`OverviewMapHandler(java.lang.String prefix, java.util.Properties props)` Create an OverviewMapHandler with properties that do contain a prefix.

Method Summary
`void` | `activateMouseMode()` Adds the mouse mode as a listener to the overview map.
`void` | `addControlledMap(MapBean l)` Add a controlled MapBean to the OverviewMapHandler.
`void` | `componentHidden(java.awt.event.ComponentEvent e)` Invoked when component has been hidden.
`void` | `componentMoved(java.awt.event.ComponentEvent e)`
`void` | `componentResized(java.awt.event.ComponentEvent e)`
`void` | `componentShown(java.awt.event.ComponentEvent e)` Invoked when component has been shown.
`protected void` | `createOverviewMap()` Create the MapBean used for the overview map, and suppress the copyright message at the same time.
`void` | `deactivateMouseMode()` Disconnects the mouse mode from the overview map.
`void` | `dispose()`
`void` | `findAndInit(java.lang.Object someObj)` Called when the OverviewMapHandler is added to the BeanContext, and whenever an object is added to the BeanContext after that.
`void` | `findAndUndo(java.lang.Object someObj)`
`boolean` | `getBackgroundSlave()` Get whether the map's background mimics changes to the source map's background.
`OverviewMapHandler.ControlledMapSupport` | `getControlledMapListeners()` Get the ControlledMapSupport, which usually contains the source map.
`boolean` | `getControlSourceMap()`
`java.awt.Container` | `getFace()` Tool interface method.
`java.lang.String` | `getFrameTitle()`
`MapBean` | `getMap()` Get the overview MapBean.
`float` | `getMinScale()`
`MapMouseMode` | `getMouseMode()` Get the MapMouseMode used for the overview map.
`java.awt.event.ActionListener` | `getOverviewFrameActionListener()` Return an ActionListener that will bring up an independent window with an Overview Map.
`Proj` | `getProjection()` Get the current projection of the overview MapBean.
`protected ProjectionFactory` | `getProjectionFactory()`
`java.util.Properties` | `getProperties(java.util.Properties props)` PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer.
`java.util.Properties` | `getPropertyInfo(java.util.Properties list)` Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer.
`float` | `getScaleFactor()` Get the scale factor used for the overview MapBean.
`MapBean` | `getSourceMap()` Get the map that the overview map is listening to.
`Layer` | `getStatusLayer()` Get the status layer, which is always drawn on top of the other layers, and maintained separately from other layers.
`void` | `init(java.util.Properties props)` Deprecated. use setProperties(props).
`void` | `init(java.lang.String prefix, java.util.Properties props)` Deprecated. use setProperties(prefix, props).
`void` | `projectionChanged(ProjectionEvent projEvent)` Part of the ProjectionListener interface.
`void` | `propertyChange(java.beans.PropertyChangeEvent pce)` PropertyChangeListener method, to listen for the source map's background changes.
`void` | `removeControlledMap(MapBean l)` Remove a controlled MapBean from the OverviewMapHandler.
`void` | `setBackgroundSlave(boolean set)` Set whether the map's background mimics changes to the source map's background.
`void` | `setControlledMapListeners(OverviewMapHandler.ControlledMapSupport list)` Set the ControlledMapSupport, which usually contains the source map.
`void` | `setControlSourceMap(boolean value)` Default value of this property is true.
`void` | `setFrameTitle(java.lang.String in_frameTitle)` Set the string used for the frame title of the overview map.
`void` | `setLayers(Layer[] layers)` Set the layers in the Overview MapBean.
`void` | `setMap(MapBean map)` Set the overview MapBean.
`void` | `setMinScale(float setting)` Set the minimum scale to use for the overview map.
`void` | `setMinScale(float width, Length uom)` Set the minimum scale to use for the overview map.
`void` | `setMouseMode(MapMouseMode ammm)` Set the MapMouseMode for the overview map.
`void` | `setProjection(Proj proj)` Set the projection of the overview MapBean.
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` Sets the properties for the `Layer`.
`void` | `setScaleFactor(float setting)` Set the scale factor to use between the source MapBean and the overview MapBean.
`void` | `setSourceMap(MapBean srcMap)` Sets the sourceMap associated with this OverviewMap.
`void` | `setStatusLayer(Layer layer)` Get the status layer, which is always drawn on top of the other layers, and maintained separately from other layers.

Methods inherited from class com.bbn.openmap.gui.OMToolComponent
`add, createLayout, getGridBagConstraints, getKey, getUseAsTool, setKey, setUseAsTool`

Methods inherited from class com.bbn.openmap.gui.OMComponentPanel
`addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, fireVetoableChange, getBeanContext, getOrientation, getPropertyPrefix, getWindowSupport, isIsolated, removeVetoableChangeListener, setBeanContext, setIsolated, setOrientation, setProperties, setPropertyPrefix, setWindowSupport`

Methods inherited from class javax.swing.JPanel
`getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

Methods inherited from class javax.swing.JComponent
`addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update`

Methods inherited from class java.awt.Container
`add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.bbn.openmap.PropertyConsumer
`getPropertyPrefix, setProperties, setPropertyPrefix`

Methods inherited from interface com.bbn.openmap.gui.Tool
`getOrientation, setOrientation`

Methods inherited from interface java.beans.beancontext.BeanContextChild
`addPropertyChangeListener, removePropertyChangeListener`

Field Detail

### OverviewMapHandlerLayerProperty

    public static final java.lang.String OverviewMapHandlerLayerProperty

See Also:
  Constant Field Values

### ScaleFactorProperty

    public static final java.lang.String ScaleFactorProperty

See Also:
  Constant Field Values

### ProjectionTypeProperty

    public static final java.lang.String ProjectionTypeProperty

See Also:
  Constant Field Values

### MinScaleProperty

    public static final java.lang.String MinScaleProperty

See Also:
  Constant Field Values

### MinScaleUomProperty

    public static final java.lang.String MinScaleUomProperty

See Also:
  Constant Field Values

### StatusLayerProperty

    public static final java.lang.String StatusLayerProperty

See Also:
  Constant Field Values

### ControlSourceMapProperty

    public static final java.lang.String ControlSourceMapProperty

See Also:
  Constant Field Values

### BackgroundSlaveProperty

    public static final java.lang.String BackgroundSlaveProperty

See Also:
  Constant Field Values

### defaultScaleFactor

    public static final float defaultScaleFactor

See Also:
  Constant Field Values

### defaultMinScale

    public static final float defaultMinScale

See Also:
  Constant Field Values

### defaultMinScaleUom

    public static final Length defaultMinScaleUom

### scaleFactor

    protected float scaleFactor

  The multiplier to apply to the scale of the project received.

### minScale

    protected float minScale

  The minimum scale to use for the window. If it gets too small with a general type layer, it won't be any use.

### minScaleUom

    protected Length minScaleUom

  The minimum scale unit of measure to use for the window. Use during initialization to compute a projection scale from a distance.

### map

    protected transient MapBean map

  The map of the overview panel.

### sourceMap

    protected transient MapBean sourceMap

  The source MapBean to show the overview of. Gets set when the first projectionChanged() gets called. Also used to disconnect from the MapBean when the component that this OverviewMapHandler is listening to is hidden, and to connect to the MapBean when the component is shown.

### projection

    protected transient Proj projection

  The projection of the overview map bean.

### statusLayer

    protected Layer statusLayer

  A layer that can be set to constantly be on the top of the map. If the status layer is also a OverviewMapStatusListener, it also receives the source map projection when that changes, which gives it the capability to draw stuff based on that.

### controlledMaps

    protected transient OverviewMapHandler.ControlledMapSupport controlledMaps

  The support to send the source MapBean setCenter and setScale commands if a controlled map is added - usually the source map bean.

### mmm

    protected MapMouseMode mmm

  The mouse mode to use for the overview map.

### overviewFrameActionListener

    protected java.awt.event.ActionListener overviewFrameActionListener

  The thing listening for a request to bring up a JFrame or JInternalFrame.

### controlSourceMap

    protected boolean controlSourceMap

  Indicates if OverviewMap should be controlling sourceMap.

### defaultFrameTitle

    public static final java.lang.String defaultFrameTitle

  Default Frame title for OverviewMapHandler

  See Also:
    Constant Field Values

### frameTitle

    protected java.lang.String frameTitle

  String The Frame Title

### defaultKey

    public static final java.lang.String defaultKey

  Default key for Tool

  See Also:
    Constant Field Values

### backgroundSlave

    protected boolean backgroundSlave

  Flag to change the background color to whatever the source map's is changed to. True by default.

### INITIAL_WIDTH

    public static final int INITIAL_WIDTH

See Also:
  Constant Field Values

### INITIAL_HEIGHT

    public static final int INITIAL_HEIGHT

See Also:
  Constant Field Values

Constructor Detail

### OverviewMapHandler

    public OverviewMapHandler()

  Default constructor. make sure init(someProperties) is called before you attempt to use this object

### OverviewMapHandler

    public OverviewMapHandler(java.util.Properties props)
                       throws java.lang.Exception

  Create an OverviewMapHandler with properties that do not contain a prefix.

  Parameters:
    `props` - properties object.
  Throws:
    `java.lang.Exception`

### OverviewMapHandler

    public OverviewMapHandler(java.lang.String prefix,
                              java.util.Properties props)
                       throws java.lang.Exception

  Create an OverviewMapHandler with properties that do contain a prefix.

  Parameters:
    `prefix` - the prefix for all the properties that apply to the OverviewMapHandler.
    `props` - properties object.
  Throws:
    `java.lang.Exception`

### OverviewMapHandler

    public OverviewMapHandler(MapBean srcMap,
                              java.lang.String prefix,
                              java.util.Properties props)
                       throws java.lang.Exception

  Create an OverviewMapHandler for given MapBean.

  Parameters:
    `srcMap` - srcMapBean
    `prefix` - the prefix to place in front of each property - i.e., so that each property will be under prefix.propertyName. The period between the two will be added.
    `props` - properties object.
  Throws:
    `java.lang.Exception`

Method Detail

### createOverviewMap

    protected void createOverviewMap()

  Create the MapBean used for the overview map, and suppress the copyright message at the same time.

### init

    public void init(java.util.Properties props)
              throws java.lang.Exception

  Deprecated. use setProperties(props).

  Initialize based on properties, which will not have a prefix.

  Throws:
    `java.lang.Exception`

### init

    public void init(java.lang.String prefix,
                     java.util.Properties props)
              throws java.lang.Exception

  Deprecated. use setProperties(prefix, props).

  Initialize an OverviewMapHandler with properties that do contain a prefix.

  Parameters:
    `prefix` - the prefix to place in front of each property - i.e., so that each property will be under prefix.propertyName. The period between the two will be added.
    `props` - properties object.
  Throws:
    `java.lang.Exception`

### setProperties

    public void setProperties(java.lang.String prefix,
                              java.util.Properties props)

  Sets the properties for the `Layer`. This allows `Layer` s to get a richer set of parameters than the `setArgs` method. Part of the PropertyConsumer interface. Layers which override this method should do something like:

       public void setProperties(String prefix, Properties props) {
           super.setProperties(prefix, props);
           // do local stuff
       }

  If the addToBeanContext property is not defined, it is set to false here.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `OMToolComponent`
  Parameters:
    `prefix` - the token to prefix the property names
    `props` - the `Properties` object

### getProjectionFactory

    protected ProjectionFactory getProjectionFactory()

### getProperties

    public java.util.Properties getProperties(java.util.Properties props)

  PropertyConsumer method, to fill in a Properties object, reflecting the current values of the layer. If the layer has a propertyPrefix set, the property keys should have that prefix plus a separating '.' prepended to each property key it uses for configuration.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Overrides:
    `getProperties` in class `OMToolComponent`
  Parameters:
    `props` - a Properties object to load the PropertyConsumer properties into. If props equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### getPropertyInfo

    public java.util.Properties getPropertyInfo(java.util.Properties list)

  Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. The key for each property should be the raw property name (without a prefix) with a value that is a String that describes what the property key represents, along with any other information about the property that would be helpful (range, default value, etc.). For Layer, this method should at least return the 'prettyName' property.

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Overrides:
    `getPropertyInfo` in class `OMToolComponent`
  Parameters:
    `list` - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
  Returns:
    Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

### setSourceMap

    public void setSourceMap(MapBean srcMap)

  Sets the sourceMap associated with this OverviewMap. if controlSourceMap property is set, srcMap will also be controlled by this OverviewHandler Passing a null value will remove the current sourceMap from the list of Maps that this handler is controlling and set sourceMap to null.

  Parameters:
    `srcMap` - the master map.

### getSourceMap

    public MapBean getSourceMap()

  Get the map that the overview map is listening to.

### setFrameTitle

    public void setFrameTitle(java.lang.String in_frameTitle)

  Set the string used for the frame title of the overview map.

### getFrameTitle

    public java.lang.String getFrameTitle()

### setBackgroundSlave

    public void setBackgroundSlave(boolean set)

  Set whether the map's background mimics changes to the source map's background.

  Parameters:
    `set` - true to enable mimicking.

### getBackgroundSlave

    public boolean getBackgroundSlave()

  Get whether the map's background mimics changes to the source map's background.

### setControlSourceMap

    public void setControlSourceMap(boolean value)

  Default value of this property is true. if you want your sourceMap to be controlled by this OverviewMapHandler, set the value of this property for this OverviewHandler. This will allow, for instance, clicking on the overview map to recenter the source map. That depends on the overview map mouse mode, however.

  Parameters:
    `value` -

### getControlSourceMap

    public boolean getControlSourceMap()

### setLayers

    public void setLayers(Layer[] layers)

  Set the layers in the Overview MapBean. An AreaLayer is automatically added on top.

### projectionChanged

    public void projectionChanged(ProjectionEvent projEvent)

  Part of the ProjectionListener interface. The new projections from the source MapBean arrive here.

  Specified by:
    `projectionChanged` in interface `ProjectionListener`
  Parameters:
    `projEvent` - the projection event from the source MapBean.

### setMouseMode

    public void setMouseMode(MapMouseMode ammm)

  Set the MapMouseMode for the overview map. If you want the status layer to listen to the mouse mode, you have to get the layer and wire it up yourself.

### getMouseMode

    public MapMouseMode getMouseMode()

  Get the MapMouseMode used for the overview map.

### activateMouseMode

    public void activateMouseMode()

  Adds the mouse mode as a listener to the overview map. If the mouse mode is null, the default is created.

### deactivateMouseMode

    public void deactivateMouseMode()

  Disconnects the mouse mode from the overview map.

### addControlledMap

    public void addControlledMap(MapBean l)

  Add a controlled MapBean to the OverviewMapHandler. Use this method to add another MapBean to the overview map in order to have its projection controlled by the overview panel. If the overview panel is clicked on, the listening MapBean will be recentered. If a box is drawn with a mouse drag, the scale of the controlled map will be modified.

  Parameters:
    `l` - MapBean.

### removeControlledMap

    public void removeControlledMap(MapBean l)

  Remove a controlled MapBean from the OverviewMapHandler.

  Parameters:
    `l` - a MapBean.

### getMap

    public MapBean getMap()

  Get the overview MapBean.

  Returns:
    overview MapBean.

### setMap

    public void setMap(MapBean map)

  Set the overview MapBean.

### getControlledMapListeners

    public OverviewMapHandler.ControlledMapSupport getControlledMapListeners()

  Get the ControlledMapSupport, which usually contains the source map.

### setControlledMapListeners

    public void setControlledMapListeners(OverviewMapHandler.ControlledMapSupport list)

  Set the ControlledMapSupport, which usually contains the source map.

### getStatusLayer

    public Layer getStatusLayer()

  Get the status layer, which is always drawn on top of the other layers, and maintained separately from other layers.

### setStatusLayer

    public void setStatusLayer(Layer layer)

  Get the status layer, which is always drawn on top of the other layers, and maintained separately from other layers. If the layer is also an OverviewMapStatusListener, it will receive source map projection changes, so it can draw stuff on itself representing what's going on the source map.

### setScaleFactor

    public void setScaleFactor(float setting)

  Set the scale factor to use between the source MapBean and the overview MapBean. It's a direct multiplier, so the overview MapBean can actually be a magnified map, too. The overview map scale = source MapBean scale * scaleFactor.

  Parameters:
    `setting` - scale factor

### getScaleFactor

    public float getScaleFactor()

  Get the scale factor used for the overview MapBean.

### setProjection

    public void setProjection(Proj proj)

  Set the projection of the overview MapBean. Lets you set the type, really. The scale and center will be reset when a projection event is received.

### getProjection

    public Proj getProjection()

  Get the current projection of the overview MapBean.

### setMinScale

    public void setMinScale(float setting)

  Set the minimum scale to use for the overview map. If this is set too small with a very general map layer, it won't be of any use, really, if it gets really zoomed in.

  Parameters:
    `setting` - the scale setting - 1:setting

### setMinScale

    public void setMinScale(float width,
                            Length uom)

  Set the minimum scale to use for the overview map. If this is set too small with a very general map layer, it won't be of any use, really, if it gets really zoomed in.

  Parameters:
    `width` - setting the scale setting - 1:setting
    `uom` - unit of measure for width

### getMinScale

    public float getMinScale()

### componentShown

    public void componentShown(java.awt.event.ComponentEvent e)

  Invoked when component has been shown. This component should be the component that contains the OverviewMapHandler.

  Specified by:
    `componentShown` in interface `java.awt.event.ComponentListener`

### componentHidden

    public void componentHidden(java.awt.event.ComponentEvent e)

  Invoked when component has been hidden. This component should be the component that contains the OverviewMapHandler.

  Specified by:
    `componentHidden` in interface `java.awt.event.ComponentListener`

### componentResized

    public void componentResized(java.awt.event.ComponentEvent e)

  Specified by:
    `componentResized` in interface `java.awt.event.ComponentListener`

### componentMoved

    public void componentMoved(java.awt.event.ComponentEvent e)

  Specified by:
    `componentMoved` in interface `java.awt.event.ComponentListener`

### getOverviewFrameActionListener

    public java.awt.event.ActionListener getOverviewFrameActionListener()

  Return an ActionListener that will bring up an independent window with an Overview Map.

  Returns:
    ActionListener that brings up a Window when an actionPerformed is called.

### getFace

    public java.awt.Container getFace()

  Tool interface method.

  Specified by:
    `getFace` in interface `Tool`
  Overrides:
    `getFace` in class `OMToolComponent`
  Returns:
    The container GUI for this tool, may be null.

### findAndInit

    public void findAndInit(java.lang.Object someObj)

  Called when the OverviewMapHandler is added to the BeanContext, and whenever an object is added to the BeanContext after that. The OverviewMapHandler looks for a MapBean to use as a source map, and for a PropertiesHandler object to use to load itself with layers and other properties. If a source MapBean is already set and another MapBean is found, the last MapBean will be used as the source MapBean. Every time a PropertyHandler is found, the OverviewMapHandler will reinitialize itself.

  Specified by:
    `findAndInit` in interface `LightMapHandlerChild`
  Overrides:
    `findAndInit` in class `OMComponentPanel`
  Parameters:
    `someObj` - the object being added to the BeanContext

### findAndUndo

    public void findAndUndo(java.lang.Object someObj)

  Specified by:
    `findAndUndo` in interface `LightMapHandlerChild`
  Overrides:
    `findAndUndo` in class `OMComponentPanel`

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent pce)

  PropertyChangeListener method, to listen for the source map's background changes. Act on if necessary.

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

### dispose

    public void dispose()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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