Examples of ExportFileDialog


Examples of org.twodividedbyzero.idea.findbugs.gui.common.ExportFileDialog

      //Ask the user for a export directory
      final DialogBuilder dialogBuilder = new DialogBuilder(project);
      dialogBuilder.addOkAction();
      dialogBuilder.addCancelAction();
      dialogBuilder.setTitle("Select directory to save the exported file");
      final ExportFileDialog exportDialog = new ExportFileDialog(exportDir, dialogBuilder);
      dialogBuilder.showModal(true);
      if (dialogBuilder.getDialogWrapper().getExitCode() == DialogWrapper.CANCEL_EXIT_CODE) {
        return;
      }
      final String path = exportDialog.getText();
      if (path == null || path.trim().isEmpty()) {
        return;
      }

      exportXml = exportDialog.isXml() != exportXml ? exportDialog.isXml() : exportXml;
      exportHtml = exportDialog.isXml() == exportHtml ? !exportDialog.isXml() : exportHtml;
      exportBoth = exportDialog.isBoth() != exportBoth ? exportDialog.isBoth() : exportBoth;
      exportDir = path.trim();
    }
    //Create a unique file name by using time stamp
    final Date currentDate = new Date();
    final String timestamp = PATTERN.matcher(new SimpleDateFormat().format(currentDate)).replaceAll("_");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.