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​(java.awt.event.ActionEvent e)  
      java.lang.Object clone()  
      java.awt.Component getCheckBoxMenuItem()
      Returns the menu item for this action.
      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
                          MapViewSettings mapViewSettings,
                          @NotNull
                          NamedGameObjectMatcher matcher)
        Creates a new instance.
        Parameters:
        mapViewSettings - the map view settings instance
        matcher - the matcher
    • Method Detail

      • getName

        @NotNull
        public 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
                                    java.awt.event.ActionEvent e)
      • getCheckBoxMenuItem

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

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