Revision 6599 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/ThemeControls.java
ThemeControls.java | ||
---|---|---|
93 | 93 |
MapControl mapCtrl = vista.getMapControl(); |
94 | 94 |
logger.debug("Comand : " + s); |
95 | 95 |
|
96 |
if (s.compareTo("SHAPE_SELECTED") == 0) {
|
|
96 |
if (s.equals("SHAPE_SELECTED")) {
|
|
97 | 97 |
createShape(mapa); |
98 |
} else if (s.compareTo("DXF_SELECTED") == 0) {
|
|
98 |
} else if (s.equals("DXF_SELECTED")) {
|
|
99 | 99 |
createDxf(mapa); |
100 |
} else if (s.compareTo("DEL_SELECTION") == 0) { |
|
101 |
boolean refresh = false; |
|
102 |
|
|
103 |
for (int i = 0; i < mapa.getLayers().getLayersCount(); i++) { |
|
104 |
/* JMV: Esto deberia de ser asi (Las capas son 'Selectable' o no) |
|
105 |
* pero de momento lo cambiamos para que use una capa vectorial |
|
106 |
* |
|
107 |
|
|
108 |
if (map.getLayers().getLayer(i) instanceof Selectable) { |
|
109 |
if (mapa.getLayers().getLayer(i).isActive()) { |
|
110 |
Selectable selectable = (Selectable) mapa.getLayers().getLayer(i); |
|
111 |
|
|
112 |
if (selectable.getSelection().cardinality() != 0) { |
|
113 |
refresh = true; |
|
114 |
} |
|
115 |
selectable.clearSelection(); |
|
116 |
} |
|
117 |
} |
|
118 |
|
|
119 |
*/ |
|
120 |
if (mapa.getLayers().getLayer(i) instanceof FLyrVect) { |
|
121 |
if (mapa.getLayers().getLayer(i).isActive()) { |
|
122 |
|
|
123 |
try { |
|
124 |
SelectableDataSource dataSource; |
|
125 |
|
|
126 |
dataSource = ((FLyrVect)mapa.getLayers().getLayer(i)).getRecordset(); |
|
127 |
if (dataSource.getSelection().cardinality() != 0) { |
|
128 |
refresh = true; |
|
129 |
} |
|
130 |
dataSource.clearSelection(); |
|
131 |
} catch (DriverException e) { |
|
132 |
// TODO Auto-generated catch block |
|
133 |
e.printStackTrace(); |
|
134 |
} |
|
135 |
|
|
136 |
} |
|
137 |
} |
|
138 |
} |
|
139 |
|
|
140 |
if (refresh) { |
|
141 |
mapCtrl.drawMap(false); |
|
142 |
} |
|
143 |
} else if (s.compareTo("ZOOM_SELECT") == 0) { |
|
100 |
} else if (s.equals("ZOOM_SELECT")) { |
|
144 | 101 |
Rectangle2D selectedExtent = mapa.getSelectionBounds(); |
145 | 102 |
|
146 | 103 |
if (selectedExtent != null) { |
... | ... | |
191 | 148 |
|
192 | 149 |
//} |
193 | 150 |
} |
194 |
|
|
151 |
|
|
195 | 152 |
/** |
196 | 153 |
* Crea un DXF partiendo de los objetos seleccionados. Desarrollado en el |
197 | 154 |
* piloto de CAD. Lo de aqu? no sirve. |
Also available in: Unified diff