Package de.hpi.eworld.gui

Examples of de.hpi.eworld.gui.FileNameEndingFilter


    }

    public void actionPerformed(final ActionEvent e) {
      final JFileChooser fileChooser = new JFileChooser();

      final FileFilter xmlFileFilter = new FileNameEndingFilter(
          "OSM files (.osm, .osm.xml or .xml)", ".osm", ".xml");
      fileChooser.setFileFilter(xmlFileFilter);

      final File examplesFolder = new File("./examples");
      if (examplesFolder.exists()) {
View Full Code Here


  public void actionPerformed(ActionEvent e) {
    // final SumoExportDialog dialog = new SumoExportDialog();
    // dialog.setVisible(true);
    JFileChooser dialog = new JFileChooser();

    FileFilter popFilter = new FileNameEndingFilter(
        "SUMO population files (.pop or .pop.xml)", ".pop", ".pop.xml");
    dialog.addChoosableFileFilter(popFilter);
    dialog.setFileFilter(popFilter);
    if (dialog.showDialog(parentWindow, "Export") == JFileChooser.APPROVE_OPTION) {
      new SumoPopulationExport(dialog.getSelectedFile()).start();
View Full Code Here

      JFileChooser fileChooser = new JFileChooser();
     
      String description = "SUMO files " + endings[0];
      for (int i = 1; i< endings.length; ++i)
        description = description + " or " + endings[i];
      FileFilter xmlFileFilter = new FileNameEndingFilter(description, endings);
      fileChooser.setFileFilter(xmlFileFilter);
     
      int state = fileChooser.showOpenDialog(this.parent);
     
      if(state == JFileChooser.APPROVE_OPTION){
View Full Code Here

TOP

Related Classes of de.hpi.eworld.gui.FileNameEndingFilter

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.