Package javax.swing

Examples of javax.swing.JFileChooser.showSaveDialog()


    if (lastFolder != null)
    {
      fileChooser.setCurrentDirectory(lastFolder);
    }
   
    int retValue = fileChooser.showSaveDialog(this);
    if (retValue == JFileChooser.APPROVE_OPTION)
    {
      FileFilter fileFilter = fileChooser.getFileFilter();
      File file = fileChooser.getSelectedFile();
     
View Full Code Here


      File trackFile = null;
      JFileChooser chooser = new JFileChooser(getChooserRoot());
      chooser.addChoosableFileFilter(new MixFileFilter());
      chooser.addChoosableFileFilter(new HTMLFileFilter());

      int rc = chooser.showSaveDialog(SimpleMixer.this);

      if (rc == JFileChooser.APPROVE_OPTION) {
    trackFile = chooser.getSelectedFile();
    FileFilter ff = chooser.getFileFilter();
    if (ff instanceof ExtensionFilter) {
View Full Code Here

                 result = true;
             }
            break;
         }

         if (chooser.showSaveDialog(frame) == JFileChooser.APPROVE_OPTION)
         {
            
            _toSaveTo = chooser.getSelectedFile();

            if (!_toSaveTo.exists() && null != fileAppenixes.get(chooser.getFileFilter()))
View Full Code Here

        return;
      }
     
      JFileChooser chooser = new JFileChooser();
      chooser.setSelectedFile(new File(StringHelper.lastToken(selectedFile.filename, "/")));
      if (chooser.showSaveDialog(JHylaFAX.getInstance()) == JFileChooser.APPROVE_OPTION) {
        // TODO show warning, if file exists
        JobHelper.save(chooser.getSelectedFile(),
            getAbsolutePath(selectedFile.filename),  selectedFile.filesize);
      }
    }
View Full Code Here

        Dialogs.showInfo(AddressBook.this, i18n.tr("No data to export"), i18n.tr("JHylaFAX Addressbook Error"));
      }
     
      JFileChooser fileChooser = new JFileChooser();
      fileChooser.addChoosableFileFilter(new FileExtensionFilter(i18n.tr("vCards (*.vcf)"), ".vcf"));
      if (fileChooser.showSaveDialog(AddressBook.this) == JFileChooser.APPROVE_OPTION) {
        try {
          SimpleContact[] contacts = getSelectedContacts();
          if (contacts.length == 0) {
            contacts = getAlllContacts();
          }
View Full Code Here

    }

    for (;;)
    {
      outFile = null;
      if (chooser.showSaveDialog(parentFrame) == JFileChooser.APPROVE_OPTION)
      {
        outFile = chooser.getSelectedFile();
        if (canSaveToFile(parentFrame, outFile))
        {
          break;
View Full Code Here

                fd.setApproveButtonText( DemoApp.getRes().getString( "Custimize Binary" ) );
                FileFilter filter = new ExtensionFilter( DemoApp.getRes().getString( "Executable File (*.exe)" ), new String[] { "exe" } );
                fd.setFileFilter( filter );

                int returnVal = fd.showSaveDialog( CustomizeDialog.this );

                if ( returnVal == JFileChooser.APPROVE_OPTION )
                {
                    try
                    {
View Full Code Here

        PdfSelectionTableItem[] rows = selectionPanel.getTableRows();
        if (!ArrayUtils.isEmpty(rows)) {
            try {
                JFileChooser fileChooser = SharedJFileChooser.getInstance(SharedJFileChooserType.XML_FILE,
                        JFileChooser.FILES_ONLY);
                if (fileChooser.showSaveDialog(selectionPanel) == JFileChooser.APPROVE_OPTION) {
                    File selectedFile = FileExtensionUtility.ensureExtension(fileChooser.getSelectedFile(),
                            FileExtensionUtility.XML_EXTENSION);
                    writeXmlFile(rows, selectedFile);
                }
            } catch (Exception ex) {
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        ExportFormats.initAllExports();
        JFileChooser fc = ExportFormats.createExportFileChooser(
                    Globals.prefs.get("exportWorkingDirectory"));
        fc.showSaveDialog(frame);
        File file = fc.getSelectedFile();
        if (file == null)
          return;
        FileFilter ff = fc.getFileFilter();
        if (ff instanceof ExportFileFilter) {
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        ExportFormats.initAllExports();
        JFileChooser fc = ExportFormats.createExportFileChooser(
                    Globals.prefs.get("exportWorkingDirectory"));
        fc.showSaveDialog(frame);
        File file = fc.getSelectedFile();
        if (file == null)
          return;
        FileFilter ff = fc.getFileFilter();
        if (ff instanceof ExportFileFilter) {
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.