Package megamek.client.ui.swing
Class BoardViewsContainer
java.lang.Object
megamek.client.ui.swing.BoardViewsContainer
The BoardViewsContainer manages the JPanel that contains the BoardView(s) of a ClientGUI. When only
one BoardView is present, it is shown by itself. When multiple BoardViews are present,
they are arranged as tabs of a TabbedPane. The panel that holds the BoardView(s) is obtained from
getPanel()
.
The display contents are not automatically updated. Use updateMapTabs()
after construction
and later to make it reflect the current set of BoardViews.
-
Constructor Summary
ConstructorsConstructorDescriptionBoardViewsContainer
(AbstractClientGUI clientGUI) Returns a new BoardViewsContainer. -
Method Summary
Modifier and TypeMethodDescriptiongetPanel()
Returns the JPanel that holds the BoardView(s), either one BoardView by itself or multiple BoardViews in a tabbed pane.void
void
Updates the BoardViewsContainer to reflect the current state of ClientGUI's BoardViews.
-
Constructor Details
-
BoardViewsContainer
Returns a new BoardViewsContainer. CallupdateMapTabs()
after construction to make it reflect the current BoardViews. Requires a non-null AbstractClientGUI as parent.- Parameters:
clientGUI
- The AbstractClientGUI parent
-
-
Method Details
-
getPanel
Returns the JPanel that holds the BoardView(s), either one BoardView by itself or multiple BoardViews in a tabbed pane. Add this panel to the view area of the ClientGUI.- Returns:
- The panel holding all present BoardViews
-
updateMapTabs
public void updateMapTabs()Updates the BoardViewsContainer to reflect the current state of ClientGUI's BoardViews. -
setName
-