Class WindowAction<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class WindowAction<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends javax.swing.AbstractAction
    Action class for selecting this window.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(@NotNull java.awt.event.ActionEvent e)  
      @NotNull WindowAction<G,​A,​R> clone()  
      void setIndex​(int index)
      Sets the index of this action so this Action knows what Mnemonic and Accelerator to use.
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Constructor Detail

      • WindowAction

        public WindowAction​(@NotNull
                            @NotNull MapDesktop<G,​A,​R> mapDesktop,
                            @NotNull
                            @NotNull MapView<G,​A,​R> mapView,
                            @NotNull
                            @NotNull MapManager<G,​A,​R> mapManager)
        Creates a new instance.
        Parameters:
        mapDesktop - the main view
        mapView - the associated map view
        mapManager - the map manager to use
    • Method Detail

      • setIndex

        public final void setIndex​(int index)
        Sets the index of this action so this Action knows what Mnemonic and Accelerator to use.
        Parameters:
        index - index (with 1 for first entry)
      • actionPerformed

        public void actionPerformed​(@NotNull
                                    @NotNull java.awt.event.ActionEvent e)
      • clone

        @NotNull
        public @NotNull WindowAction<G,​A,​R> clone()
        Overrides:
        clone in class javax.swing.AbstractAction