Package net.sourceforge.squirrel_sql.plugins.dataimport.importer

Examples of net.sourceforge.squirrel_sql.plugins.dataimport.importer.IFileImporter


        ImportFileType type = determineType(f);



        IFileImporter importer = FileImporterFactory.createImporter(type, f);

        if (importer.getConfigurationPanel() != null) {
          //i18n[ImportTableDataCommand.settingsDialogTitle=Import file settings]
          final JDialog dialog = new JDialog(session.getApplication().getMainFrame(), stringMgr.getString("ImportTableDataCommand.settingsDialogTitle"), true);
          StateListener dialogState = new StateListener(dialog);
          dialog.setLayout(new BorderLayout());
          dialog.add(importer.getConfigurationPanel(), BorderLayout.CENTER);
          OkClosePanel buttons = new OkClosePanel();
          //i18n[ImportTableDataCommand.cancel=Cancel]
          buttons.getCloseButton().setText(stringMgr.getString("ImportTableDataCommand.cancel"));
          buttons.addListener(dialogState);
          dialog.add(buttons, BorderLayout.SOUTH);
          dialog.pack();
          GUIUtils.centerWithinParent(dialog);
          dialog.setVisible(true);
          if (!dialogState.isOkPressed()) {
            return;
          }
        }


        final ImportFileDialog importFileDialog = new ImportFileDialog(session, importer, table, columns);

        importFileDialog.setPreviewData(importer.getPreview(10));

        GUIUtils.processOnSwingEventThread(new Runnable() {
          public void run() {
            session.getApplication().getMainFrame().addWidget(importFileDialog);
            importFileDialog.moveToFront();
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.plugins.dataimport.importer.IFileImporter

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.