Interface UnitContextMenuProvider

  • All Known Implementing Classes:
    ExtendedCommandsPlugIn

    public interface UnitContextMenuProvider
    PlugIns should implement this interface if the provide a JMenu as contextMenu after right-click on a Unit.
    Author:
    Fiete
    • Method Detail

      • createContextMenu

        javax.swing.JMenuItem createContextMenu​(EventDispatcher dispatcher,
                                                GameData data,
                                                Unit unit,
                                                java.util.Collection<?> selectedObjects)
        Creates a JMenuItem. Will be called on right-clicking units.
        Parameters:
        dispatcher - EventDispatcher
        data - the actual GameData or World
        unit - last selected unit - is not required to be in selected objects
        selectedObjects - null or Collection of selected objects which may be of different types