Revision 67
trunk/org.gvsig.app.document.layout.app/org.gvsig.app.document.layout.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/gui/dialogs/FFrameOverViewDialog.java | ||
---|---|---|
22 | 22 |
package org.gvsig.app.project.documents.layout.fframes.gui.dialogs; |
23 | 23 |
|
24 | 24 |
import java.awt.geom.Rectangle2D; |
25 |
import java.util.ArrayList; |
|
26 |
import java.util.List; |
|
25 | 27 |
|
26 | 28 |
import javax.swing.JList; |
27 | 29 |
|
... | ... | |
164 | 166 |
ListViewModel listmodel = new ListWithoutOverViewModel(); |
165 | 167 |
|
166 | 168 |
listmodel.addViews(layoutPanel); |
169 |
|
|
170 |
// ================ Remove franmes with view = null |
|
171 |
List<FFrameView> toremove = new ArrayList(); |
|
172 |
int sz = listmodel.getSize(); |
|
173 |
Object item = null; |
|
174 |
FFrameView item_fv = null; |
|
175 |
for (int i=0; i<sz; i++) { |
|
176 |
item = listmodel.getElementAt(i); |
|
177 |
if (item instanceof FFrameView) { |
|
178 |
item_fv = (FFrameView) item; |
|
179 |
if (item_fv.getView() == null) { |
|
180 |
toremove.add(item_fv); |
|
181 |
} |
|
182 |
} |
|
183 |
} |
|
184 |
for (int i=0; i<toremove.size(); i++) { |
|
185 |
listmodel.removeFrameView(toremove.get(i)); |
|
186 |
} |
|
187 |
// ================ |
|
167 | 188 |
|
168 | 189 |
// /ArrayList list = listmodel.getViews(); |
169 | 190 |
liVistas = new javax.swing.JList(); |
Also available in: Unified diff