Package VASSAL.tools

Class LaunchButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants, Auditable

public class LaunchButton extends JButton implements Auditable
A JButton for placing into a VASSAL component's toolbar. Handles configuration of a hotkey shortcut, maintains appropriate tooltip text, etc.
See Also:
  • Field Details

    • UNTRANSLATED_TEXT

      public static final String UNTRANSLATED_TEXT
      See Also:
    • tooltipAtt

      protected String tooltipAtt
    • nameAtt

      protected String nameAtt
    • keyAtt

      protected String keyAtt
    • iconAtt

      protected String iconAtt
    • iconConfig

      protected IconConfigurer iconConfig
    • toolTipText

      protected String toolTipText
    • keyListener

      protected NamedKeyStrokeListener keyListener
    • nameConfig

      protected Configurer nameConfig
    • keyConfig

      protected Configurer keyConfig
    • alwaysAcceptKeystroke

      protected boolean alwaysAcceptKeystroke
    • forceVisible

      protected boolean forceVisible
    • forceInvisible

      protected boolean forceInvisible
    • allowExpression

      protected boolean allowExpression
    • usesExpression

      protected boolean usesExpression
    • formatted

      protected FormattedString formatted
  • Constructor Details

  • Method Details

    • isUsesExpression

      public boolean isUsesExpression()
    • updateText

      public void updateText()
    • getLaunchIcon

      public Icon getLaunchIcon()
      Returns:
      Our current icon (used when we're a ToolbarMenu that's a submenu of another ToolbarMenu so that we keep our icon)
    • isAlwaysAcceptKeystroke

      public boolean isAlwaysAcceptKeystroke()
    • setAlwaysAcceptKeystroke

      public void setAlwaysAcceptKeystroke(boolean always)
    • isForcevisible

      public boolean isForcevisible()
    • setForceVisible

      public void setForceVisible(boolean fv)
    • isForceInvisible

      public boolean isForceInvisible()
    • setForceInvisible

      public void setForceInvisible(boolean fiv)
    • getBaseline

      public int getBaseline(int width, int height)
      Overrides:
      getBaseline in class JComponent
    • getNameAttribute

      public String getNameAttribute()
    • getHotkeyAttribute

      public String getHotkeyAttribute()
    • getIconAttribute

      public String getIconAttribute()
    • getAttributeValueString

      public String getAttributeValueString(String key)
    • setAttribute

      public void setAttribute(String key, Object value)
    • setToolTipText

      public void setToolTipText(String text)
      Overrides:
      setToolTipText in class JComponent
    • getNameConfigurer

      public Configurer getNameConfigurer()
    • getHotkeyConfigurer

      public Configurer getHotkeyConfigurer()
    • isNonBlank

      public boolean isNonBlank()
    • checkVisibility

      public void checkVisibility()
    • getComponentTypeName

      public String getComponentTypeName()
      Description copied from interface: Auditable
      Return a description of the Type of trait or Component an Auditable is
      Specified by:
      getComponentTypeName in interface Auditable
      Returns:
      Component Type
    • getComponentName

      public String getComponentName()
      Return the name of the trait or Component an Auditable is
      Specified by:
      getComponentName in interface Auditable
      Returns:
      Component name