base/common/src/main/com/thesett/common/swing/workflow/WorkFlowController.java
protected void setCurrentScreen(WorkFlowScreenPanel screen)
    {
        // Remove any existing screen from the panel
        panel.removeAll();

        // Place the new screen into the panel
        panel.add(screen);

        // Check if the screen is not already in the stack of accessed screens. It may be if this is the second time
        // the screen is visited foir example if the back button is used.
        if (!accessedScreens.contains(screen))
        {
            // Add the screen to the stack of accessed screens
            accessedScreens.push(screen);
        }

        // Update the work flow state to reflect the change to a new screen state
        state.setCurrentScreenState(screen.getState());

        // Keep track of the current screen in a local member variable
        currentScreen = screen;

        // Initialize the new screen
        screen.initialize();

        // Force the panel to redraw
        panel.validate();
    }
protected void setCurrentScreen(WorkFlowScreenPanel screen)
    {
        // Remove any existing screen from the panel
        panel.removeAll();

        // Place the new screen into the panel
        panel.add(screen);

        // Check if the screen is not already in the stack of accessed screens. It may be if this is the second time
        // the screen is visited foir example if the back button is used.
        if (!accessedScreens.contains(screen))
        {
            // Add the screen to the stack of accessed screens
            accessedScreens.push(screen);
        }

        // Update the work flow state to reflect the change to a new screen state
        state.setCurrentScreenState(screen.getState());

        // Keep track of the current screen in a local member variable
        currentScreen = screen;

        // Initialize the new screen
        screen.initialize();

        // Force the panel to redraw
        panel.validate();
    }
protected void setCurrentScreen ( WorkFlowScreenPanel screen ) { // Remove any existing screen from the panel panel . removeAll ( ) ; // Place the new screen into the panel panel . add ( screen ) ; // Check if the screen is not already in the stack of accessed screens. It may be if this is the second time // the screen is visited foir example if the back button is used. if ( ! accessedScreens . contains ( screen ) ) { // Add the screen to the stack of accessed screens accessedScreens . push ( screen ) ; } // Update the work flow state to reflect the change to a new screen state state . setCurrentScreenState ( screen . getState ( ) ) ; // Keep track of the current screen in a local member variable currentScreen = screen ; // Initialize the new screen screen . initialize ( ) ; // Force the panel to redraw panel . validate ( ) ; }
This is a helper method that controller implementations may find useful for moving to a new screen. It places the
screen into the panel that this controller was built with, replacing any existing screen, changes the underlying
state to reflect the change to a new current screen and calls the new screens initialize method.

@param screen The new work flow screen to be displayed.
This is a helper method that controller implementations may find useful for moving to a new screen . It places the screen into the panel that this controller was built with replacing any existing screen changes the underlying state to reflect the change to a new current screen and calls the new screens initialize method .