~ubuntu-branches/ubuntu/utopic/sweethome3d/utopic-proposed

« back to all changes in this revision

Viewing changes to src/com/eteks/sweethome3d/swing/BackgroundImageWizardStepsPanel.java

  • Committer: Bazaar Package Importer
  • Author(s): Gabriele Giacone
  • Date: 2010-05-29 13:17:46 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100529131746-mix5l902gjywddob
Tags: 2.4+dfsg-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
          boolean success = true;
162
162
          try {
163
163
            List<File> files = (List<File>)transferedFiles.getTransferData(DataFlavor.javaFileListFlavor);
164
 
            updateController(files.get(0).getAbsolutePath(), preferences, controller.getContentManager());
 
164
            final String imageName = files.get(0).getAbsolutePath();
 
165
            EventQueue.invokeLater(new Runnable() {
 
166
                public void run() {
 
167
                  updateController(imageName, preferences, controller.getContentManager());
 
168
                }
 
169
              });
165
170
          } catch (UnsupportedFlavorException ex) {
166
171
            success = false;
167
172
          } catch (IOException ex) {
168
173
            success = false;
169
174
          }
170
175
          if (!success) {
171
 
            JOptionPane.showMessageDialog(SwingUtilities.getRootPane(BackgroundImageWizardStepsPanel.this), 
172
 
                preferences.getLocalizedString(BackgroundImageWizardStepsPanel.class, "imageChoiceError"));
 
176
            EventQueue.invokeLater(new Runnable() {
 
177
                public void run() {
 
178
                  JOptionPane.showMessageDialog(SwingUtilities.getRootPane(BackgroundImageWizardStepsPanel.this), 
 
179
                      preferences.getLocalizedString(BackgroundImageWizardStepsPanel.class, "imageChoiceError"));
 
180
                }
 
181
              });
173
182
          }
174
183
          return success;
175
184
        }