Class Screen

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
CreditsScreen, LoadingScreen, MainMenuScreen, PuzzleScreen, ScreenTestComponents, SelectPuzzleScreen

public abstract class Screen extends JPanel
A JPanel wrapper with some extra functionality. This is the base class for all screens.
See Also:
  • Constructor Details

    • Screen

      public Screen()
      Creates a new screen. This is an abstract class, so it cannot be instantiated directly.
  • Method Details

    • populateComponents

      protected abstract void populateComponents(Container contentPane, SpringLayout layout)
      Populates the components of the screen.
      Parameters:
      contentPane - The content pane of the screen (this)
      layout - The layout of the screen.
    • switchScreenTo

      public void switchScreenTo(ScreenType screen)
      Switches the display screen to the given screen.
      Parameters:
      screen - The screen to switch to.
    • showPopup

      public void showPopup(WebbPopup popup)
      Shows a popup on the screen.
      Parameters:
      popup - The popup to show.
    • onShow

      public void onShow()
      Called when the screen is made visible