Example usage for java.awt FileDialog FileDialog

List of usage examples for java.awt FileDialog FileDialog

Introduction

In this page you can find the example usage for java.awt FileDialog FileDialog.

Prototype

public FileDialog(Dialog parent, String title) 

Source Link

Document

Creates a file dialog window with the specified title for loading a file.

Usage

From source file:com.declarativa.interprolog.gui.ListenerWindow.java

/**
 * */*ww  w  .  j  a  v  a  2  s  .c o  m*/
 * Generates the subgraph and splits the Program in Subgraphs (Graph
 * Analysis)
 */
public void GraphAnalysis() {
    String fileToLoad, folder;
    File filetoreconsult = null;
    FileDialog d = new FileDialog(this, "Consult file...");
    d.setVisible(true);
    fileToLoad = d.getFile();
    folder = d.getDirectory();
    if (fileToLoad != null) {
        ArgBuildManager manag = new ArgBuildManager();
        manag.GraphFileRules(folder, fileToLoad);//Call to the ArgBuildManager!
        /*
         filetoreconsult = new File(folder, fileToLoad);
         if (engine.consultAbsolute(filetoreconsult)) {
         addToReloaders(filetoreconsult, "consult");
         }
         */
        //System.out.println("file:"+filetoreconsult.);

    }
}

From source file:com.declarativa.interprolog.gui.ListenerWindow.java

/**
 * *//from   w ww.  j a v  a 2  s.com
 * Generates the subgraph and splits the Program in Subgraphs (Graph
 * Analysis)
 */
public void GraphAnalysis2() {
    String fileToLoad, folder;
    File filetoreconsult = null;
    FileDialog d = new FileDialog(this, "Consult file...");
    d.setVisible(true);
    fileToLoad = d.getFile();
    folder = d.getDirectory();
    if (fileToLoad != null) {
        ArgBuildManager manag = new ArgBuildManager();
        manag.GraphAnalysis4Frag(folder, fileToLoad);//Call to the ArgBuildManager!
    }
}

From source file:com.declarativa.interprolog.gui.ListenerWindow.java

/**
 * For XSB only/* w  ww.  ja va2  s .co m*/
 */
void load_dynFile() {
    String nome, directorio;
    File filetoreconsult = null;
    FileDialog d = new FileDialog(this, "load_dyn file...");
    d.show();
    nome = d.getFile();
    directorio = d.getDirectory();
    if (nome != null) {
        filetoreconsult = new File(directorio, nome);
        if (successfulCommand(
                "load_dyn('" + engine.unescapedFilePath(filetoreconsult.getAbsolutePath()) + "')")) {
            addToReloaders(filetoreconsult, "load_dyn");
        }
    }
}