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

## org.ka2ddo.yaac.pluginapi
Class AbstractPopupMenuAction

    java.lang.Object
      org.ka2ddo.yaac.pluginapi.AbstractMenuAction
          org.ka2ddo.yaac.pluginapi.AbstractPopupMenuAction

All Implemented Interfaces:
  AddToPopupMapMenuIfc

    public abstract class AbstractPopupMenuAction

extends AbstractMenuAction
implements AddToPopupMapMenuIfc

This class defines the general contract for a popup menu action, using the same rules as for a menu bar action. Additional methods are defined so that the menu entry can be selectively added to the popup menu depending on the context being popped up, i.e., does it make sense to have this menu entry for the right-clicked context invoking the popup menu? Note that popup menus can be invoked both on the YAAC map window (contained in the `MainFrame` window and drawn by its subsidiary `StationRenderer` and `OSMLayer` map layers), and in tabular views such as the `RawPacketPane` and `StationListViewer`.

See Also:
  `AddToPopupMapMenuIfc.testIfIncluded(int, int, com.bbn.openmap.proj.Projection)`

Field Summary
`protected java.util.ArrayList<StationState>` | `matchList` ArrayList of stations and objects located at the clicked point on the map.
`protected int` | `mouseX` Screen pixel X coordinate where mouse was located when popup menu was requested.
`protected int` | `mouseY` Screen pixel Y coordinate where mouse was located when popup menu was requested.
`protected Projection` | `proj` current Projection of the map window.

Fields inherited from class org.ka2ddo.yaac.pluginapi.AbstractMenuAction
`ACCELERATOR_KEY, ACTION_COMMAND_KEY, BUTTON_GROUP_NAME, DISPLAYED_MNEMONIC_INDEX_KEY, enabled, LARGE_ICON_KEY, LOCALIZED_MENU_HIERARCHY, LONG_DESCRIPTION, MENU_PRIORITY, MNEMONIC_KEY, NAME, PRE_LOCALIZE_MENU_TAG_NAME, PRE_LOCALIZED_MENU_HIERARCHY, properties, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON`

Constructor Summary
`AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames)` Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.
`AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, int priority)` Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.
`AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, int priority, boolean initialState)` Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.
`AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, int priority, java.lang.String buttonGroupName)` Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.
`AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, java.lang.String buttonGroupName)` Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.

Method Summary
`void` | `setContext(int mx, int my, Projection proj, java.util.ArrayList<StationState> matchList)` Called by popup menu creation code to establish context information for the menu item's actionPerformed() method.

Methods inherited from class org.ka2ddo.yaac.pluginapi.AbstractMenuAction
`actionPerformed, firePropertyChange, getPropertyListener, getValue, init, isEnabled, parseMnemonics, putValue, setEnabled, setPropertyListener`

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

Methods inherited from interface org.ka2ddo.yaac.pluginapi.AddToPopupMapMenuIfc
`testIfIncluded`

Field Detail

### mouseX

    protected int mouseX

  Screen pixel X coordinate where mouse was located when popup menu was requested.

### mouseY

    protected int mouseY

  Screen pixel Y coordinate where mouse was located when popup menu was requested.

### proj

    protected Projection proj

  current Projection of the map window.

### matchList

    protected java.util.ArrayList<StationState> matchList

  ArrayList of stations and objects located at the clicked point on the map.

Constructor Detail

### AbstractPopupMenuAction

    public AbstractPopupMenuAction(java.lang.String nameTag,
                                   java.lang.String[] menuPositionNames)

  Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.

  Parameters:
    `nameTag` - lookup String for the above name in ResourceBundles
    `menuPositionNames` - array of Strings identifying the localized name strings

### AbstractPopupMenuAction

    public AbstractPopupMenuAction(java.lang.String nameTag,
                                   java.lang.String[] menuPositionNames,
                                   java.lang.String buttonGroupName)

  Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.

  Parameters:
    `nameTag` - lookup String for the above name in ResourceBundles
    `menuPositionNames` - array of Strings identifying the localized name strings of the parent JMenus to contain the generated JRadioButtonMenuItem
    `buttonGroupName` - String name of ButtonGroup this JRadioButtonMenuItem

### AbstractPopupMenuAction

    public AbstractPopupMenuAction(java.lang.String nameTag,
                                   java.lang.String[] menuPositionNames,
                                   int priority)

  Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.

  Parameters:
    `nameTag` - lookup String for the above name in ResourceBundles
    `menuPositionNames` - array of Strings identifying the localized name strings of the parent JMenus to contain the generated JMenuItem
    `priority` - int relative priority of this menu item relative to other

### AbstractPopupMenuAction

    public AbstractPopupMenuAction(java.lang.String nameTag,
                                   java.lang.String[] menuPositionNames,
                                   int priority,
                                   java.lang.String buttonGroupName)

  Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.

  Parameters:
    `nameTag` - lookup String for the above name in ResourceBundles
    `menuPositionNames` - array of Strings identifying the localized name strings of the parent JMenus to contain the generated JRadioButtonMenuItem
    `priority` - int relative priority of this menu item relative to other menu items on its lowest JMenu
    `buttonGroupName` - String name of ButtonGroup this JRadioButtonMenuItem

### AbstractPopupMenuAction

    public AbstractPopupMenuAction(java.lang.String nameTag,
                                   java.lang.String[] menuPositionNames,
                                   int priority,
                                   boolean initialState)

  Construct an AbstractPopupMenuAction with the specified ResourceBundle lookup tag for the name, and hierarchical position in the JMenus.

  Parameters:
    `nameTag` - lookup String for the above name in ResourceBundles
    `menuPositionNames` - array of Strings identifying the localized name strings of the parent JMenus to contain the generated JMenuItem
    `priority` - int relative priority of this menu item relative to other
    `initialState` - initial state of JCheckBoxMenuItem to be created

Method Detail

### setContext

    public void setContext(int mx,
                           int my,
                           Projection proj,
                           java.util.ArrayList<StationState> matchList)

  Called by popup menu creation code to establish context information for the menu item's actionPerformed() method.

  Parameters:
    `mx` - int screen pixel X coordinate where popup menu was invoked, or -1 for not map-invoked
    `my` - int screen pixel Y coordinate where popup menu was invoked, or -1 for not map-invoked
    `proj` - current Projection of the map window (null if the right-click was not on the map)
    `matchList` - ArrayList of stations and objects located at the clicked point on the map

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