Class ViewAction

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

    public class ViewAction
    extends javax.swing.AbstractAction
    Action to manage one edit type represented by one NamedGameObjectMatcher.
    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 ViewAction clone()  
      @NotNull java.awt.Component getCheckBoxMenuItem()
      Returns the menu item for this action.
      @NotNull java.lang.String getName()
      Returns the name for sorting the menu entries.
      void updateAction()
      Update the action's state to match the current edit type settings.
      • 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

      • ViewAction

        public ViewAction​(@NotNull
                          @NotNull MapViewSettings mapViewSettings,
                          @NotNull
                          @NotNull NamedGameObjectMatcher matcher)
        Creates a new instance.
        Parameters:
        mapViewSettings - the map view settings instance
        matcher - the matcher
    • Method Detail

      • getName

        @NotNull
        public @NotNull java.lang.String getName()
        Returns the name for sorting the menu entries.
        Returns:
        the name
      • updateAction

        public final void updateAction()
        Update the action's state to match the current edit type settings.
      • actionPerformed

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

        @NotNull
        public @NotNull java.awt.Component getCheckBoxMenuItem()
        Returns the menu item for this action.
        Returns:
        the menu item
      • clone

        @NotNull
        public @NotNull ViewAction clone()
                                  throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class javax.swing.AbstractAction
        Throws:
        java.lang.CloneNotSupportedException