Package org.eobjects.datacleaner.widgets

Examples of org.eobjects.datacleaner.widgets.DCFileChooser


  @Override
  public void actionPerformed(ActionEvent event) {
    UsageLogger.getInstance().log("Open analysis job");

    DCFileChooser fileChooser = new DCFileChooser(_userPreferences.getAnalysisJobDirectory());

    OpenAnalysisJobFileChooserAccessory accessory = new OpenAnalysisJobFileChooserAccessory(_windowContext,
        _configuration, fileChooser, _openAnalysisJobActionListenerProvider);
    fileChooser.setAccessory(accessory);

    fileChooser.setFileFilter(FileFilters.ANALYSIS_XML);
    int openFileResult = fileChooser.showOpenDialog((Component) event.getSource());

    if (openFileResult == JFileChooser.APPROVE_OPTION) {
      File file = fileChooser.getSelectedFile();
      openFile(file);
    }
  }
View Full Code Here


          .showErrorMessage("Errors in job", "Please fix the errors that exist in the job before saving it:\n\n"
              + _window.getStatusLabelText(), null);
      return;
    }

    DCFileChooser fileChooser = new DCFileChooser(_userPreferences.getAnalysisJobDirectory());
    fileChooser.setFileFilter(FileFilters.ANALYSIS_XML);

    int result = fileChooser.showSaveDialog(_window.toComponent());
    if (result == JFileChooser.APPROVE_OPTION) {
      File file = fileChooser.getSelectedFile();

      if (!file.getName().endsWith(".xml")) {
        file = new File(file.getParentFile(), file.getName() + FileFilters.ANALYSIS_XML.getExtension());
      }
View Full Code Here

    JMenuItem saveAsCsvItem = new JMenuItem("As CSV file");
    saveAsCsvItem.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent e) {
        DCFileChooser fileChooser = new DCFileChooser(_userPreferences.getAnalysisJobDirectory());
        fileChooser.addChoosableFileFilter(FileFilters.CSV);
        if (fileChooser.showSaveDialog((Component) event.getSource()) == JFileChooser.APPROVE_OPTION) {
          File selectedFile = fileChooser.getSelectedFile();
          if (selectedFile.getName().indexOf('.') == -1) {
            selectedFile = new File(selectedFile.getPath() + ".csv");
          }

          OutputWriter writer = CsvOutputWriterFactory.getWriter(selectedFile.getAbsolutePath(), _inputColumns);
View Full Code Here

        final JMenuItem manualInstallMenuItem = new JMenuItem("Manually install JAR file", imageManager
            .getImageIcon("images/filetypes/archive.png"));
        manualInstallMenuItem.addActionListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            final DCFileChooser fileChooser = new DCFileChooser(_userPreferences.getConfiguredFileDirectory());
            fileChooser.setMultiSelectionEnabled(true);
            fileChooser.setFileFilter(new ExtensionFilter("DataCleaner extension JAR file (.jar)", ".jar"));
            int result = fileChooser.showOpenDialog(ExtensionPackagesPanel.this);
            if (result == DCFileChooser.APPROVE_OPTION) {

              final File[] files = fileChooser.getSelectedFiles();

              final String suggestedPackageName = ExtensionPackage.autoDetectPackageName(files[0]);
              final String packageName = JOptionPane.showInputDialog(
                  "Please provide the package name of the extension", suggestedPackageName);
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.widgets.DCFileChooser

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.