Class RecentBoardList

java.lang.Object
megamek.client.ui.swing.RecentBoardList

public final class RecentBoardList extends Object
This class keeps a list of recently opened board files and makes it available statically. It automatically writes the list to a file in the MM's mmconf directory.
  • Field Details

  • Method Details

    • getRecentBoards

      public static List<String> getRecentBoards()
      Returns:
      A list of the most recently opened board files. Can be empty.
    • addBoard

      public static void addBoard(String board)
      Adds a new board to the recent board files, replacing the oldest if the list is full. Also saves the list to file.
      Parameters:
      board - The board filename (full path)
    • addBoard

      public static void addBoard(File board)
      Adds a new board to the recent board files, replacing the oldest if the list is full. Also saves the list to file.
      Parameters:
      board - The board file
    • addListener

      public static void addListener(IPreferenceChangeListener listener)
      Adds a listener for recent board changes. The event will have the name RECENT_BOARDS_UPDATED.
    • removeListener

      public static void removeListener(IPreferenceChangeListener listener)