Examples of resetChoosableFileFilters()


Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

  /**
   * Resets the list of choosable file filters.
   */
  public void resetFileFilters() {
    JFileChooser embeddedEditor = (JFileChooser)m_fileEditor.getCustomEditor();
    embeddedEditor.resetChoosableFileFilters();
  }
 
  private void showFileEditor() {
    if (m_fileEditorDialog == null) {
      int x = getLocationOnScreen().x;
View Full Code Here

Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

    {
      chooser = new JFileChooser();
      choosers.put( action, chooser );
    }

    chooser.resetChoosableFileFilters();

    return chooser;
  }

  public static Component getParent()
View Full Code Here

Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

  public void saveAs() {
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setCurrentDirectory(new java.io.File(fileChooserDir));
    fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
    fileChooser.resetChoosableFileFilters();
    fileChooser.addChoosableFileFilter(new PGNFileFilter());
    int choice = fileChooser.showSaveDialog(null);
    if (choice == JFileChooser.APPROVE_OPTION) {
      File file = fileChooser.getSelectedFile();
      fileChooserDir = file.getPath();
View Full Code Here

Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

          if (isFileChanged())
            askForSaving();
          JFileChooser fileChooser = new JFileChooser();
          fileChooser.setCurrentDirectory(new java.io.File(fileChooserDir));
          fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
          fileChooser.resetChoosableFileFilters();
          fileChooser.addChoosableFileFilter(new PGNFileFilter());
          int choice = fileChooser.showOpenDialog(null);
          if (choice == JFileChooser.APPROVE_OPTION) {
            loadFile(fileChooser.getSelectedFile());
            fileName = fileChooser.getSelectedFile().getName();
View Full Code Here

Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

      if (!Environment.getStandAlone()&&save&&selectedFileName!=null&&selectedFileName.endsWith("."+DEFAULT_FILE_EXTENSION)){
        selectedFileName=changeFileExtension(selectedFileName,save?"xml":"mpp");
      }
      final JFileChooser fileChooser = getFileChooser();
      fileChooser.setDialogType(save?JFileChooser.SAVE_DIALOG:JFileChooser.OPEN_DIALOG);
      fileChooser.resetChoosableFileFilters();
      if (selectedFileName==null){
        try {
        fileChooser.setCurrentDirectory(new File(System.getProperty("user.home")+File.separator+"OpenProj"));
      } catch (Exception e) {
      }
View Full Code Here

Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

        if (chooser == null) {
            chooser = new JFileChooser();
            choosers.put(action, chooser);
        }

        chooser.resetChoosableFileFilters();

        return chooser;
    }

    public static Component getParent() {
View Full Code Here

Examples of javax.swing.JFileChooser.resetChoosableFileFilters()

  /**
   * Resets the list of choosable file filters.
   */
  public void resetFileFilters() {
    JFileChooser embeddedEditor = (JFileChooser)m_fileEditor.getCustomEditor();
    embeddedEditor.resetChoosableFileFilters();
  }
 
  private void showFileEditor() {
    if (m_fileEditorDialog == null) {
      int x = getLocationOnScreen().x;
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.