Package edu.harvard.wcfia.yoshikoder.ui

Examples of edu.harvard.wcfia.yoshikoder.ui.PreviewPanel


        } catch (IOException ioe){
            DialogUtil.yelp(yoshikoder, "Could not open file " + f.getName(), ioe);
            return;
        }
       
        final PreviewPanel preview = new PreviewPanel(fileBytes, yoshikoder.getDefaultEncoding());
        int i = JOptionPane.showConfirmDialog(yoshikoder, preview,
                "Preview Dictionary",  JOptionPane.OK_CANCEL_OPTION,
                JOptionPane.PLAIN_MESSAGE);   
        if (i != JOptionPane.OK_OPTION)
            return;
               
        // parse the contents and insert the resulting dictionary
        tworker = new TaskWorker(yoshikoder){
            VBProFileParser parser = new VBProFileParser();
            protected void doWork() throws Exception {
                importedDictionary = parser.parse(f, preview.getSelectedEncoding().name());
                importedDictionary.setName(f.getName());
                if (parser.getErrors().size()>0)
                    throw new Exception("non-fatal import errors");
            }
            protected void onSuccess() {
View Full Code Here


            } catch (IOException ioe){
                DialogUtil.yelp(yoshikoder, "Could not open file " + f.getName(), ioe);
                return;
            }
           
            final PreviewPanel preview = new PreviewPanel(fileBytes, yoshikoder.getDefaultEncoding());
            int i = JOptionPane.showConfirmDialog(yoshikoder, preview,
                    "Preview Dictionary",  JOptionPane.OK_CANCEL_OPTION,
                    JOptionPane.PLAIN_MESSAGE);   
            if (i != JOptionPane.OK_OPTION)
                return;
           
            tworker = new TaskWorker(yoshikoder){
                VBProFileParser parser = new VBProFileParser();
                YKDictionary importedDictionary;
               
                protected void doWork() throws Exception {
                    importedDictionary = parser.parse(f, preview.getSelectedEncoding().name());
                    importedDictionary.setName(f.getName());
                    if (parser.getErrors().size()>0)
                        throw new Exception("non-fatal import errors");
                }
                protected void onSuccess() {
View Full Code Here

TOP

Related Classes of edu.harvard.wcfia.yoshikoder.ui.PreviewPanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.