## com.bbn.openmap.omGraphics.event
Class TestResponsePolicy

    java.lang.Object
      com.bbn.openmap.omGraphics.event.TestResponsePolicy

All Implemented Interfaces:
  GestureResponsePolicy

public class TestResponsePolicy
extends java.lang.Object
implements GestureResponsePolicy

Field Summary
`protected OMGraphicList` `selected`

Constructor Summary
`TestResponsePolicy()`

Method Summary
`OMGraphicList` `copy(OMGraphicList omgl)` A notification that the OMGraphics on the list should be copied (duplicated and returned) and deselected.
`OMGraphicList` `cut(OMGraphicList omgl)` A notification that the OMGraphics on the list should be cut (deleted and returned) from the list and deselected.
`void` `deselect(OMGraphicList omgl)` A notification that the OMGraphics on the list should be considered to be deselected.
`java.lang.String` `getInfoText(OMGraphic omg)` A request for a string to be provided to use in the information line of the InformationDelegator, for instance.
`java.util.List` `getItemsForMapMenu(MapMouseEvent me)` Return a JMenu with contents applicable to a popup menu for a location over the map.
`java.util.List` `getItemsForOMGraphicMenu(OMGraphic omg)` Return a java.util.List containing input for a JMenu with contents applicable to a popup menu for a location over an OMGraphic.
`OMGraphicList` `getSelected()` A query to get a list of all the OMGraphics that are current selected.
`java.lang.String` `getToolTipTextFor(OMGraphic omg)` A request for a string to be provided to use as a tool tip for an OMGraphic.
`void` `highlight(OMGraphic omg)` Fleeting change of appearance.
`boolean` `isHighlightable(OMGraphic omg)` A query from the MapMouseInterpreter wondering if it should ask any questions about the given OMGraphic concerning mouse movement and mouse dragged gestures.
`boolean` `isSelectable(OMGraphic omg)` A query from the MapMouseInterpreter wondering if the OMGraphic is selectable.
`boolean` `leftClick(MapMouseEvent mme)` A notification that the mouse has been clicked with the left mouse button on the map, and not on any of the OMGraphics.
`boolean` `mouseOver(MapMouseEvent mme)` A notification that the mouse cursor has been moved over the map, not over any of the OMGraphics on the GestureResponsePolicy.
`void` `paste(OMGraphicList omgl)` A notification that the OMGraphics on the list should be added to the list and selected.
`boolean` `receivesMapEvents()` A query from the MapMouseInterpreter wondering if the GestureResponsePolicy wants events pertaining to mouse movements over the map that are not over an OMGraphic.
`void` `select(OMGraphicList omgl)` A notification that the OMGraphics on the list should be considered to be selected.
`void` `unhighlight(OMGraphic omg)` A notification that the OMGraphic is no longer needed to be highlighted and that its appearance can go back to normal.

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

Field Detail

### selected

    protected OMGraphicList selected

Constructor Detail

### TestResponsePolicy

    public TestResponsePolicy()

Method Detail

### isHighlightable

    public boolean isHighlightable(OMGraphic omg)

  Description copied from interface: `GestureResponsePolicy`
  A query from the MapMouseInterpreter wondering if it should ask any questions about the given OMGraphic concerning mouse movement and mouse dragged gestures. Highlighting is usually means reactions in anticipation of selection.

  Specified by:
    `isHighlightable` in interface `GestureResponsePolicy`

### isSelectable

    public boolean isSelectable(OMGraphic omg)

  Description copied from interface: `GestureResponsePolicy`
  A query from the MapMouseInterpreter wondering if the OMGraphic is selectable. Returns true if the OMGraphic is able to be selected for modification, deletion or movement. Selection may happen to an OMGraphic by itself or in a group of other OMGraphics.

  Specified by:
    `isSelectable` in interface `GestureResponsePolicy`

### receivesMapEvents

    public boolean receivesMapEvents()

  Description copied from interface: `GestureResponsePolicy`
  A query from the MapMouseInterpreter wondering if the GestureResponsePolicy wants events pertaining to mouse movements over the map that are not over an OMGraphic. If the GestureResponsePolicy responds true, then the mouseOver and leftClick methods will be called on the GestureResponsePolicy by the interpreter. There is no rightClick method that is called, because a right click will always cause a getItemsForMapMenu() method to be called.

  Specified by:
    `receivesMapEvents` in interface `GestureResponsePolicy`

