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.plugin.graphicLoader
Class GraphicLoaderPlugIn

    java.lang.Object
      com.bbn.openmap.plugin.AbstractPlugIn
          com.bbn.openmap.plugin.BeanContextAbstractPlugIn
              com.bbn.openmap.plugin.OMGraphicHandlerPlugIn
                  com.bbn.openmap.plugin.graphicLoader.GraphicLoaderPlugIn

All Implemented Interfaces:
  java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, MapMouseListener, OMGraphicHandler, PlugIn, PropertyConsumer

public class GraphicLoaderPlugIn
extends OMGraphicHandlerPlugIn

A GraphicLoaderPlugIn is a PlugIn that receives its OMGraphics from some other source, at any time. It just listens to its GraphicLoader for updates to the OMGraphicList, and then updates the map as necessary.

The GraphicLoaderPlugIn passes projection changes onto the GraphicLoader, and if the GraphicLoader is a MapMouseListener, the GraphicLoaderPlugIn will defer all MouseEvents to it.

To add a GraphicLoader to the OpenMap application, you can do it several ways:

- You can create a specific GraphicLoaderPlugIn that creates its own GraphicLoader, and initializes it accordingly. You would add the GraphicLoaderPlugIn to the openmap.layers property in the openmap.properties file.
- You can create a GraphicLoaderPlugIn by adding an entry to the openmap.layer property in the openmap.properties file, and define what kind of GraphicLoader to create in the properties for the GraphicLoaderPlugIn.

        graphicLoaderPlugIn.class=com.bbn.openmap.plugin.graphicLoader.GraphicLoaderPlugIn
        graphicLoaderPlugIn.prettyName=Name of Layer
        graphicLoaderPlugIn.graphicLoader=GraphicLoader Classname
        graphicLoaderPlugIn.addGraphicLoaderToMapHandler=true/false (false by default)

- You can add a com.bbn.openmap.plugin.graphicLoader.GraphicLoaderConnector to the openmap.components property, and then add the GraphicLoader to the openmap.components property as well. The GraphicLoaderConnector will find the GraphicLoader, and create a GraphicLoaderPlugIn/PlugInLayer for the GraphicLoader and add it to the LayerHandler on top of the map.

Field Summary
`protected boolean` | `addGraphicLoaderToMapHandler`
`static java.lang.String` | `AddGraphicLoaderToMapHandlerProperty`
`static java.lang.String` | `GraphicLoaderProperty`
`protected GraphicLoader` | `loader`
`protected java.lang.Object` | `lock`
`protected boolean` | `needToAddGraphicLoaderToMapHandler`

Fields inherited from class com.bbn.openmap.plugin.OMGraphicHandlerPlugIn
`filter, list`

Fields inherited from class com.bbn.openmap.plugin.BeanContextAbstractPlugIn
`beanContextChildSupport`

Fields inherited from class com.bbn.openmap.plugin.AbstractPlugIn
`addToBeanContext, component, i18n, mml, name, prefix, removable, RemovableProperty`

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

Constructor Summary
`GraphicLoaderPlugIn()`
`GraphicLoaderPlugIn(java.awt.Component comp)`

Method Summary
`boolean` | `doAction(OMGraphic graphic, OMAction action)` OMGraphicHandler method.
`boolean` | `getAddGraphicLoaderToMapHandler()`
`GraphicLoader` | `getGraphicLoader()` Get the GraphicLoader loader.
`java.awt.Component` | `getGUI()` Standard PlugIn method to provide palette.
`java.util.Properties` | `getProperties(java.util.Properties props)` PropertyConsumer interface method.
`java.util.Properties` | `getPropertyInfo(java.util.Properties props)` PropertyConsumer interface method.
`OMGraphicList` | `getRectangle(Projection p)` The getRectangle call is the main call into the PlugIn module.
`void` | `setAddGraphicLoaderToMapHandler(boolean val)` Set whether to add the GraphicLoader, which is assumed to yet be added to the GraphicLoaderPlugIn, to the MapHandler.
`void` | `setBeanContext(java.beans.beancontext.BeanContext in_bc)` Method for BeanContextChild interface.
`void` | `setGraphicLoader(GraphicLoader gl)` Set the GraphicLoader for the PlugIn.
`void` | `setList(OMGraphicList graphics)` OMGraphicHandler method.
`void` | `setProperties(java.lang.String prefix, java.util.Properties props)` PropertyConsumer interface method.

Methods inherited from class com.bbn.openmap.plugin.OMGraphicHandlerPlugIn
`canSetList, filter, filter, filter, getFilter, getList, resetFiltering, setFilter, supportsSQL`

Methods inherited from class com.bbn.openmap.plugin.BeanContextAbstractPlugIn
`addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, findAndInit, findAndUndo, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener`

Methods inherited from class com.bbn.openmap.plugin.AbstractPlugIn
`doPrepare, getAddToBeanContext, getComponent, getMapMouseListener, getMouseModeServiceList, getName, getPropertyPrefix, isRemovable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, removed, repaint, setAddToBeanContext, setComponent, setMapMouseListener, setName, setProperties, setPropertyPrefix, setRemovable`

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

