Package org.openide.filesystems

Examples of org.openide.filesystems.FileChooserBuilder


        getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(CodeSnifferOptionsPanel.class, "CodeSnifferPanel.AccessibleContext.accessibleDescription")); // NOI18N
    }// </editor-fold>//GEN-END:initComponents

    private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
        File codeSnifferScript = new FileChooserBuilder(CodeSnifferOptionsPanel.class.getName() + CODE_SNIFFER_LAST_FOLDER_SUFFIX)
                .setTitle(NbBundle.getMessage(CodeSnifferOptionsPanel.class, "LBL_CodeSnifferSelect"))
                .setFilesOnly(true)
                .showOpenDialog();
        if (codeSnifferScript != null) {
            codeSnifferScript = FileUtil.normalizeFile(codeSnifferScript);
View Full Code Here


    }// </editor-fold>//GEN-END:initComponents

    @NbBundle.Messages("Laravel4CustomizerPanel.browseAppDir.title=Select \"app\" directory")
    private void appDirectoryBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_appDirectoryBrowseButtonActionPerformed
        // TODO add your handling code here:
        File appDirectory = new FileChooserBuilder(Laravel4CustomizerPanel.class)
                .setTitle(Bundle.Laravel4CustomizerPanel_browseAppDir_title())
                .setDirectoriesOnly(true)
                .setDefaultWorkingDirectory(FileUtil.toFile(source))
                .forceUseOfDefaultWorkingDirectory(true)
                .showOpenDialog();
View Full Code Here

        }
    }//GEN-LAST:event_downloadSkeletonLabelMousePressed

    @NbBundle.Messages("Laravel4OptionsPanel.browse.skeleton=Select Laravel Skeleton Application (.zip)")
    private void browseSkeletonButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseSkeletonButtonActionPerformed
        File skeleton = new FileChooserBuilder(Laravel4OptionsPanel.class.getName() + SKELETON_LAST_FOLDER_SUFFIX)
                .setTitle(Bundle.Laravel4OptionsPanel_browse_skeleton())
                .setFilesOnly(true)
                .setFileFilter(ZIP_FILE_FILTER)
                .showOpenDialog();
       
View Full Code Here

        setOverridableOptionsState(enableIvyCbx.isSelected(), useGlobal);

    }//GEN-LAST:event_useRetrieveSettingsTemplateCbxItemStateChanged

    private void ivyPropertiesFileAddBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ivyPropertiesFileAddBtnActionPerformed
        FileChooserBuilder builder = new FileChooserBuilder(Utilities.FILE_CHOOSER_BUILDER_KEY);
        builder.setTitle(NbBundle.getMessage(CustomizerPanel.class, "CustomizerPanel.propertiesFileChooser.title"));
        builder.addFileFilter(PROPERTIS_FILE_FILTER);
        File ivyPropertiesFileChosen = builder.showOpenDialog();

        if (ivyPropertiesFileChosen != null) {
            try {
                DefaultListModel propertyFileListModel = (DefaultListModel) propertiesFileList.getModel();
                String filePath = ivyPropertiesFileChosen.getCanonicalPath();
View Full Code Here

        }
        ivyPropertiesFileDeleteBtn.setEnabled(false);
    }//GEN-LAST:event_ivyPropertiesFileDeleteBtnActionPerformed

    private void ivyFileBrowseBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ivyFileBrowseBtnActionPerformed
        FileChooserBuilder builder = new FileChooserBuilder(Utilities.FILE_CHOOSER_BUILDER_KEY);
        builder.setTitle(NbBundle.getMessage(CustomizerPanel.class, "CustomizerPanel.ivyFileChooser.title"));
        File ivyFileChosen = builder.showOpenDialog();

        if (ivyFileChosen != null) {
            String filePath = ivyFileChosen.toURI().toString();
            if (isValidIvyFile(filePath)) {
                ivyFileText.setText(filePath);
View Full Code Here

            }
        }
    }//GEN-LAST:event_ivyFileBrowseBtnActionPerformed

    private void ivySettingsFileBrowseBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ivySettingsFileBrowseBtnActionPerformed
        FileChooserBuilder builder = new FileChooserBuilder(Utilities.FILE_CHOOSER_BUILDER_KEY);
        builder.setTitle(NbBundle.getMessage(CustomizerPanel.class, "CustomizerPanel.ivySettingsFileChooser.title"));
        File ivyFileChosen = builder.showOpenDialog();

        if (ivyFileChosen != null) {
            String filePath = ivyFileChosen.toURI().toString();
            if (isValidIvySettingsFile(filePath)) {
                ivySettingsFileText.setText(filePath);
View Full Code Here

      File home = new File(System.getProperty("user.home"));
      // filter to show only CSV files in the chooser
      FileNameExtensionFilter filter = new FileNameExtensionFilter("Comma Separated Value File", "csv");
      // Use FileChooserBuilder rather than JFileChooser because it will remember
      // the previously used directory based on a unique key (ImportCSVAction.class)
      File toOpen = new FileChooserBuilder(ImportCSVAction.class).
              setTitle("Choose CSV file").
              setFileFilter(filter).
              setDefaultWorkingDirectory(home).
              setApproveText("Open").
              showOpenDialog();
View Full Code Here

                .addContainerGap(110, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
        File yiiScript = new FileChooserBuilder(YiiOptionsPanel.class.getName() + YII_LAST_FOLDER_SUFFIX)
                .setTitle(NbBundle.getMessage(YiiOptionsPanel.class, "LBL_SelectYii"))
                .setFilesOnly(true)
                .showOpenDialog();
        if (yiiScript != null) {
            yiiScript = FileUtil.normalizeFile(yiiScript);
View Full Code Here

        if (!initialDialog || DialogDescriptor.OK_OPTION.equals( DialogDisplayer.getDefault().notify( new NotifyDescriptor.Confirmation( msg, title ) ) )) {
            String approve = NbBundle.getMessage( Npm.class, "APPROVE_FIND_NPM" );

            File[] roots = File.listRoots();

            FileChooserBuilder bldr = new FileChooserBuilder( Npm.class ).setApproveText( approve ).setFilesOnly( true ).setFileFilter( new javax.swing.filechooser.FileFilter() {
                @Override
                public boolean accept ( File f ) {
                    return f.isDirectory() || f.isFile() && f.canExecute();
                }

                @Override
                public String getDescription () {
                    return null;
                }
            } ).setTitle( title );
            if (roots.length > 0) {
                bldr.setDefaultWorkingDirectory( roots[0] );
            }

            File f = bldr.showOpenDialog();
            return f == null || !f.exists() ? null : f.getAbsolutePath();
        }
        return null;
    }
View Full Code Here

        }
        return null;
    }

    public String askUserForExecutableLocation () {
        File f = new FileChooserBuilder( DefaultExecutable.class ).setTitle( NbBundle.getMessage( DefaultExecutable.class, "LOCATE_EXECUTABLE" ) ).setFilesOnly( true ).setApproveText( NbBundle.getMessage( DefaultExecutable.class, "LOCATE_EXECUTABLE_APPROVE" ) ).showOpenDialog();
        return f == null ? null : f.getAbsolutePath();
    }
View Full Code Here

TOP

Related Classes of org.openide.filesystems.FileChooserBuilder

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.