Class MainPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class MainPanel extends JPanel
This is the content panel inside the MainFrame. It displays the content the user is working with.

If there is no active layer, there is no content displayed. As soon as there are active layers, the MapFrame is displayed.

Since:
10432
See Also:
  • Field Details

  • Constructor Details

    • MainPanel

      public MainPanel(MainLayerManager layerManager)
      Create a new main panel
      Parameters:
      layerManager - The layer manager to use to display the content.
  • Method Details

    • updateContent

      protected void updateContent(boolean showMap)
      Update the content of this MainFrame to either display the map or display the welcome screen.
      Parameters:
      showMap - If the map should be displayed.
    • createNewMapFrame

    • addAndFireMapFrameListener

      public boolean addAndFireMapFrameListener(MapFrameListener listener)
      Registers a new MapFrameListener that will be notified of MapFrame changes.

      It will fire an initial mapFrameInitialized event when the MapFrame is present. Otherwise will only fire when the MapFrame is created or destroyed.

      Parameters:
      listener - The MapFrameListener
      Returns:
      true if the listeners collection changed as a result of the call.
    • addMapFrameListener

      public boolean addMapFrameListener(MapFrameListener listener)
      Registers a new MapFrameListener that will be notified of MapFrame changes
      Parameters:
      listener - The MapFrameListener
      Returns:
      true if the listeners collection changed as a result of the call
    • removeMapFrameListener

      public boolean removeMapFrameListener(MapFrameListener listener)
      Unregisters the given MapFrameListener from MapFrame changes
      Parameters:
      listener - The MapFrameListener
      Returns:
      true if the listeners collection changed as a result of the call
    • getGettingStarted

      Gets the GettingStarted panel.
      Returns:
      The panel.
    • reAddListeners

      public void reAddListeners()
      Re-adds the layer listeners. Never call this in production, only needed for testing.