Field Detail

### loader

    protected GraphicLoader loader

### GraphicLoaderProperty

    public static final java.lang.String GraphicLoaderProperty

See Also:
  Constant Field Values

### AddGraphicLoaderToMapHandlerProperty

    public static final java.lang.String AddGraphicLoaderToMapHandlerProperty

See Also:
  Constant Field Values

### addGraphicLoaderToMapHandler

    protected boolean addGraphicLoaderToMapHandler

### needToAddGraphicLoaderToMapHandler

    protected boolean needToAddGraphicLoaderToMapHandler

### lock

    protected java.lang.Object lock

Constructor Detail

### GraphicLoaderPlugIn

    public GraphicLoaderPlugIn()

### GraphicLoaderPlugIn

    public GraphicLoaderPlugIn(java.awt.Component comp)

Parameters:
  `comp` - the PlugInLayer to work with.

Method Detail

### getRectangle

    public OMGraphicList getRectangle(Projection p)

  The getRectangle call is the main call into the PlugIn module. The module is expected to fill the graphics list with objects that are within the screen parameters passed.

  Specified by:
    `getRectangle` in interface `PlugIn`
  Overrides:
    `getRectangle` in class `OMGraphicHandlerPlugIn`
  Parameters:
    `p` - projection of the screen, holding scale, center coords, height, width.

### setList

    public void setList(OMGraphicList graphics)

  OMGraphicHandler method. This will cause doPrepare() to be called on the PlugInLayer, which will result in a getRectangle() being called the GraphicLoaderPlugIn, which will in turn cause setProjection() to be called on the GraphicLoader. Watch out, in the GraphicLoader, for setting the list as a result of a projection change - you can get into a loop. The AbstractGraphicLoader checks to see if the projection has changed.

  Specified by:
    `setList` in interface `OMGraphicHandler`
  Overrides:
    `setList` in class `OMGraphicHandlerPlugIn`

### doAction

    public boolean doAction(OMGraphic graphic,
                            OMAction action)

  OMGraphicHandler method.

  Specified by:
    `doAction` in interface `OMGraphicHandler`
  Overrides:
    `doAction` in class `OMGraphicHandlerPlugIn`

### setGraphicLoader

    public void setGraphicLoader(GraphicLoader gl)

  Set the GraphicLoader for the PlugIn. If the GraphicLoader is a MapMouseListener, it will be used as such for this PlugIn.

### getGraphicLoader

    public GraphicLoader getGraphicLoader()

  Get the GraphicLoader loader.

### setAddGraphicLoaderToMapHandler

    public void setAddGraphicLoaderToMapHandler(boolean val)

  Set whether to add the GraphicLoader, which is assumed to yet be added to the GraphicLoaderPlugIn, to the MapHandler.

### getAddGraphicLoaderToMapHandler

    public boolean getAddGraphicLoaderToMapHandler()

### setBeanContext

    public void setBeanContext(java.beans.beancontext.BeanContext in_bc)
                        throws java.beans.PropertyVetoException

  Method for BeanContextChild interface. Adds this object as a BeanContextMembership listener, set the BeanContext in this objects BeanContextSupport, and receives the initial list of objects currently contained in the BeanContext.

  Specified by:
    `setBeanContext` in interface `java.beans.beancontext.BeanContextChild`
  Overrides:
    `setBeanContext` in class `BeanContextAbstractPlugIn`
  Throws:
    `java.beans.PropertyVetoException`

### setProperties

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

  PropertyConsumer interface method.

  Specified by:
    `setProperties` in interface `PropertyConsumer`
  Overrides:
    `setProperties` in class `AbstractPlugIn`
  Parameters:
    `prefix` - a String used by the PropertyConsumer to prepend to each property value it wants to look up - setList.getProperty(prefix.propertyKey). If the prefix had already been set, then the prefix passed in should replace that previous value.
    `props` - a Properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.
  See Also:
    `PropertyConsumer`

### getProperties

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

  PropertyConsumer interface method.

  Specified by:
    `getProperties` in interface `PropertyConsumer`
  Overrides:
    `getProperties` in class `AbstractPlugIn`
  Parameters:
    `props` - 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.
  See Also:
    `PropertyConsumer`

### getPropertyInfo

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

  PropertyConsumer interface method.

  Specified by:
    `getPropertyInfo` in interface `PropertyConsumer`
  Overrides:
    `getPropertyInfo` in class `AbstractPlugIn`
  Parameters:
    `props` - 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.
  See Also:
    `PropertyConsumer`

### getGUI

    public java.awt.Component getGUI()

  Standard PlugIn method to provide palette. Differed to the GraphicLoader.

  Specified by:
    `getGUI` in interface `PlugIn`
  Overrides:
    `getGUI` in class `AbstractPlugIn`

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