Package javax.swing.filechooser

Examples of javax.swing.filechooser.FileNameExtensionFilter


        else
            chooser.setCurrentDirectory(new File(txtLogFile.getText()));
        chooser.setMultiSelectionEnabled(false);
        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        chooser.resetChoosableFileFilters();
        chooser.setFileFilter(new FileNameExtensionFilter("Log Files", "log"));
        int result = chooser.showOpenDialog(CourseGraderApp.getApplication()
                .getMainFrame());
        if (result == JFileChooser.APPROVE_OPTION)
        {
            try
View Full Code Here


        else
            chooser.setCurrentDirectory(new File(txtRaptorExecutable.getText()));
        chooser.setMultiSelectionEnabled(false);
        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        chooser.resetChoosableFileFilters();
        chooser.setFileFilter(new FileNameExtensionFilter("Executable Files", "exe"));
        int result = chooser.showOpenDialog(CourseGraderApp.getApplication()
                .getMainFrame());
        if (result == JFileChooser.APPROVE_OPTION)
        {
            try
View Full Code Here

        else
            chooser.setCurrentDirectory(new File(txtJavaExecutable.getText()));
        chooser.setMultiSelectionEnabled(false);
        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        chooser.resetChoosableFileFilters();
        chooser.setFileFilter(new FileNameExtensionFilter("Executable Files", "exe"));
        int result = chooser.showOpenDialog(CourseGraderApp.getApplication()
                .getMainFrame());
        if (result == JFileChooser.APPROVE_OPTION)
        {
            try
View Full Code Here

        else
            chooser.setCurrentDirectory(new File(txtRunmeExecutable.getText()));
        chooser.setMultiSelectionEnabled(false);
        chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
        chooser.resetChoosableFileFilters();
        chooser.setFileFilter(new FileNameExtensionFilter("Executable Files", "exe"));
        int result = chooser.showOpenDialog(CourseGraderApp.getApplication()
                .getMainFrame());
        if (result == JFileChooser.APPROVE_OPTION)
        {
            try
View Full Code Here

                fileChooser.setCurrentDirectory(cwd);
            }
        }

        // newInstance a Python/Jython extension filter
        FileNameExtensionFilter pythonFilter = new FileNameExtensionFilter("Python file", "py");
        fileChooser.setFileFilter(pythonFilter);

        // display file chooser
        int choice = fileChooser.showDialog(parent, "Add");
        if( choice == JFileChooser.APPROVE_OPTION)
View Full Code Here

    public XFileChooser(int profile)
    {
        selectedProfile = profile;

        // create file extension filter:
        FileNameExtensionFilter filter = new FileNameExtensionFilter(PROF_TYPES[selectedProfile], PROF_EXT[selectedProfile]);
        setFileFilter(filter);

        // retrieve directory from preferences
        Preferences prefs = Preferences.userRoot();
        preferences = prefs.node(MODBUSPAL_REG_PATH);
View Full Code Here

    /* The file chooser for setting log file. */
    private class SaveLogFileChooser extends JFileChooser {
        private static final long serialVersionUID = -3035086973026766211L;

        public SaveLogFileChooser() {
            setFileFilter(new FileNameExtensionFilter("CSV files", "csv"));
        }
View Full Code Here

          //This only runs when we actually use the Open
      @Override
      public void actionPerformed(ActionEvent arg0)
      {
        JFileChooser chooser = new JFileChooser();
            FileNameExtensionFilter filter = new FileNameExtensionFilter(
                "Tree files", "tree");
            chooser.setFileFilter(filter);
            Component parent=null;
            int returnVal = chooser.showOpenDialog(parent);
          
View Full Code Here

  public final static String pptx = "pptx";
  public final static String xls = "xls";
  public final static String xlsx = "xlsx";

  public static FileFilter getImageExtension() {
    return new FileNameExtensionFilter("Images", "bmp", "gif", "jpg",
        "jpeg", "png");
  }
View Full Code Here

    return new FileNameExtensionFilter("Images", "bmp", "gif", "jpg",
        "jpeg", "png");
  }

  public static FileFilter getMicorsoftExtension() {
    return new FileNameExtensionFilter("MS office", "doc", "docx", "xls",
        "xlxs", "ppt", "pptx");
  }
View Full Code Here

TOP

Related Classes of javax.swing.filechooser.FileNameExtensionFilter

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.