Package megamek.client.ui.swing
Class RecentBoardList
java.lang.Object
megamek.client.ui.swing.RecentBoardList
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds a new board to the recent board files, replacing the oldest if the list is full.static void
Adds a new board to the recent board files, replacing the oldest if the list is full.static void
addListener
(IPreferenceChangeListener listener) Adds a listener for recent board changes.static void
removeListener
(IPreferenceChangeListener listener)
-
Field Details
-
RECENT_BOARDS_UPDATED
- See Also:
-
-
Method Details
-
getRecentBoards
- Returns:
- A list of the most recently opened board files. Can be empty.
-
addBoard
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
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
Adds a listener for recent board changes. The event will have the nameRECENT_BOARDS_UPDATED
. -
removeListener
-