## com.bbn.openmap.omGraphics
Interface OMGraphicHandler

All Known Implementing Classes:
  FilterSupport, OMGraphicHandlerPlugIn

public interface OMGraphicHandler

This interface describes an object that manages OMGraphics. It provides a mechanism to filter what OMGraphics are displayed based on some criteria, and can also return graphics based on those criteria. It's assumed that when a filter is applied to an OMGraphicHandler, that it stays in place until resetFiltering() is called. Calling multiple filters sets a chain.

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.
`OMGraphicList` `getList()` Return the graphic list currently being used by the OMGraphicHandler.
`void` `resetFiltering()` Remove all filters, and reset all graphics to be visible.
`void` `setList(OMGraphicList omgl)` Set the OMGraphicList within this OMGraphicHandler.
`boolean` `supportsSQL()` Returns true if the OMGraphicHandler can handle SQL statements for filtering.

Method Detail

### filter

    public OMGraphicList filter(java.awt.Shape withinThisShape)

  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).

  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)

  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.

  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.

### supportsSQL

    public boolean supportsSQL()

  Returns true if the OMGraphicHandler can handle SQL statements for filtering.

### filter

    public OMGraphicList filter(java.lang.String SQLQuery)

  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.

  Parameters:
    `SQLQuery` - a SELECT SQL statement
  Returns:
    OMGraphicList containing OMGraphics that meet the SELECT statemenet criteria.

### doAction

    public boolean doAction(OMGraphic graphic,
                            OMAction action)

  Allows the OMGraphicHandler to receive graphics or take some action on one.

  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()

  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.

  See Also:
    `BasicGeometry.isVisible().`

### canSetList

    public boolean canSetList()

  Indicates if the OMGraphicHandler can have its OMGraphicList set.

### setList

    public void setList(OMGraphicList omgl)

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

### resetFiltering

    public void resetFiltering()

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

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