Revision 3895
branches/v05/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/WMSStatus.java | ||
---|---|---|
126 | 126 |
this.extent = extent; |
127 | 127 |
} |
128 | 128 |
|
129 |
public boolean equals(Object obj){ |
|
130 |
if (obj instanceof WMSStatus) |
|
131 |
return false; |
|
132 |
WMSStatus s = (WMSStatus) obj; |
|
133 |
return (s.getExtent().equals(this.getExtent()) |
|
134 |
&& s.getFormat().equals(this.getFormat()) |
|
135 |
&& (s.getHeight() == this.getHeight()) |
|
136 |
&& (s.getWidth() == this.getWidth()) |
|
137 |
&& s.getLayerNames().equals(this.getLayerNames()) |
|
138 |
&& s.getStyles().equals(this.getStyles()) |
|
139 |
&& (s.getTransparency()==this.getTransparency())); |
|
140 |
} |
|
129 |
|
|
141 | 130 |
|
142 | 131 |
/** |
143 | 132 |
* @return |
... | ... | |
160 | 149 |
return dimensions; |
161 | 150 |
} |
162 | 151 |
|
152 |
public boolean equals(Object obj){ |
|
153 |
if (!(obj instanceof WMSStatus)) |
|
154 |
return false; |
|
155 |
WMSStatus s = (WMSStatus) obj; |
|
156 |
if (!(( s.getLayerNames()==null && this.getLayerNames()==null) || |
|
157 |
s.getLayerNames().equals(this.getLayerNames()))) |
|
158 |
return false; |
|
159 |
|
|
160 |
if (!(( s.getExtent()==null && this.getExtent()==null) || |
|
161 |
s.getExtent().equals(this.getExtent()))) |
|
162 |
return false; |
|
163 |
|
|
164 |
if ( s.getHeight() != this.getHeight()) |
|
165 |
return false; |
|
166 |
|
|
167 |
if ( s.getWidth() != this.getWidth()) |
|
168 |
return false; |
|
169 |
|
|
170 |
if (!(( s.getStyles()==null && this.getStyles()==null) || |
|
171 |
s.getStyles().equals(this.getStyles()))) |
|
172 |
return false; |
|
173 |
|
|
174 |
if (!(( s.getDimensions()==null && this.getDimensions()==null) || |
|
175 |
s.getDimensions().equals(this.getDimensions()))) |
|
176 |
return false; |
|
177 |
|
|
178 |
if ( s.getTransparency() != this.getTransparency()) |
|
179 |
return false; |
|
180 |
|
|
181 |
if (!(( s.getSrs()==null && this.getSrs()==null) || |
|
182 |
s.getSrs().equals(this.getSrs()))) |
|
183 |
return false; |
|
184 |
|
|
185 |
if (!(( s.getExceptionFormat()==null && this.getExceptionFormat()==null) || |
|
186 |
s.getExceptionFormat().equals(this.getExceptionFormat()))) |
|
187 |
return false; |
|
188 |
|
|
189 |
if (!(( s.getFormat()==null && this.getFormat()==null) || |
|
190 |
s.getFormat().equals(this.getFormat()))) |
|
191 |
return false; |
|
192 |
|
|
193 |
return true; |
|
194 |
} |
|
195 |
|
|
196 |
public Object clone() { |
|
197 |
WMSStatus newObject = new WMSStatus(); |
|
198 |
Vector v = this.getLayerNames(); |
|
199 |
if (v != null) |
|
200 |
newObject.setLayerNames((Vector)v.clone()); |
|
201 |
Rectangle2D r = this.getExtent(); |
|
202 |
if (r != null) |
|
203 |
newObject.setExtent((Rectangle2D)r.clone()); |
|
204 |
newObject.setHeight(this.getHeight()); |
|
205 |
newObject.setWidth(this.getWidth()); |
|
206 |
v = this.getStyles(); |
|
207 |
if (v != null) |
|
208 |
newObject.setStyles((Vector)v.clone()); |
|
209 |
v = this.getDimensions(); |
|
210 |
if (v != null) |
|
211 |
newObject.setDimensions((Vector)v.clone()); |
|
212 |
newObject.setTransparency(this.getTransparency()); |
|
213 |
newObject.setSrs(this.getSrs()); |
|
214 |
newObject.setExceptionFormat(this.getExceptionFormat()); |
|
215 |
newObject.setFormat(this.getFormat()); |
|
216 |
return newObject; |
|
217 |
} |
|
163 | 218 |
} |
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/fmap/layers/FLyrWMS.java | ||
---|---|---|
135 | 135 |
private int transparency = -1; |
136 | 136 |
private int rband = 0, gband = 1, bband = 2; |
137 | 137 |
private RasterFilterStackManager stackManager = null; |
138 |
private byte[] bytes; |
|
138 | 139 |
|
139 | 140 |
|
140 | 141 |
/** |
... | ... | |
382 | 383 |
wmsStatus.setDimensions(dimensions); |
383 | 384 |
wmsStatus.setTransparency(wmsTransparency); |
384 | 385 |
if (wmsPreviousStatus == null || !wmsPreviousStatus.equals(wmsStatus)){ |
385 |
wmsPreviousStatus = wmsStatus;
|
|
386 |
byte[] bytes;
|
|
386 |
wmsPreviousStatus = (WMSStatus) wmsStatus.clone();
|
|
387 |
// TODO eliminar bytes y usar directamente ficheros
|
|
387 | 388 |
bytes = getDriver().getMap(wmsStatus); |
388 |
|
|
389 |
ByteArrayInputStream inbytes = new ByteArrayInputStream(bytes); |
|
390 |
//BufferedImage tempImg = ImageIO.read(inbytes); |
|
391 |
// LWS Cambio de estrategia en el posicionado para la impresi?n. |
|
392 |
Point2D p2=new Point2D.Double(viewPort.getAdjustedExtent().getX(), viewPort.getAdjustedExtent().getMaxY()); //viewPort.getOffset(); |
|
393 |
viewPort.getAffineTransform().transform(p2, p2); |
|
394 |
// g.drawImage(tempImg,(int)p2.getX(),(int)p2.getY(), null); |
|
395 |
rasterProcess(g, viewPort, createTemp(inbytes, "wms_Query", viewPort)); |
|
396 |
if(status!=null && firstLoad){ |
|
397 |
status.applyStatus(this); |
|
398 |
firstLoad = false; |
|
399 |
} |
|
400 |
|
|
401 | 389 |
} |
390 |
ByteArrayInputStream inbytes = new ByteArrayInputStream(bytes); |
|
391 |
//BufferedImage tempImg = ImageIO.read(inbytes); |
|
392 |
// LWS Cambio de estrategia en el posicionado para la impresi?n. |
|
393 |
Point2D p2=new Point2D.Double(viewPort.getAdjustedExtent().getX(), viewPort.getAdjustedExtent().getMaxY()); //viewPort.getOffset(); |
|
394 |
viewPort.getAffineTransform().transform(p2, p2); |
|
395 |
// g.drawImage(tempImg,(int)p2.getX(),(int)p2.getY(), null); |
|
396 |
rasterProcess(g, viewPort, createTemp(inbytes, "wms_Query", viewPort)); |
|
397 |
if(status!=null && firstLoad){ |
|
398 |
status.applyStatus(this); |
|
399 |
firstLoad = false; |
|
400 |
} |
|
402 | 401 |
|
402 |
|
|
403 |
|
|
403 | 404 |
} catch (ValidationException e) { |
404 | 405 |
throw new DriverException("No se reconoce el formato de la respuesta", e); |
405 | 406 |
} catch (UnsupportedVersionException e) { |
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/gui/dialogs/WMSPropsDialog.java | ||
---|---|---|
221 | 221 |
|
222 | 222 |
public JButton getBtnOk() { |
223 | 223 |
if (btnOk == null) { |
224 |
btnOk = new JButton("aceptar");
|
|
225 |
btnOk.setText(PluginServices.getText(this,"aceptar"));
|
|
224 |
btnOk = new JButton("ok");
|
|
225 |
btnOk.setText(PluginServices.getText(this,"ok"));
|
|
226 | 226 |
btnOk.setActionCommand("OK"); |
227 | 227 |
btnOk.addActionListener(m_actionListener); |
228 | 228 |
btnOk.setBounds(367, 9, 90, 25); |
... | ... | |
233 | 233 |
public JButton getBtnApply() { |
234 | 234 |
if (btnApply == null) { |
235 | 235 |
btnApply = new JButton("apply"); |
236 |
btnApply.setText(PluginServices.getText(this,"aplicar"));
|
|
236 |
btnApply.setText(PluginServices.getText(this,"apply"));
|
|
237 | 237 |
btnApply.setEnabled(false); |
238 | 238 |
btnApply.setActionCommand("APPLY"); |
239 | 239 |
btnApply.addActionListener(m_actionListener); |
... | ... | |
244 | 244 |
|
245 | 245 |
public JButton getBtnCancel() { |
246 | 246 |
if (btnCancel == null) { |
247 |
btnCancel = new JButton("cancelar");
|
|
248 |
btnCancel.setText(PluginServices.getText(this,"cancelar"));
|
|
247 |
btnCancel = new JButton("cancel"); |
|
248 |
btnCancel.setText(PluginServices.getText(this,"cancel")); |
|
249 | 249 |
btnCancel.setActionCommand("CANCEL"); |
250 | 250 |
btnCancel.addActionListener(m_actionListener); |
251 | 251 |
btnCancel.setBounds(137, 9, 90, 25); |
branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/gui/panels/StyleTree.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.2.2.4 2006-02-01 16:25:23 jaume
|
|
46 |
* Revision 1.2.2.5 2006-02-02 10:44:18 jaume
|
|
47 | 47 |
* *** empty log message *** |
48 | 48 |
* |
49 |
* Revision 1.2.2.4 2006/02/01 16:25:23 jaume |
|
50 |
* *** empty log message *** |
|
51 |
* |
|
49 | 52 |
* Revision 1.2.2.3 2006/01/31 16:25:24 jaume |
50 | 53 |
* correcciones de bugs |
51 | 54 |
* |
... | ... | |
204 | 207 |
* @param styleNames, Vector containing the style names. |
205 | 208 |
* The styles order <b>must match</b> with the layer order. |
206 | 209 |
*/ |
207 |
|
|
208 | 210 |
public void setSelections(WMSLayerNode[] selectedLayers, Vector styleNames){ |
209 | 211 |
if (styleNames!=null) { |
210 | 212 |
StyleTreeModel model = (StyleTreeModel) getModel(); |
Also available in: Unified diff