/**
   * Creates the map area basket panel.
   *
   * @return the j panel
   */
  private JPanel createMapAreaBasketPanel() {
    JPanel panel = userInterfaceFactory.createPanel();
    GridBagConstraints panelGC = userInterfaceFactory.createGridBagConstraints();

    String mapAreaBasketLabelText =
        RIFJobSubmissionToolMessages.getMessage("mapAreaListSelectionPanel.mapAreaBasket.label");
    JLabel mapAreaBasketLabel = userInterfaceFactory.createLabel(mapAreaBasketLabelText);
    userInterfaceFactory.setBoldFont(mapAreaBasketLabel);
    panel.add(mapAreaBasketLabel, panelGC);

    panelGC.gridy++;
    panelGC.fill = GridBagConstraints.BOTH;
    panelGC.weightx = 1.0;
    panelGC.weighty = 1.0;

    JScrollPane selectedItemsStatusScrollPane =
        userInterfaceFactory.createScrollPane(selectedItemsStatusTextArea);
    panel.add(selectedItemsStatusScrollPane, panelGC);

    panelGC.gridy++;
    panelGC.fill = GridBagConstraints.NONE;
    panelGC.weightx = 0;
    panelGC.weighty = 0;
    panelGC.anchor = GridBagConstraints.SOUTHEAST;
    panel.add(createBasketControlButtonsPanel(), panelGC);

    return panel;
  }
  /** Builds the ui. */
  private void buildUI() {

    panel.removeAll();
    GridBagConstraints panelGC = userInterfaceFactory.createGridBagConstraints();

    String currentSelectionAreaTitleText =
        RIFJobSubmissionToolMessages.getMessage("mapAreaListSelectionPanel.title");
    JLabel currentSelectionAreaTitleLabel =
        userInterfaceFactory.createLabel(currentSelectionAreaTitleText);
    String currentSelectionAreaTitleToolTipText =
        RIFJobSubmissionToolMessages.getMessage("mapAreaListSelectionPanel.title.toolTip");
    currentSelectionAreaTitleLabel.setToolTipText(currentSelectionAreaTitleToolTipText);
    userInterfaceFactory.setBoldFont(currentSelectionAreaTitleLabel);
    panel.add(currentSelectionAreaTitleLabel, panelGC);

    panelGC.gridy++;
    panelGC.fill = GridBagConstraints.BOTH;
    panelGC.weightx = 1;
    panelGC.weighty = 0.8;
    panel.add(createMainPanel(), panelGC);

    panelGC.gridy++;
    panelGC.fill = GridBagConstraints.HORIZONTAL;
    panelGC.weightx = 1;
    panelGC.weighty = 0;
    panel.add(createMapAreaBasketPanel(), panelGC);

    updateBasketStatusPanel();
  }
  /**
   * Creates the main panel.
   *
   * @return the j panel
   */
  private JPanel createMainPanel() {

    JPanel panel = userInterfaceFactory.createPanel();
    GridBagConstraints panelGC = userInterfaceFactory.createGridBagConstraints();
    panelGC.fill = GridBagConstraints.BOTH;
    panelGC.weightx = 1;
    panelGC.weighty = 1;
    panel.add(viewPanel, panelGC);

    /*
    		panelGC.gridx++;
    		panelGC.weightx = 0.3;
    		panel.add(createMapDisplayPanel(), panelGC);
    */
    return panel;
  }
  /**
   * Instantiates a new work flow progress panel.
   *
   * @param userInterfaceFactory the user interface factory
   */
  public WorkFlowProgressPanel(UserInterfaceFactory userInterfaceFactory) {

    panel = userInterfaceFactory.createPanel();
    panelGC = userInterfaceFactory.createGridBagConstraints();
    panelGC.fill = GridBagConstraints.NONE;
    panelGC.insets = new Insets(5, 0, 0, 0);
    panelGC.weightx = 0;
    panelGC.ipadx = 5;
    panelGC.ipady = 5;

    String selectStudyLabelText =
        RIFStudySubmissionActivityStep.CREATE_OR_COPY_STUDY_STEP.getName();
    selectStudy = new WorkFlowStep(selectStudyLabelText);

    String describeStudyLabelText = RIFStudySubmissionActivityStep.DESCRIBE_STUDY.getName();
    describeStudy = new WorkFlowStep(describeStudyLabelText);

    String selectStudyAreaLabelText = RIFStudySubmissionActivityStep.CHOOSE_STUDY_AREA.getName();
    selectStudyArea = new WorkFlowStep(selectStudyAreaLabelText);

    String selectComparisonAreaLabelText =
        RIFStudySubmissionActivityStep.CHOOSE_COMPARISON_AREA.getName();
    selectComparisonArea = new WorkFlowStep(selectComparisonAreaLabelText);

    String selectInvestigationsLabelText =
        RIFStudySubmissionActivityStep.SPECIFY_INVESTIGATIONS.getName();
    selectInvestigations = new WorkFlowStep(selectInvestigationsLabelText);

    String specifyReportingOptionsLabelText =
        RIFStudySubmissionActivityStep.SPECIFY_REPORTS.getName();
    specifyReportingOptions = new WorkFlowStep(specifyReportingOptionsLabelText);

    String previewLabelText = RIFStudySubmissionActivityStep.PREVIEW.getName();
    showPreview = new WorkFlowStep(previewLabelText);

    panel.setBorder(LineBorder.createGrayLineBorder());

    selectStudyArea();
  }