org.ka2ddo.yaac.pluginapi
Interface AddToPopupMapMenuIfc

All Known Implementing Classes:
AbstractPopupMenuAction

public interface AddToPopupMapMenuIfc

This interface defines a decision interface identifying AbstractMenuActions that should not go on the main window menu bar, but instead on a popup menu displayed because someone right-clicked on the map. The interface methods allow the menu construction code to decide if any given menu items should be included in the popup menu, based on context of the menu activation.

See Also:
AbstractPopupMenuAction

Method Summary
 boolean testIfIncluded(int mouseX, int mouseY, Projection p)
          When creating a popup menu for the map window, specify whether this menu item should be included in the menu.
 

Method Detail

testIfIncluded

boolean testIfIncluded(int mouseX,
                       int mouseY,
                       Projection p)
When creating a popup menu for the map window, specify whether this menu item should be included in the menu.

Parameters:
mouseX - int screen pixel X coordinate where popup menu was invoked, or -1 for not map-invoked
mouseY - int screen pixel Y coordinate where popup menu was invoked, or -1 for not map-invoked
p - the current Projection that the map is being rendered with (null if the menu is being invoked on a window without a map)
Returns:
boolean true if the menu item should be included in the popup menu, false otherwise
See Also:
AbstractPopupMenuAction.matchList, AbstractPopupMenuAction.proj