Revision 2242 org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java
WMSParamsPanel.java | ||
---|---|---|
769 | 769 |
JDnDListModel modelo = (JDnDListModel) lstSelectedLayers.getModel(); |
770 | 770 |
|
771 | 771 |
try { |
772 |
if (modelo.addElement(0, nodo.clone())) {
|
|
772 |
if (modelo.addElement(modelo.getSize(), nodo.clone())) {
|
|
773 | 773 |
alguno = true; |
774 | 774 |
} |
775 | 775 |
} catch (CloneNotSupportedException e) { |
... | ... | |
1306 | 1306 |
* @return Vector |
1307 | 1307 |
*/ |
1308 | 1308 |
public Vector<RemoteWMSStyle> getStyles() { |
1309 |
Vector<RemoteWMSStyle> v = new Vector<RemoteWMSStyle>(); |
|
1310 | 1309 |
WMSLayerNode[] layers = selectedLayersToArray(); |
1311 |
for (int i = 0; i < layers.length; i++) { |
|
1310 |
Vector<RemoteWMSStyle> v = new Vector<RemoteWMSStyle>(layers.length); |
|
1311 |
int posInsertion = 0; |
|
1312 |
|
|
1313 |
for (int i = layers.length - 1; i >= 0; i--) { |
|
1312 | 1314 |
RemoteWMSStyle sty = layers[i].getSelectedStyle(); |
1313 | 1315 |
if(sty != null) |
1314 |
v.add(0, sty); |
|
1316 |
v.add(posInsertion, sty); |
|
1317 |
else { |
|
1318 |
RemoteWMSStyle s = new RemoteWMSStyle(); |
|
1319 |
s.name = "default"; |
|
1320 |
v.add(posInsertion, s); |
|
1321 |
} |
|
1322 |
posInsertion ++; |
|
1315 | 1323 |
} |
1316 | 1324 |
return v; |
1317 | 1325 |
} |
Also available in: Unified diff