Class ShowPanelController

java.lang.Object
be.gaudry.swing.action.ShowPanelController

public class ShowPanelController extends Object
The ShowPanelController allows to manage screens navigation into the application. This is also a facade to get the top level component. Provided by the broldev.core.swing project.
Since:
1.0 (Mar 23, 2009), broldev.core.swing 0.0.1-SNAPSHOT dependency
Version:
1.0 (Mar 23, 2009)
Author:
Steph GAUDRY
  • Field Details

  • Method Details

    • setFrame

      public static void setFrame(IMainFrame frame, boolean replaceIfExists)
      Sets the main frame of the application, to use into this controller.
      Parameters:
      frame - application main screen
      replaceIfExists - true to replace existing frame, false to set the frame only if not exists.
    • setFrame

      public static void setFrame(IMainFrame frame)
      Sets the getIMainFrame() only if not previously defined. \nTo set a new IMainFrame, use the setFrame(IMainFrame, boolean) method.
      Parameters:
      frame - application main screen
    • getIMainFrame

      public static IMainFrame getIMainFrame()
      The main frame is the GUI component where the panels are shown.
      Returns:
      the main screen of the application
    • showHelp

      public static void showHelp()
      Shows the help associated to the current panel
    • getHelpBroker

      static javax.help.HelpBroker getHelpBroker()
      This package method allows to initialize the broker's target from the AbstractShowPanelAction to allow showing the help associated to the current panel into showHelp()
      Returns:
      the helpBroker
    • getActions

      public static Map<JPanel,​AbstractShowPanelAction<? extends JPanel>> getActions()
      The actions to show the panels are available thru an unmodifiable map, keyed by the panels. Only the currently existing panels(visible or hidden by the current panel) are into this collection; if a panel has not yet been shown, or if a panel has been closed, it will not be into the collection.
      Returns:
      the actions
    • addAction

      static void addAction(AbstractShowPanelAction<? extends JPanel> showPanelAction)
      Adds a showPanelAction to the existing actions. This package method is only called by the AbstractShowPanelAction.showPanel() when a panel is shown the first time.
      Parameters:
      showPanelAction - action to add
    • removeAction

      static void removeAction(AbstractShowPanelAction<? extends JPanel> showPanelAction)
      Removes a showPanelAction from the available actions. This package method is only called by the AbstractShowPanelAction.close() when the panel is closed.
      Parameters:
      showPanelAction - action to remove
    • getCloseAction

      public static AbstractAction getCloseAction()
      Returns the action to close the current panel.
      Returns:
      the close action
    • getShowPreviousPanelAction

      public static AbstractAction getShowPreviousPanelAction()
      Returns the action to display the previous panel.
      Returns:
      the action
    • getShowNextPanelAction

      public static AbstractAction getShowNextPanelAction()
      Returns the action to display the next panel.
      Returns:
      the action
    • setCurrentAction

      static void setCurrentAction(AbstractShowPanelAction<? extends JPanel> action)
      Sets the action associated to the current panel as current action. This package method is only called by the AbstractShowPanelAction.showPanel() when a panel is shown.
      Parameters:
      action -