Package com.extjs.gxt.samples.client.examples.model

Examples of com.extjs.gxt.samples.client.examples.model.FileModel


      files = f.listFiles(filter);
    }

    List<FileModel> models = new ArrayList<FileModel>();
    for (File f : files) {
      FileModel m = null;
      if (f.isDirectory()) {
        m = new FolderModel(f.getName(), f.getAbsolutePath());
      } else {
        m = new FileModel(f.getName(), f.getAbsolutePath());
        m.set("size", f.length());
        m.set("date", new Date(f.lastModified()));
      }

      if (idMap.containsKey(f)) {
        m.set("id", idMap.get(f));
      } else {
        String id = String.valueOf(counter++);
        idMap.put(f, id);
        m.set("id", id);
      }

      models.add(m);
    }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.samples.client.examples.model.FileModel

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.