コード例 #1
0
 private Collection<Layer> layersWithoutDataSource(Task task) {
   ArrayList<Layer> layersWithoutDataSource = new ArrayList<Layer>();
   for (Iterator i = task.getLayerManager().getLayers().iterator(); i.hasNext(); ) {
     Layer layer = (Layer) i.next();
     if (!layer.hasReadableDataSource()) {
       layersWithoutDataSource.add(layer);
     }
   }
   return layersWithoutDataSource;
 }
コード例 #2
0
  public Task createTask() {
    Task task = new Task();

    // LayerManager shouldn't automatically add categories in its
    // constructor.
    // Sometimes we want to create a LayerManager with no categories
    // (e.g. in OpenProjectPlugIn). [Jon Aquino]
    task.getLayerManager().addCategory(StandardCategoryNames.WORKING);
    task.getLayerManager().addCategory(StandardCategoryNames.SYSTEM);
    task.setName("Task " + taskSequence++);

    return task;
  }