pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Serré <jerome.michel.se...@gmail.com>
Subject RE: FileBrowserSheet
Date Tue, 20 Dec 2011 18:25:12 GMT
Hello,

Finally, I wrapped this action in a new thread and it’s ok

/*Open Dialog*/

      ImmutableList<File> selectedFiles = fbs.getSelectedFiles();

      for (int i=0; i< selectedFiles;i++) {

      String file = selectedFiles.get(i).toString();

/*Long processus*/ep.addRecord(XmlRecordReader.read(file));

/*Update Meter on dialog box*/

     

 

 

Jérôme Serré

____________________________

Manage your cellar

 <http://www.macave.eu/> http://www.macave.eu

 

 

De : Jérôme Serré [mailto:jerome.michel.serre@gmail.com] 
Envoyé : lundi 19 décembre 2011 09:44
À : 'Liste Apache-Pivot'
Objet : FileBrowserSheet

 

Hello,

I use a FileBrowserSheet to open multiple files and then use them in a
lengthy process.
I would like to open a Dialog with a meter.
Unfortunately the window does not open only after the process is complete.
Have you any idea how to do this?

thank you very much

Part of code:

@Override

public void perform(Component source) {

       File dir = new File(data);

       dir = dir.getAbsoluteFile(); 

       fbs.setRootDirectory(dir);

       fbs.open(owner, new SheetCloseListener() {

             @Override

             public void sheetClosed(Sheet sheet) {

                    try {

                           if (sheet.getResult()) {

 

/*Open Dialog*/

                                  ImmutableList<File> selectedFiles =
fbs.getSelectedFiles();

                                 for (int i=0; i< selectedFiles;i++) {

                                        String file =
selectedFiles.get(i).toString();

/*Long processus*/ep.addRecord(XmlRecordReader.read(file));

                    /*Update Meter on dialog box*/

                                 }

                           } catch(Exception e) {}

                    }

             });

       }

Jérôme Serré

____________________________

Manage your cellar

 <http://www.macave.eu/> http://www.macave.eu

 

 


Mime
View raw message