Class BoardViewsContainer

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

public class BoardViewsContainer extends Object
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 Details

    • BoardViewsContainer

      public BoardViewsContainer(AbstractClientGUI clientGUI)
      Returns a new BoardViewsContainer. Call updateMapTabs() after construction to make it reflect the current BoardViews. Requires a non-null AbstractClientGUI as parent.
      Parameters:
      clientGUI - The AbstractClientGUI parent
  • Method Details

    • getPanel

      public Component 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

      public void setName(String name)