Revision 35996
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/gui/dialogs/FFrameOverViewDialog.java | ||
---|---|---|
42 | 42 |
|
43 | 43 |
import java.awt.geom.Rectangle2D; |
44 | 44 |
|
45 |
import javax.swing.JCheckBox; |
|
45 | 46 |
import javax.swing.JList; |
46 | 47 |
import javax.swing.JPanel; |
47 | 48 |
|
... | ... | |
58 | 59 |
|
59 | 60 |
|
60 | 61 |
/** |
61 |
* Di?logo para a?adir una localizador al Layout.
|
|
62 |
* Dialog to add a new locator map to the layout
|
|
62 | 63 |
* |
63 | 64 |
* @author Vicente Caballero Navarro |
64 | 65 |
*/ |
... | ... | |
71 | 72 |
private javax.swing.JButton bCancelar = null; |
72 | 73 |
private javax.swing.JLabel lCalidad = null; |
73 | 74 |
private javax.swing.JComboBox cbCalidad = null; |
74 |
private Rectangle2D rect = new Rectangle2D.Double(); |
|
75 |
private FFrameOverView fframeoverview = null; //new FFrameView(); |
|
75 |
private JCheckBox showCrossCHB; |
|
76 |
private Rectangle2D rect = new Rectangle2D.Double(); |
|
77 |
private FFrameOverView fframeoverview = null; |
|
76 | 78 |
private Layout m_layout = null; |
77 | 79 |
private boolean isAcepted = false; |
78 | 80 |
private JPRotation rotation = null; |
... | ... | |
84 | 86 |
/** |
85 | 87 |
* This is the default constructor |
86 | 88 |
* |
87 |
* @param layout Referencia al Layout.
|
|
88 |
* @param fframe Referencia al fframe vista.
|
|
89 |
* @param layout Reference to the layout
|
|
90 |
* @param fframe Reference to the view fframe
|
|
89 | 91 |
*/ |
90 | 92 |
public FFrameOverViewDialog(Layout layout, FFrameOverView fframe) { |
91 | 93 |
super(); |
... | ... | |
107 | 109 |
} |
108 | 110 |
|
109 | 111 |
/** |
110 |
* Inserta el rect?ngulo que ocupar? el fframe vista.
|
|
112 |
* Insert the rectangle which the view fframe will take up
|
|
111 | 113 |
* |
112 |
* @param r Rect?ngulo.
|
|
114 |
* @param r Rectangle
|
|
113 | 115 |
*/ |
114 | 116 |
public void setRectangle(Rectangle2D r) { |
115 | 117 |
rect.setRect(r); |
... | ... | |
128 | 130 |
jContentPane.add(getJScrollPane(), null); |
129 | 131 |
jContentPane.add(getLCalidad(), null); |
130 | 132 |
jContentPane.add(getCbCalidad(), null); |
133 |
jContentPane.add(getShowCrossCHB(), null); |
|
131 | 134 |
jContentPane.add(getbAceptar(), null); |
132 | 135 |
jContentPane.add(getBCancelar(), null); |
133 |
jContentPane.setSize(462, 184);
|
|
136 |
jContentPane.setSize(462, 200);
|
|
134 | 137 |
jContentPane.setPreferredSize(new java.awt.Dimension(60, 60)); |
135 | 138 |
jContentPane.setLocation(0, 0); |
136 | 139 |
jContentPane.add(getPRotation(), null); |
... | ... | |
139 | 142 |
return jContentPane; |
140 | 143 |
} |
141 | 144 |
|
145 |
private JCheckBox getShowCrossCHB() { |
|
146 |
if (showCrossCHB == null) { |
|
147 |
showCrossCHB = new JCheckBox(PluginServices.getText(this, "show_cross")); |
|
148 |
showCrossCHB.setSelected(fframeoverview.getShowCross()); |
|
149 |
showCrossCHB.setSize(304, 16); |
|
150 |
showCrossCHB.setLocation(14, 125); |
|
151 |
} |
|
152 |
return showCrossCHB; |
|
153 |
} |
|
154 |
|
|
142 | 155 |
/** |
143 | 156 |
* This method initializes lVistas |
144 | 157 |
* |
... | ... | |
301 | 314 |
bAceptar = new javax.swing.JButton(); |
302 | 315 |
bAceptar.setSize(85, 26); |
303 | 316 |
bAceptar.setText(PluginServices.getText(this, "Aceptar")); |
304 |
bAceptar.setLocation(59, 136);
|
|
317 |
bAceptar.setLocation(59, 160);
|
|
305 | 318 |
bAceptar.addActionListener(new java.awt.event.ActionListener() { |
306 | 319 |
|
307 | 320 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
... | ... | |
309 | 322 |
newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect( |
310 | 323 |
rect, m_layout.getLayoutControl().getAT())); |
311 | 324 |
newFFrameView.setRotation(getPRotation().getRotation()); |
325 |
newFFrameView.setShowCross(showCrossCHB.isSelected()); |
|
312 | 326 |
if (fframeDependence!=null) { |
313 | 327 |
newFFrameView.setName(fframeDependence.getView().getName()); |
314 | 328 |
|
... | ... | |
364 | 378 |
bCancelar = new javax.swing.JButton(); |
365 | 379 |
bCancelar.setSize(85, 26); |
366 | 380 |
bCancelar.setText(PluginServices.getText(this, "Cancelar")); |
367 |
bCancelar.setLocation(199, 136);
|
|
381 |
bCancelar.setLocation(199, 160);
|
|
368 | 382 |
bCancelar.addActionListener(new java.awt.event.ActionListener() { |
369 | 383 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
370 | 384 |
newFFrameView=null; |
... | ... | |
386 | 400 |
lCalidad = new javax.swing.JLabel(); |
387 | 401 |
lCalidad.setSize(86, 16); |
388 | 402 |
lCalidad.setText(PluginServices.getText(this, "calidad")); |
389 |
lCalidad.setLocation(14, 112);
|
|
403 |
lCalidad.setLocation(14, 90);
|
|
390 | 404 |
} |
391 | 405 |
|
392 | 406 |
return lCalidad; |
... | ... | |
399 | 413 |
*/ |
400 | 414 |
private javax.swing.JComboBox getCbCalidad() { |
401 | 415 |
if (cbCalidad == null) { |
402 |
//String[] s={"Presentaci?n","Borrador"}; |
|
403 | 416 |
cbCalidad = new javax.swing.JComboBox(); |
404 | 417 |
cbCalidad.setSize(220, 20); |
405 | 418 |
cbCalidad.addItem(PluginServices.getText(this, "presentacion")); |
406 | 419 |
cbCalidad.addItem(PluginServices.getText(this, "borrador")); |
407 | 420 |
cbCalidad.setSelectedIndex(fframeoverview.getQuality()); |
408 | 421 |
cbCalidad.setPreferredSize(new java.awt.Dimension(200, 20)); |
409 |
cbCalidad.setLocation(104, 112);
|
|
422 |
cbCalidad.setLocation(104, 90);
|
|
410 | 423 |
} |
411 | 424 |
|
412 | 425 |
return cbCalidad; |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/fframes/FFrameOverView.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
|
27 | 27 |
/** |
28 |
* FFrame para introducir el localizador de una vista en el Layout.
|
|
28 |
* FFrame to draw the locator map of a view in the Layout
|
|
29 | 29 |
* |
30 | 30 |
* @author Vicente Caballero Navarro |
31 | 31 |
*/ |
... | ... | |
34 | 34 |
private Rectangle2D extent; |
35 | 35 |
private FFrameView fframeview; |
36 | 36 |
private int dependenceIndex = -1; |
37 |
/** |
|
38 |
* DOCUMENT ME! |
|
39 |
* |
|
40 |
* @param g DOCUMENT ME! |
|
41 |
* @param at DOCUMENT ME! |
|
42 |
* @param rv DOCUMENT ME! |
|
43 |
* @param imgBase DOCUMENT ME! |
|
44 |
*/ |
|
37 |
private boolean showCross = false; |
|
38 |
|
|
39 |
public void setShowCross (boolean showCross) { |
|
40 |
this.showCross = showCross; |
|
41 |
} |
|
42 |
|
|
43 |
public boolean getShowCross() { |
|
44 |
return showCross; |
|
45 |
} |
|
46 |
|
|
47 |
|
|
45 | 48 |
public void draw(Graphics2D g, AffineTransform at, Rectangle2D rv, |
46 | 49 |
BufferedImage imgBase) { |
47 | 50 |
if (getMapContext()!=null) |
... | ... | |
77 | 80 |
(int) r.getHeight()); |
78 | 81 |
g.setColor(Color.red); |
79 | 82 |
g.draw(extentPixels); |
80 |
// System.err.println("extentPixels = |
|
81 |
// "+extentPixels.getX()+","+extentPixels.getY()+", |
|
82 |
// "+extentPixels.getWidth()+","+extentPixels.getHeight()); |
|
83 |
|
|
83 | 84 |
g.setColor(new Color(100, 100, 100, 100)); |
84 | 85 |
g.fill(extentPixels); |
85 |
// dibujamos las l?neas vertical y horizontal |
|
86 |
double pRightUp = (int) (r.getWidth() + r.getX()); |
|
87 | 86 |
|
88 |
Line2D.Double linVert = new Line2D.Double( |
|
89 |
extentPixels.getCenterX(), r.getY(), extentPixels |
|
90 |
.getCenterX(), r.getMaxY()); |
|
91 |
Line2D.Double linHoriz = new Line2D.Double(r.getX(), extentPixels |
|
92 |
.getCenterY(), pRightUp, extentPixels.getCenterY()); |
|
87 |
// Draw the cross if the user active this option |
|
88 |
if (showCross) { |
|
89 |
double pRightUp = (int) (r.getWidth() + r.getX()); |
|
90 |
Line2D.Double linVert = new Line2D.Double( extentPixels.getCenterX(), r.getY(), extentPixels.getCenterX(), r.getMaxY()); |
|
91 |
Line2D.Double linHoriz = new Line2D.Double(r.getX(), extentPixels.getCenterY(), pRightUp, extentPixels.getCenterY()); |
|
92 |
g.setColor(Color.darkGray); |
|
93 |
g.draw(linVert); |
|
94 |
g.draw(linHoriz); |
|
95 |
} |
|
93 | 96 |
|
94 |
g.setColor(Color.darkGray); |
|
95 |
g.draw(linVert); |
|
96 |
g.draw(linHoriz); |
|
97 |
|
|
98 | 97 |
g.setClip((int) clip.getX(), (int) clip.getY(), (int) clip |
99 | 98 |
.getWidth(), (int) clip.getHeight()); |
100 | 99 |
extent = null; |
101 |
// System.err.println("Dibujando FFrameOverView ..."); |
|
102 | 100 |
} |
103 | 101 |
|
104 | 102 |
} |
105 |
/** |
|
106 |
* DOCUMENT ME! |
|
107 |
* |
|
108 |
* @param g |
|
109 |
* DOCUMENT ME! |
|
110 |
* @param at |
|
111 |
* DOCUMENT ME! |
|
112 |
* @param rv |
|
113 |
* DOCUMENT ME! |
|
114 |
* @param imgBase |
|
115 |
* DOCUMENT ME! |
|
116 |
* |
|
117 |
* @throws ReadDriverException |
|
118 |
*/ |
|
103 |
|
|
119 | 104 |
public void print(Graphics2D g, AffineTransform at) |
120 | 105 |
throws ReadDriverException { |
121 | 106 |
draw(g, at, null, null); |
122 | 107 |
} |
123 | 108 |
|
124 | 109 |
/** |
125 |
* Inserta el ProjectView de donde obtener las propiedades de la vista a |
|
126 |
* mostrar. |
|
110 |
* Set the ProjectView from where it gets the properties of the view to show |
|
127 | 111 |
* |
128 |
* @param v Modelo de la vista.
|
|
112 |
* @param v Model of the view
|
|
129 | 113 |
*/ |
130 | 114 |
public void setView(ProjectView v) { |
131 | 115 |
view = v; |
... | ... | |
166 | 150 |
v.getMapContext().getViewPort().addViewPortListener(this); |
167 | 151 |
fframeview.getView().getMapOverViewContext().addLayerListener(this); |
168 | 152 |
} catch (XMLException e1) { |
169 |
NotificationManager.addError("Cuando se a?ade una vista al Layout", |
|
170 |
e1); |
|
153 |
NotificationManager.addError("when_a_view_add_to_layout", e1); |
|
171 | 154 |
} |
172 | 155 |
} |
173 | 156 |
} |
... | ... | |
202 | 185 |
frame.assoc_map=this.assoc_map; |
203 | 186 |
frame.extent=this.extent; |
204 | 187 |
frame.dependenceIndex=dependenceIndex; |
188 |
frame.showCross = this.showCross; |
|
205 | 189 |
frame.fframeview=fframeview; |
206 | 190 |
frame.initDependence(layout.getLayoutContext().getAllFFrames()); |
207 | 191 |
frame.setFrameLayoutFactory(factory); |
... | ... | |
245 | 229 |
getView().getMapContext().getViewPort().addViewPortListener(this); |
246 | 230 |
fframeview.getView().getMapOverViewContext().addLayerListener(this); |
247 | 231 |
} catch (XMLException e1) { |
248 |
NotificationManager.addError("Cuando se a?ade una vista al Layout", |
|
249 |
e1); |
|
232 |
NotificationManager.addError("when_a_view_add_to_layout", e1); |
|
250 | 233 |
} |
251 | 234 |
} |
252 | 235 |
} |
... | ... | |
274 | 257 |
return xml; |
275 | 258 |
} |
276 | 259 |
|
277 |
// public void setXMLEntity(XMLEntity xml) { |
|
278 |
// super.setXMLEntity(xml); |
|
279 |
// if (xml.contains("index")) { |
|
280 |
// dependenceIndex = xml.getIntProperty("index"); |
|
281 |
// } |
|
282 |
// } |
|
283 | 260 |
|
284 | 261 |
public void setXMLEntity(XMLEntity xml) { |
285 | 262 |
if (xml.getIntProperty("m_Selected") != 0) { |
... | ... | |
317 | 294 |
|
318 | 295 |
view = (ProjectView) views.get(indice); |
319 | 296 |
} catch (IndexOutOfBoundsException e) { |
320 |
NotificationManager.addError("No se ha encontrado la vista de indice "+ indice, |
|
321 |
e); |
|
297 |
NotificationManager.addError("index_not_found" + indice, e); |
|
322 | 298 |
} |
323 | 299 |
} |
324 | 300 |
} |
... | ... | |
359 | 335 |
getView().getMapContext().getViewPort().addViewPortListener(this); |
360 | 336 |
fframeview.getView().getMapOverViewContext().addLayerListener(this); |
361 | 337 |
} catch (XMLException e1) { |
362 |
NotificationManager.addError("Cuando se a?ade una vista al Layout", |
|
363 |
e1); |
|
338 |
NotificationManager.addError("when_a_view_add_to_layout", e1); |
|
364 | 339 |
} |
365 | 340 |
} |
366 | 341 |
} |
trunk/applications/appgvSIG/config/text_en.properties | ||
---|---|---|
5490 | 5490 |
zoom_route=Zoom to |
5491 | 5491 |
zooms=Zooms |
5492 | 5492 |
zooms_control=Zoom control |
5493 |
save_absolute_path=Save absolute path |
|
5493 |
save_absolute_path=Save absolute path |
|
5494 |
show_cross=Show cross |
|
5495 |
when_a_view_add_to_layout=When a view is added to he layout |
|
5496 |
index_not_found=Index's view has not been found |
trunk/applications/appgvSIG/config/text_gl.properties | ||
---|---|---|
5489 | 5489 |
zoom_route= |
5490 | 5490 |
zooms= |
5491 | 5491 |
zooms_control=Control de zoom |
5492 |
show_cross=Mostrar cruz |
|
5493 |
when_a_view_add_to_layout=Cando unha vista se engade ao layout |
|
5494 |
index_not_found=Non se encontrou a vista do \u00edndice |
trunk/applications/appgvSIG/config/text.properties | ||
---|---|---|
5491 | 5491 |
zooms=Zooms |
5492 | 5492 |
zooms_control=Control de zoom |
5493 | 5493 |
save_absolute_path=Guardar rutas absolutas |
5494 |
show_cross=Mostrar cruz |
|
5495 |
when_a_view_add_to_layout=Cuando se aƱade una vista al Layout |
|
5496 |
index_not_found=No se ha encontrado la vista de \u00edndice |
Also available in: Unified diff