Class CurrentStepPanel

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible

    public class CurrentStepPanel
    extends JPanel
    This is the class that contains the panel on the right-top part of the QuickSetupDialog). It uses a CardLayout that contains all the panels that are specific to each step (WelcomePanel, ReviewPanel, etc.). To specify which is the panel to be displayed the method setCurrentStep method is called. There is only one instance of this class for a given QuickSetupDialog (and there are only 1 instance of each of the panels that are contained in its CardLayout).
    See Also:
    Serialized Form
    • Constructor Detail

      • CurrentStepPanel

        public CurrentStepPanel​(GuiApplication app,
                                QuickSetup qs)
        The constructor of this class.
        Parameters:
        app - Application used to create panels for populating the layout
        qs - QuickSetup acting as controller
    • Method Detail

      • getFieldValue

        public Object getFieldValue​(FieldName fieldName)
        Returns the value corresponding to the provided FieldName.
        Parameters:
        fieldName - the FieldName for which we want to obtain the value.
        Returns:
        the value corresponding to the provided FieldName.
      • displayFieldInvalid

        public void displayFieldInvalid​(FieldName fieldName,
                                        boolean invalid)
        Marks as invalid (or valid depending on the value of the invalid parameter) a field corresponding to FieldName. This basically implies updating the style of the JLabel associated with fieldName (the association is done using the LabelFieldDescriptor class).
        Parameters:
        fieldName - the FieldName to be marked as valid or invalid.
        invalid - whether to mark the field as valid or invalid.
      • addButtonActionListener

        public void addButtonActionListener​(ButtonActionListener l)
        Adds a button listener. All the button listeners will be notified when the buttons are clicked (by the user or programmatically).
        Parameters:
        l - the ButtonActionListener to be added.
      • setDisplayedStep

        public void setDisplayedStep​(WizardStep step,
                                     UserData userData)
        Displays the panel corresponding to the provided step. The panel contents are updated with the contents of the UserData object.
        Parameters:
        step - the step that we want to display.
        userData - the UserData object that must be used to populate the panels.
      • displayProgress

        public void displayProgress​(ProgressDescriptor descriptor)
        Forwards the different panels the ProgressDescriptor so that they can update their contents accordingly.
        Parameters:
        descriptor - the descriptor of the Application progress.
      • setCheckingVisible

        public void setCheckingVisible​(boolean visible)
        This method displays a working progress icon in the panel.
        Parameters:
        visible - whether the icon must be displayed or not.
      • getQuickSetup

        protected QuickSetup getQuickSetup()
        Gets the instance of QuickSetup acting as controller.
        Returns:
        QuickSetup instance
      • getMainWindow

        public Component getMainWindow()
        Returns the frame or window containing this panel.
        Returns:
        the frame or window containing this panel.
      • getApplication

        protected GuiApplication getApplication()
        Gets the application this panel represents.
        Returns:
        GuiApplication this panel represents