Revision 433 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/DefaultLayoutContext.java
DefaultLayoutContext.java | ||
---|---|---|
24 | 24 |
import java.awt.geom.AffineTransform; |
25 | 25 |
import java.lang.reflect.Array; |
26 | 26 |
import java.util.ArrayList; |
27 |
import java.util.Arrays; |
|
27 | 28 |
import java.util.Hashtable; |
29 |
import java.util.Iterator; |
|
30 |
import java.util.List; |
|
28 | 31 |
|
29 | 32 |
import org.gvsig.andami.PluginServices; |
30 | 33 |
import org.gvsig.app.project.ProjectManager; |
... | ... | |
233 | 236 |
} |
234 | 237 |
|
235 | 238 |
public IFFrame[] getAllFFrames() { |
236 |
ArrayList all = new ArrayList();
|
|
239 |
List all = new ArrayList(); |
|
237 | 240 |
return (IFFrame[]) allFFrames(getFFrames(), all) |
238 | 241 |
.toArray(new IFFrame[0]); |
239 | 242 |
} |
240 | 243 |
|
241 |
private ArrayList allFFrames(IFFrame[] fframes, ArrayList all) { |
|
244 |
public Iterator deepiterator() { |
|
245 |
List all = new ArrayList(); |
|
246 |
allFFrames(getFFrames(), all); |
|
247 |
return all.iterator(); |
|
248 |
} |
|
249 |
|
|
250 |
public Iterator iterator() { |
|
251 |
return Arrays.asList(fframes).iterator(); |
|
252 |
} |
|
253 |
|
|
254 |
private List allFFrames(IFFrame[] fframes, List all) { |
|
242 | 255 |
for (int i = 0; i < fframes.length; i++) { |
243 | 256 |
if (fframes[i] instanceof FFrameGroup) { |
244 |
ArrayList groupFrames =
|
|
257 |
List groupFrames = |
|
245 | 258 |
allFFrames(((FFrameGroup) fframes[i]).getFFrames(), all); |
246 | 259 |
if (!all.containsAll(groupFrames)) { |
247 | 260 |
all.addAll(groupFrames); |
Also available in: Unified diff