|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.pluginapi.AbstractMenuAction
org.ka2ddo.yaac.pluginapi.AbstractPopupMenuAction
public abstract class AbstractPopupMenuAction
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
.
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 |
---|
protected int mouseX
protected int mouseY
protected Projection proj
protected java.util.ArrayList<StationState> matchList
Constructor Detail |
---|
public AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames)
nameTag
- lookup String for the above name in ResourceBundlesmenuPositionNames
- array of Strings identifying the localized name stringspublic AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, java.lang.String buttonGroupName)
nameTag
- lookup String for the above name in ResourceBundlesmenuPositionNames
- array of Strings identifying the localized name strings
of the parent JMenus to contain the generated JRadioButtonMenuItembuttonGroupName
- String name of ButtonGroup this JRadioButtonMenuItempublic AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, int priority)
nameTag
- lookup String for the above name in ResourceBundlesmenuPositionNames
- array of Strings identifying the localized name strings
of the parent JMenus to contain the generated JMenuItempriority
- int relative priority of this menu item relative to otherpublic AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, int priority, java.lang.String buttonGroupName)
nameTag
- lookup String for the above name in ResourceBundlesmenuPositionNames
- array of Strings identifying the localized name strings
of the parent JMenus to contain the generated JRadioButtonMenuItempriority
- int relative priority of this menu item relative to other
menu items on its lowest JMenubuttonGroupName
- String name of ButtonGroup this JRadioButtonMenuItempublic AbstractPopupMenuAction(java.lang.String nameTag, java.lang.String[] menuPositionNames, int priority, boolean initialState)
nameTag
- lookup String for the above name in ResourceBundlesmenuPositionNames
- array of Strings identifying the localized name strings
of the parent JMenus to contain the generated JMenuItempriority
- int relative priority of this menu item relative to otherinitialState
- initial state of JCheckBoxMenuItem to be createdMethod Detail |
---|
public void setContext(int mx, int my, Projection proj, java.util.ArrayList<StationState> matchList)
mx
- int screen pixel X coordinate where popup menu was invoked, or -1 for not map-invokedmy
- int screen pixel Y coordinate where popup menu was invoked, or -1 for not map-invokedproj
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |