## com.bbn.openmap.plugin
Class OMGraphicHandlerPlugIn

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

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

Direct Known Subclasses:
  CSVTiledImagePlugIn, GraphicLoaderPlugIn, UTMGridPlugIn

public class OMGraphicHandlerPlugIn
extends BeanContextAbstractPlugIn
implements OMGraphicHandler

A PlugIn that implements the OMGraphicHandler interface.

Field Summary
`protected FilterSupport` `filter`
`protected OMGraphicList` `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
`OMGraphicHandlerPlugIn()`
`OMGraphicHandlerPlugIn(java.awt.Component comp)`

Method Summary
`boolean` `canSetList()` Indicates if the OMGraphicHandler can have its OMGraphicList set.
`boolean` `doAction(OMGraphic graphic, OMAction action)` Allows the OMGraphicHandler to receive graphics or take some action on one.
`OMGraphicList` `filter(java.awt.Shape withinThisShape)` Filters the OMGraphicHandler graphic list so that graphics within the given shape will be visible.
`OMGraphicList` `filter(java.awt.Shape shapeBoundary, boolean getInsideBoundary)` Filters the OMGraphicHandler graphic list so that graphics inside or outside the given shape will be visible.
`OMGraphicList` `filter(java.lang.String SQLQuery)` Filters the OMGraphicHandler graphic list so that graphics meeting the SQL query statement will be visible.
`FilterSupport` `getFilter()` Get the FilterSupport object that is handling the OMGraphicHandler methods.
`OMGraphicList` `getList()` Return the graphic list currently being used by the OMGraphicHandler.
`OMGraphicList` `getRectangle(Projection p)` The getRectangle call is the main call into the PlugIn module.
`void` `resetFiltering()` Remove all filters, and reset all graphics to be visible.
`void` `setFilter(FilterSupport fs)` Don't set to null.
`void` `setList(OMGraphicList omgl)` Set the OMGraphicList within this OMGraphicHandler.
`boolean` `supportsSQL()` Returns true if the OMGraphicHandler can handle SQL statements for filtering.

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

Methods inherited from class com.bbn.openmap.plugin.AbstractPlugIn

`doPrepare, getAddToBeanContext, getComponent, getGUI, getMapMouseListener, getMouseModeServiceList, getName, getProperties, getPropertyInfo, getPropertyPrefix, isRemovable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, removed, repaint, setAddToBeanContext, setComponent, setMapMouseListener, setName, setProperties, setProperties, setPropertyPrefix, setRemovable`

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

Field Detail

### list

    protected OMGraphicList list

### filter

    protected FilterSupport filter

Constructor Detail

### OMGraphicHandlerPlugIn

    public OMGraphicHandlerPlugIn()

### OMGraphicHandlerPlugIn

    public OMGraphicHandlerPlugIn(java.awt.Component comp)

Method Detail

### setFilter

    public void setFilter(FilterSupport fs)

  Don't set to null. This is here to let subclasses put a more/less capable FilterSupport in place.

### getFilter

    public FilterSupport getFilter()

  Get the FilterSupport object that is handling the OMGraphicHandler methods.

### 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`
  Specified by:
    `getRectangle` in class `AbstractPlugIn`
  Parameters:
    `p` - projection of the screen, holding scale, center coords, height, width.

### filter

    public OMGraphicList filter(java.awt.Shape withinThisShape)

  Description copied from interface: `OMGraphicHandler`
  Filters the OMGraphicHandler graphic list so that graphics within the given shape will be visible. Returns an OMGeometryList with those visible shapes. The returned list should not be assumed to be the same OMGraphicList object that is maintained inside the OMGraphicHandler. Same as calling filter(withinThisShape, true).

  Specified by:
    `filter` in interface `OMGraphicHandler`
  Parameters:
    `withinThisShape` - java.awt.Shape object defining a boundary.
  Returns:
    OMGraphicList containing OMGraphics that are within the Shape.

### filter

    public OMGraphicList filter(java.awt.Shape shapeBoundary,
                                boolean getInsideBoundary)

  Description copied from interface: `OMGraphicHandler`
  Filters the OMGraphicHandler graphic list so that graphics inside or outside the given shape will be visible. Returns an OMGraphicList with those visible shapes. The returned list should not be assumed to be the same OMGraphicList object that is maintained inside the OMGraphicHandler.

  Specified by:
    `filter` in interface `OMGraphicHandler`
  Parameters:
    `shapeBoundary` - java.awt.Shape object defining a boundary.
    `getInsideBoundary` - if true, the filter will look for shapes inside and contacting the boundary. If false, the filter will look for shapes outside the boundary.
  Returns:
    OMGraphicList containing OMGraphics that are within the Shape.
  See Also:
    `OMGraphicHandler.filter(Shape, boolean).`

### supportsSQL

    public boolean supportsSQL()

  Description copied from interface: `OMGraphicHandler`
  Returns true if the OMGraphicHandler can handle SQL statements for filtering.

  Specified by:
    `supportsSQL` in interface `OMGraphicHandler`
  See Also:
    `OMGraphicHandler.supportsSQL().`

### filter

    public OMGraphicList filter(java.lang.String SQLQuery)

  Description copied from interface: `OMGraphicHandler`
  Filters the OMGraphicHandler graphic list so that graphics meeting the SQL query statement will be visible. Returns an OMGraphicList with those visible shapes. The returned list should not be assumed to be the same OMGraphicList object that is maintained inside the OMGraphicHandler.

  Specified by:
    `filter` in interface `OMGraphicHandler`
  Parameters:
    `SQLQuery` - a SELECT SQL statement
  Returns:
    OMGraphicList containing OMGraphics that meet the SELECT statemenet criteria.

### doAction

    public boolean doAction(OMGraphic graphic,
                            OMAction action)

  Description copied from interface: `OMGraphicHandler`
  Allows the OMGraphicHandler to receive graphics or take some action on one.

  Specified by:
    `doAction` in interface `OMGraphicHandler`
  Parameters:
    `graphic` - the OMGraphic to do the action on.
    `action` - the OMAction describing what to do to the graphic.
  Returns:
    true if the action was able to be carried out.

### getList

    public OMGraphicList getList()

  Description copied from interface: `OMGraphicHandler`
  Return the graphic list currently being used by the OMGraphicHandler. If filters have been applied, then the OMGraphics that have made it through the filter are visible.

  Specified by:
    `getList` in interface `OMGraphicHandler`
  See Also:
    `BasicGeometry.isVisible().`

### canSetList

    public boolean canSetList()

  Indicates if the OMGraphicHandler can have its OMGraphicList set.

  Specified by:
    `canSetList` in interface `OMGraphicHandler`

### setList

    public void setList(OMGraphicList omgl)

  Set the OMGraphicList within this OMGraphicHandler. Works if canSetGraphicList == true.

  Specified by:
    `setList` in interface `OMGraphicHandler`

### resetFiltering

    public void resetFiltering()

  Remove all filters, and reset all graphics to be visible.

  Specified by:
    `resetFiltering` in interface `OMGraphicHandler`

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