Class AbstractConfigurableListEntry

java.lang.Object
VASSAL.configure.AbstractConfigurableListEntry
All Implemented Interfaces:
PropertyChangeListener, EventListener, ConfigurableListEntry

public abstract class AbstractConfigurableListEntry extends Object implements ConfigurableListEntry
Base class for a List Entry maintained by a ConfigurableList A ConfigurableListEntry must be configurered by a single Configurer.
  • Constructor Details

    • AbstractConfigurableListEntry

      public AbstractConfigurableListEntry(ConfigurableList parentConfig, Object value, int iconSize)
      Build a new List Entry
      Parameters:
      parentConfig - Parent List
      value - Initial value for entry
      iconSize - Icon size for the Remove button
    • AbstractConfigurableListEntry

      public AbstractConfigurableListEntry(ConfigurableList parentConfig, Object value)
  • Method Details

    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • buildChildConfigurer

      public abstract Configurer buildChildConfigurer(Object value)
      Build a suitable Configurer that Configures this List Entry
      Parameters:
      value - Initial value for the Configurer
      Returns:
      A Configurer
    • getParent

      public ConfigurableList getParent()
      Return the parent ConfigurableList that owns this Entry.
      Returns:
      Parent List
    • getRemoveButton

      public JButton getRemoveButton()
      Return the Remove button that deletes this List Entry
      Specified by:
      getRemoveButton in interface ConfigurableListEntry
      Returns:
      Remove Button
    • getConfigurer

      public Configurer getConfigurer()
      Return the Configurer that configures this entry
      Specified by:
      getConfigurer in interface ConfigurableListEntry
      Returns:
      Entry Configurer
    • focusGained

      public void focusGained()
      Called when this Entry gains the focus.
      Specified by:
      focusGained in interface ConfigurableListEntry
    • requestFocus

      public void requestFocus()
      Ensure this entry has the focus
      Specified by:
      requestFocus in interface ConfigurableListEntry
    • updateVisibility

      public void updateVisibility()
      Update the visibility of any optional components in this entry Most Configurer entries will not have option components.
      Specified by:
      updateVisibility in interface ConfigurableListEntry
    • setHighlighted

      public abstract void setHighlighted(boolean b)
      Set the Highlighted status of fields in this entry. Used to highlight the currently selected entry.
      Specified by:
      setHighlighted in interface ConfigurableListEntry
      Parameters:
      b - Highlight status