Class KeyCommand

java.lang.Object
javax.swing.AbstractAction
VASSAL.counters.KeyCommand
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
DynamicProperty.DynamicKeyCommand, KeyCommandSubMenu

public class KeyCommand
extends AbstractAction
See Also:
Serialized Form
  • Field Details

    • untranslatedName

      protected String untranslatedName
    • localizedMenuText

      protected String localizedMenuText
    • i18nPiece

      protected TranslatablePiece i18nPiece
    • namedKeyStroke

      protected NamedKeyStroke namedKeyStroke
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • matches

      public boolean matches​(KeyStroke key)
    • getKeyStroke

      public KeyStroke getKeyStroke()
    • getNamedKeyStroke

      public NamedKeyStroke getNamedKeyStroke()
    • getTarget

      public GamePiece getTarget()
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface Action
      Overrides:
      isEnabled in class AbstractAction
    • setEnabled

      public void setEnabled​(boolean b)
      Specified by:
      setEnabled in interface Action
      Overrides:
      setEnabled in class AbstractAction
    • isGlobal

      public boolean isGlobal()
      If true, then this action will apply to all selected pieces
      Returns:
    • setGlobal

      public void setGlobal​(boolean global)
      If true, then this action will apply to all selected pieces
      Parameters:
      global -
    • actionPerformed

      public void actionPerformed​(ActionEvent evt)
    • isMenuSeparator

      public boolean isMenuSeparator()
    • getLocalizedMenuText

      public String getLocalizedMenuText()
      The human-readable text that will appear in the right-click menu, translated to the user's Locale
      Returns: