Package nz.govt.natlib.meta.ui

Examples of nz.govt.natlib.meta.ui.FileDialog


  }

  private void saveViewModel() {
    // create and open a fileDialog
    JDialog fileDialog = new JDialog(this, "Open File", true);
    FileDialog filePanel = new FileDialog(this, this, true, false, false);
    fileDialog.getContentPane().add(filePanel);
    fileDialog.pack();

    // set the location.
    Point p1 = this.getLocation();
    Dimension d1 = this.getSize();
    Dimension d2 = fileDialog.getSize();
    fileDialog.setLocation((p1.x + (d1.width / 2)) - (d2.width / 2),
        (p1.y + (d1.height / 2)) - (d2.height / 2));

    filePanel.setCurrentDirectory(Config.getInstance().getBaseHarvestDir());
    fileDialog.show();
  }
View Full Code Here


  }

  private void openFile() {
    // create and open a fileDialog
    JDialog fileDialog = new JDialog(this, "Select File", true);
    FileDialog filePanel = new FileDialog(this, this, false, false, false);
    fileDialog.getContentPane().add(filePanel);
    fileDialog.pack();

    // set the location.
    Point p1 = this.getLocation();
    Dimension d1 = this.getSize();
    Dimension d2 = fileDialog.getSize();
    fileDialog.setLocation((p1.x + (d1.width / 2)) - (d2.width / 2),
        (p1.y + (d1.height / 2)) - (d2.height / 2));

    filePanel.setCurrentDirectory(Config.getInstance().getBaseHarvestDir());
    fileDialog.show();
  }
View Full Code Here

TOP

Related Classes of nz.govt.natlib.meta.ui.FileDialog

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.