/* * (non-Javadoc) * @see com.iver.cit.gvsig.fmap.layers.layerOperations.LayerCollection#getActives() */ public FLayer[] getActives() { ArrayList ret = new ArrayList(); LayersIterator it = new LayersIterator(this) { public boolean evaluate(FLayer layer) { return layer.isActive(); } }; while (it.hasNext()) { ret.add(it.next()); } return (FLayer[]) ret.toArray(new FLayer[0]); }
/* * (non-Javadoc) * @see com.iver.cit.gvsig.fmap.layers.layerOperations.LayerCollection#getVisibles() */ public FLayer[] getVisibles() { ArrayList array = new ArrayList(); LayersIterator iter = new LayersIterator(this) { public boolean evaluate(FLayer layer) { return layer.isVisible(); } }; while (iter.hasNext()) { array.add(iter.nextLayer()); } return (FLayer[]) array.toArray(new FLayer[0]); }