- fileOptionsPanel.add(mimeTypeLabel, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0));
- fileOptionsPanel.add(fileOptionsMIMETypeComboBox, new GridBagConstraints(1, 8, 4, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0));
+ fileOptionsPanel.add(mimeTypeLabel, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.NONE, new Insets(6, 18, 0, 0), 0, 0));
+ fileOptionsPanel.add(fileOptionsMIMETypeComboBox, new GridBagConstraints(1, 9, 4, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0));
+
+ /* create dialog to show while scanning. */
+ scanningFilesDialog = new JDialog(wizard);
+ scanningFilesDialog.setModal(true);
+ scanningFilesDialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+
+ JPanel progressPanel = new JPanel(new BorderLayout(12, 12));
+ scanningFilesDialog.getContentPane().add(progressPanel, BorderLayout.CENTER);
+ progressPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
+
+ final TLabel scanningLabel = new TLabel(I18n.getMessage("jsite.project-files.scanning"), SwingConstants.CENTER);
+ progressPanel.add(scanningLabel, BorderLayout.NORTH);
+ progressBar = new JProgressBar(SwingConstants.HORIZONTAL);
+ progressPanel.add(progressBar, BorderLayout.SOUTH);
+ progressBar.setIndeterminate(true);
+ progressBar.setStringPainted(true);
+ progressBar.setPreferredSize(new Dimension(progressBar.getPreferredSize().width * 2, progressBar.getPreferredSize().height));
+
+ scanningFilesDialog.pack();
+ scanningFilesDialog.addWindowListener(new WindowAdapter() {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @SuppressWarnings("synthetic-access")
+ public void windowOpened(WindowEvent e) {
+ SwingUtils.center(scanningFilesDialog, wizard);
+ }
+ });