Class AbstractOptionsInfo

java.lang.Object
megamek.common.options.AbstractOptionsInfo
All Implemented Interfaces:
IOptionsInfo

public class AbstractOptionsInfo extends Object implements IOptionsInfo
Abstract base class for Singletons representing Options' static information such as displayable name, description etc. The derived classes must implement the Singleton pattern
  • Field Details

  • Constructor Details

    • AbstractOptionsInfo

      protected AbstractOptionsInfo(String name)
      Protected constructor. It is called only by descendants. The name must be unique because it's used to query the NLS dependent information from the resource bundle.
      Parameters:
      name - options info name
  • Method Details

    • getOptionInfo

      public IOptionInfo getOptionInfo(String name)
      Description copied from interface: IOptionsInfo
      Returns the IOptionInfo for the specified option
      Specified by:
      getOptionInfo in interface IOptionsInfo
      Parameters:
      name - option name
      Returns:
      the IOptionInfo for the specified option
      See Also:
    • getGroups

      public Enumeration<IBasicOptionGroup> getGroups()
      Description copied from interface: IOptionsInfo
      Returns the Enumeration of the IBasicOptionGroup
      Specified by:
      getGroups in interface IOptionsInfo
      Returns:
      the Enumeration of the IBasicOptionGroup
    • getGroupDisplayableName

      protected String getGroupDisplayableName(String groupName)
      Returns the user-friendly NLS dependent name suitable for displaying in the options editor dialogs etc.
      Parameters:
      groupName - the group name which we want the display format
      Returns:
      group displayable name