### getSelected

    public OMGraphicList getSelected()

  Description copied from interface: `GestureResponsePolicy`
  A query to get a list of all the OMGraphics that are current selected.

  Specified by:
    `getSelected` in interface `GestureResponsePolicy`

### highlight

    public void highlight(OMGraphic omg)

  Fleeting change of appearance.

  Specified by:
    `highlight` in interface `GestureResponsePolicy`

### unhighlight

    public void unhighlight(OMGraphic omg)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the OMGraphic is no longer needed to be highlighted and that its appearance can go back to normal.

  Specified by:
    `unhighlight` in interface `GestureResponsePolicy`

### select

    public void select(OMGraphicList omgl)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the OMGraphics on the list should be considered to be selected.

  Specified by:
    `select` in interface `GestureResponsePolicy`

### deselect

    public void deselect(OMGraphicList omgl)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the OMGraphics on the list should be considered to be deselected.

  Specified by:
    `deselect` in interface `GestureResponsePolicy`

### cut

    public OMGraphicList cut(OMGraphicList omgl)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the OMGraphics on the list should be cut (deleted and returned) from the list and deselected. If the GRP doesn't want to provide that capability, it should return null.

  Specified by:
    `cut` in interface `GestureResponsePolicy`

### copy

    public OMGraphicList copy(OMGraphicList omgl)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the OMGraphics on the list should be copied (duplicated and returned) and deselected. If the GRP doesn't want to provide that capability, it should return null.

  Specified by:
    `copy` in interface `GestureResponsePolicy`

### paste

    public void paste(OMGraphicList omgl)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the OMGraphics on the list should be added to the list and selected.

  Specified by:
    `paste` in interface `GestureResponsePolicy`

### getInfoText

    public java.lang.String getInfoText(OMGraphic omg)

  Description copied from interface: `GestureResponsePolicy`
  A request for a string to be provided to use in the information line of the InformationDelegator, for instance. If no information should be presented on behalf of this OMGraphic, null should be returned.

  Specified by:
    `getInfoText` in interface `GestureResponsePolicy`

### getToolTipTextFor

    public java.lang.String getToolTipTextFor(OMGraphic omg)

  Description copied from interface: `GestureResponsePolicy`
  A request for a string to be provided to use as a tool tip for an OMGraphic. If a tool tip should not be displayed, null should be returned.

  Specified by:
    `getToolTipTextFor` in interface `GestureResponsePolicy`

### getItemsForMapMenu

    public java.util.List getItemsForMapMenu(MapMouseEvent me)

  Description copied from interface: `GestureResponsePolicy`
  Return a JMenu with contents applicable to a popup menu for a location over the map. The popup doesn't concern any OMGraphics, and should be presented for a click on the map background.

  Specified by:
    `getItemsForMapMenu` in interface `GestureResponsePolicy`
  Parameters:
    `me` - a MapMouseEvent describing the location over where the menu items should apply, in case different options are appropriate for different places.
  Returns:
    a List containing java.awt.Component options over the provided place on the map. Return null or empty List if no input required.

### getItemsForOMGraphicMenu

    public java.util.List getItemsForOMGraphicMenu(OMGraphic omg)

  Description copied from interface: `GestureResponsePolicy`
  Return a java.util.List containing input for a JMenu with contents applicable to a popup menu for a location over an OMGraphic.

  Specified by:
    `getItemsForOMGraphicMenu` in interface `GestureResponsePolicy`
  Returns:
    a List containing java.awt.Component options for the given OMGraphic. Return null or empty list if there are no options.

### mouseOver

    public boolean mouseOver(MapMouseEvent mme)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the mouse cursor has been moved over the map, not over any of the OMGraphics on the GestureResponsePolicy. This only gets called if the response to receivesMapEvents is true.

  Specified by:
    `mouseOver` in interface `GestureResponsePolicy`
  Parameters:
    `mme` - MapMouseEvent describing the location of the mouse.
  Returns:
    true of this information is to be considered consumed and should not be passed to anybody else.

### leftClick

    public boolean leftClick(MapMouseEvent mme)

  Description copied from interface: `GestureResponsePolicy`
  A notification that the mouse has been clicked with the left mouse button on the map, and not on any of the OMGraphics. This only gets called if the response to receivesMapEvents is true. Right clicks on the map are always reported to the getItemsForMapMenu method.

  Specified by:
    `leftClick` in interface `GestureResponsePolicy`
  Parameters:
    `mme` - MapMouseEvent describing the location of the mouse.
  Returns:
    true of this information is to be considered consumed and should not be passed to anybody else.

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