svn-gvsig-desktop / branches / v10 / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / layout / fframes / gui / dialogs / FFrameViewDialog.java @ 20910
History | View | Annotate | Download (20 KB)
1 |
/*
|
---|---|
2 |
* Created on 01-jun-2004
|
3 |
*
|
4 |
*/
|
5 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
6 |
*
|
7 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
8 |
*
|
9 |
* This program is free software; you can redistribute it and/or
|
10 |
* modify it under the terms of the GNU General Public License
|
11 |
* as published by the Free Software Foundation; either version 2
|
12 |
* of the License, or (at your option) any later version.
|
13 |
*
|
14 |
* This program is distributed in the hope that it will be useful,
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
* GNU General Public License for more details.
|
18 |
*
|
19 |
* You should have received a copy of the GNU General Public License
|
20 |
* along with this program; if not, write to the Free Software
|
21 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
22 |
*
|
23 |
* For more information, contact:
|
24 |
*
|
25 |
* Generalitat Valenciana
|
26 |
* Conselleria d'Infraestructures i Transport
|
27 |
* Av. Blasco Ib??ez, 50
|
28 |
* 46010 VALENCIA
|
29 |
* SPAIN
|
30 |
*
|
31 |
* +34 963862235
|
32 |
* gvsig@gva.es
|
33 |
* www.gvsig.gva.es
|
34 |
*
|
35 |
* or
|
36 |
*
|
37 |
* IVER T.I. S.A
|
38 |
* Salamanca 50
|
39 |
* 46005 Valencia
|
40 |
* Spain
|
41 |
*
|
42 |
* +34 963163400
|
43 |
* dac@iver.es
|
44 |
*/
|
45 |
package com.iver.cit.gvsig.project.documents.layout.fframes.gui.dialogs; |
46 |
|
47 |
import java.awt.Dimension; |
48 |
import java.awt.geom.Rectangle2D; |
49 |
|
50 |
import javax.swing.JList; |
51 |
import javax.swing.JPanel; |
52 |
|
53 |
import com.iver.andami.PluginServices; |
54 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
55 |
import com.iver.cit.gvsig.fmap.ViewPort; |
56 |
import com.iver.cit.gvsig.gui.layout.Layout; |
57 |
import com.iver.cit.gvsig.gui.layout.fframes.FFrameGrid; |
58 |
import com.iver.cit.gvsig.gui.layout.fframes.FFrameView; |
59 |
import com.iver.cit.gvsig.project.documents.layout.FLayoutUtilities; |
60 |
import com.iver.cit.gvsig.project.documents.layout.fframes.IFFrame; |
61 |
import com.iver.cit.gvsig.project.documents.layout.fframes.ListViewModel; |
62 |
import com.iver.cit.gvsig.project.documents.layout.fframes.gui.JPRotation; |
63 |
import com.iver.cit.gvsig.project.documents.view.ProjectView; |
64 |
import javax.swing.JButton; |
65 |
import javax.swing.JCheckBox; |
66 |
|
67 |
|
68 |
/**
|
69 |
* Di?logo para a?adir una vista al Layout.
|
70 |
*
|
71 |
* @author Vicente Caballero Navarro
|
72 |
*/
|
73 |
public class FFrameViewDialog extends JPanel implements IFFrameDialog { |
74 |
private javax.swing.JPanel jContentPane = null; |
75 |
private javax.swing.JLabel lVistas = null; |
76 |
private javax.swing.JScrollPane jScrollPane = null; |
77 |
private javax.swing.JList liVistas = null; // @jve:visual-info decl-index=0 visual-constraint="98,-3" |
78 |
private javax.swing.JCheckBox chbEnlaceVivo = null; |
79 |
private javax.swing.JLabel lEscala = null; |
80 |
private javax.swing.JComboBox cbEscala = null; |
81 |
private javax.swing.JLabel lEscalaNumerica = null; |
82 |
private javax.swing.JTextField tEscalaNumerica = null; |
83 |
private javax.swing.JLabel lExtension = null; |
84 |
private javax.swing.JComboBox cbExtension = null; |
85 |
private javax.swing.JLabel lVisualizacion = null; |
86 |
private javax.swing.JComboBox cbVisualizacion = null; |
87 |
private javax.swing.JButton bAceptar = null; |
88 |
private javax.swing.JButton bCancelar = null; |
89 |
private javax.swing.JLabel lCalidad = null; |
90 |
private javax.swing.JComboBox cbCalidad = null; |
91 |
private ProjectView m_projectView = null; |
92 |
private Rectangle2D rect = new Rectangle2D.Double(); |
93 |
private FFrameView fframeview = null; //new FFrameView(); |
94 |
private Layout m_layout = null; |
95 |
private boolean isAcepted = false; |
96 |
private JPRotation rotation = null; |
97 |
private FFrameView newFFrameView=null; |
98 |
private JButton bGrid = null; |
99 |
private IFFrame grid;
|
100 |
private JCheckBox chbShowGrid = null; |
101 |
/**
|
102 |
* This is the default constructor
|
103 |
*
|
104 |
* @param layout Referencia al Layout.
|
105 |
* @param fframe Referencia al fframe vista.
|
106 |
*/
|
107 |
public FFrameViewDialog(Layout layout, FFrameView fframe) {
|
108 |
super();
|
109 |
fframeview = fframe; |
110 |
m_layout = layout; |
111 |
initialize(); |
112 |
} |
113 |
|
114 |
/**
|
115 |
* This method initializes this
|
116 |
*/
|
117 |
private void initialize() { |
118 |
this.setLayout(null); |
119 |
this.add(getJContentPane(), null); |
120 |
this.setSize(478, 269); |
121 |
|
122 |
if (fframeview.getTypeScale() == 0 || fframeview.getTypeScale() == 1) { |
123 |
getTEscalaNumerica().setEnabled(false);
|
124 |
}else{
|
125 |
getTEscalaNumerica().setEnabled(true);
|
126 |
} |
127 |
getPRotation().setRotation(fframeview.getRotation()); |
128 |
} |
129 |
|
130 |
/**
|
131 |
* Inserta el rect?ngulo que ocupar? el fframe vista.
|
132 |
*
|
133 |
* @param r Rect?ngulo.
|
134 |
*/
|
135 |
public void setRectangle(Rectangle2D r) { |
136 |
rect.setRect(r); |
137 |
} |
138 |
|
139 |
/**
|
140 |
* This method initializes jContentPane
|
141 |
*
|
142 |
* @return javax.swing.JPanel
|
143 |
*/
|
144 |
private javax.swing.JPanel getJContentPane() {
|
145 |
if (jContentPane == null) { |
146 |
jContentPane = new javax.swing.JPanel();
|
147 |
jContentPane.setLayout(null);
|
148 |
jContentPane.add(getLVistas(), null);
|
149 |
jContentPane.add(getJScrollPane(), null);
|
150 |
jContentPane.add(getChbEnlaceVivo(), null);
|
151 |
jContentPane.add(getLEscala(), null);
|
152 |
jContentPane.add(getCbEscala(), null);
|
153 |
jContentPane.add(getLEscalaNumerica(), null);
|
154 |
jContentPane.add(getTEscalaNumerica(), null);
|
155 |
jContentPane.add(getLExtension(), null);
|
156 |
jContentPane.add(getCbExtension(), null);
|
157 |
jContentPane.add(getLVisualizacion(), null);
|
158 |
jContentPane.add(getCbVisualizacion(), null);
|
159 |
jContentPane.add(getLCalidad(), null);
|
160 |
jContentPane.add(getCbCalidad(), null);
|
161 |
jContentPane.add(getbAceptar(), null);
|
162 |
jContentPane.add(getBCancelar(), null);
|
163 |
jContentPane.setSize(475, 264); |
164 |
jContentPane.setPreferredSize(new java.awt.Dimension(60, 60)); |
165 |
jContentPane.setLocation(0, 0); |
166 |
jContentPane.add(getPRotation(), null);
|
167 |
jContentPane.add(getBGrid(), null);
|
168 |
jContentPane.add(getChbShowGrid(), null);
|
169 |
} |
170 |
|
171 |
return jContentPane;
|
172 |
} |
173 |
|
174 |
/**
|
175 |
* This method initializes lVistas
|
176 |
*
|
177 |
* @return javax.swing.JLabel
|
178 |
*/
|
179 |
private javax.swing.JLabel getLVistas() {
|
180 |
if (lVistas == null) { |
181 |
lVistas = new javax.swing.JLabel();
|
182 |
lVistas.setSize(85, 19); |
183 |
lVistas.setText(PluginServices.getText(this, "Vista")); |
184 |
lVistas.setLocation(10, 10); |
185 |
} |
186 |
|
187 |
return lVistas;
|
188 |
} |
189 |
|
190 |
/**
|
191 |
* This method initializes jScrollPane
|
192 |
*
|
193 |
* @return javax.swing.JScrollPane
|
194 |
*/
|
195 |
private javax.swing.JScrollPane getJScrollPane() {
|
196 |
if (jScrollPane == null) { |
197 |
jScrollPane = new javax.swing.JScrollPane();
|
198 |
jScrollPane.setViewportView(getLiVistas()); |
199 |
jScrollPane.setBounds(99, 8, 224, 64); |
200 |
jScrollPane.setPreferredSize(new java.awt.Dimension(250, 60)); |
201 |
} |
202 |
|
203 |
return jScrollPane;
|
204 |
} |
205 |
|
206 |
/**
|
207 |
* This method initializes liVistas
|
208 |
*
|
209 |
* @return javax.swing.JList
|
210 |
*/
|
211 |
private javax.swing.JList getLiVistas() {
|
212 |
if (liVistas == null) { |
213 |
ListViewModel listmodel = new ListViewModel();
|
214 |
listmodel.addViews(); |
215 |
liVistas = new javax.swing.JList();
|
216 |
liVistas.setModel(listmodel); |
217 |
for (int i = 0; i < liVistas.getModel().getSize(); i++) { |
218 |
if (fframeview.getMapContext() != null) { |
219 |
|
220 |
ProjectView pvaux= (ProjectView) liVistas.getModel() |
221 |
.getElementAt(i); |
222 |
|
223 |
if (pvaux.getMapContext().equals(fframeview.getMapContext())) {
|
224 |
liVistas.setSelectedIndex(i); |
225 |
m_projectView= (ProjectView) liVistas.getModel() |
226 |
.getElementAt(i); |
227 |
} |
228 |
} |
229 |
} |
230 |
|
231 |
liVistas.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
232 |
private int selectIndex=-1; |
233 |
private Rectangle2D boundBox; |
234 |
public void valueChanged( |
235 |
javax.swing.event.ListSelectionEvent e) { |
236 |
int selectInt = ((JList)e.getSource()).getSelectedIndex(); |
237 |
if (selectInt!=selectIndex){
|
238 |
selectIndex=selectInt; |
239 |
if (selectIndex==-1) |
240 |
return;
|
241 |
m_projectView = (ProjectView) liVistas.getModel() |
242 |
.getElementAt(selectInt); |
243 |
|
244 |
getCbEscala().setSelectedItem(PluginServices.getText(this, "automatico")); |
245 |
boundBox=FLayoutUtilities.toSheetRect(rect, m_layout.getAT()); |
246 |
// fframeview.setBoundBox(FLayoutUtilities.toSheetRect(
|
247 |
// rect, m_layout.getAT()));
|
248 |
|
249 |
// fframeview.setView(m_projectView);
|
250 |
//
|
251 |
// fframeview.setMapUnits(m_projectView.getMapContext()
|
252 |
// .getViewPort()
|
253 |
// .getMapUnits());
|
254 |
ViewPort vp=m_projectView.getMapContext().getViewPort().cloneViewPort(); |
255 |
vp.setImageSize(new Dimension((int)rect.getWidth(),(int)rect.getHeight())); |
256 |
getTEscalaNumerica().setText(String.valueOf(FLayoutUtilities.getScaleView(vp,
|
257 |
boundBox.getWidth(), FLayoutUtilities.fromSheetDistance(boundBox.getWidth(),m_layout.getAT())))); |
258 |
// getTEscalaNumerica().setText(String.valueOf(
|
259 |
// fframeview.getScale()));
|
260 |
} |
261 |
} |
262 |
}); |
263 |
} |
264 |
|
265 |
return liVistas;
|
266 |
} |
267 |
|
268 |
/**
|
269 |
* This method initializes chbEnlaceVivo
|
270 |
*
|
271 |
* @return javax.swing.JCheckBox
|
272 |
*/
|
273 |
private javax.swing.JCheckBox getChbEnlaceVivo() {
|
274 |
if (chbEnlaceVivo == null) { |
275 |
chbEnlaceVivo = new javax.swing.JCheckBox();
|
276 |
chbEnlaceVivo.setSize(134, 24); |
277 |
chbEnlaceVivo.setText(PluginServices.getText(this, "enlace_vivo")); |
278 |
chbEnlaceVivo.setSelected(fframeview.getLinked()); |
279 |
chbEnlaceVivo.setLocation(10, 75); |
280 |
chbEnlaceVivo.setEnabled(true);
|
281 |
chbEnlaceVivo.addActionListener(new java.awt.event.ActionListener() {
|
282 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
283 |
System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() |
284 |
} |
285 |
}); |
286 |
} |
287 |
|
288 |
return chbEnlaceVivo;
|
289 |
} |
290 |
|
291 |
/**
|
292 |
* This method initializes lEscala
|
293 |
*
|
294 |
* @return javax.swing.JLabel
|
295 |
*/
|
296 |
private javax.swing.JLabel getLEscala() {
|
297 |
if (lEscala == null) { |
298 |
lEscala = new javax.swing.JLabel();
|
299 |
lEscala.setSize(86, 16); |
300 |
lEscala.setText(PluginServices.getText(this, "escala")); |
301 |
lEscala.setLocation(10, 105); |
302 |
} |
303 |
|
304 |
return lEscala;
|
305 |
} |
306 |
|
307 |
/**
|
308 |
* This method initializes cbEscala
|
309 |
*
|
310 |
* @return javax.swing.JComboBox
|
311 |
*/
|
312 |
private javax.swing.JComboBox getCbEscala() {
|
313 |
if (cbEscala == null) { |
314 |
//String[] s={"Autom?tico","Conservar escala de visualizaci?n","Escala especificada por el usuario"};
|
315 |
cbEscala = new javax.swing.JComboBox();
|
316 |
cbEscala.setSize(220, 20); |
317 |
cbEscala.addItem(PluginServices.getText(this, "automatico")); |
318 |
cbEscala.addItem(PluginServices.getText(this,
|
319 |
"conservar_escala_visualizacion"));
|
320 |
cbEscala.addItem(PluginServices.getText(this, "escala_usuario")); |
321 |
cbEscala.setSelectedIndex(fframeview.getTypeScale()); |
322 |
|
323 |
if (fframeview.getTypeScale() == 0 || fframeview.getTypeScale() == 1) { |
324 |
getTEscalaNumerica().setEnabled(false);
|
325 |
}else{
|
326 |
getTEscalaNumerica().setEnabled(true);
|
327 |
} |
328 |
|
329 |
cbEscala.setPreferredSize(new java.awt.Dimension(200, 20)); |
330 |
cbEscala.setLocation(100, 105); |
331 |
cbEscala.addActionListener(new java.awt.event.ActionListener() {
|
332 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
333 |
if (cbEscala.getSelectedIndex() == 2) { |
334 |
getTEscalaNumerica().setEnabled(true);
|
335 |
} else {
|
336 |
getTEscalaNumerica().setEnabled(false);
|
337 |
} |
338 |
} |
339 |
}); |
340 |
} |
341 |
|
342 |
return cbEscala;
|
343 |
} |
344 |
|
345 |
/**
|
346 |
* This method initializes lEscalaNumerica
|
347 |
*
|
348 |
* @return javax.swing.JLabel
|
349 |
*/
|
350 |
private javax.swing.JLabel getLEscalaNumerica() {
|
351 |
if (lEscalaNumerica == null) { |
352 |
lEscalaNumerica = new javax.swing.JLabel();
|
353 |
lEscalaNumerica.setSize(86, 16); |
354 |
lEscalaNumerica.setText("1:");
|
355 |
lEscalaNumerica.setLocation(10, 130); |
356 |
} |
357 |
|
358 |
return lEscalaNumerica;
|
359 |
} |
360 |
|
361 |
/**
|
362 |
* This method initializes tEscalaNumerica
|
363 |
*
|
364 |
* @return javax.swing.JTextField
|
365 |
*/
|
366 |
private javax.swing.JTextField getTEscalaNumerica() {
|
367 |
if (tEscalaNumerica == null) { |
368 |
tEscalaNumerica = new javax.swing.JTextField();
|
369 |
tEscalaNumerica.setSize(220, 20); |
370 |
tEscalaNumerica.setPreferredSize(new java.awt.Dimension(200, 20)); |
371 |
|
372 |
if (m_projectView != null) { |
373 |
tEscalaNumerica.setText(String.valueOf(fframeview.getScale()));
|
374 |
} |
375 |
tEscalaNumerica.setLocation(100, 130); |
376 |
tEscalaNumerica.setEnabled(false);
|
377 |
} |
378 |
|
379 |
return tEscalaNumerica;
|
380 |
} |
381 |
|
382 |
/**
|
383 |
* This method initializes lExtension
|
384 |
*
|
385 |
* @return javax.swing.JLabel
|
386 |
*/
|
387 |
private javax.swing.JLabel getLExtension() {
|
388 |
if (lExtension == null) { |
389 |
lExtension = new javax.swing.JLabel();
|
390 |
lExtension.setSize(86, 16); |
391 |
lExtension.setText(PluginServices.getText(this, "extension")); |
392 |
lExtension.setLocation(10, 155); |
393 |
lExtension.setVisible(false);
|
394 |
} |
395 |
|
396 |
return lExtension;
|
397 |
} |
398 |
|
399 |
/**
|
400 |
* This method initializes cbExtension
|
401 |
*
|
402 |
* @return javax.swing.JComboBox
|
403 |
*/
|
404 |
private javax.swing.JComboBox getCbExtension() {
|
405 |
if (cbExtension == null) { |
406 |
//String[] s={"Rellenar marco de la vista","Recorte a vista"};
|
407 |
cbExtension = new javax.swing.JComboBox();
|
408 |
cbExtension.setSize(220, 20); |
409 |
cbExtension.addItem(PluginServices.getText(this,
|
410 |
"rellenar_marco_vista"));
|
411 |
cbExtension.addItem(PluginServices.getText(this, "recorte_vista")); |
412 |
|
413 |
cbExtension.setPreferredSize(new java.awt.Dimension(200, 20)); |
414 |
cbExtension.setLocation(100, 155); |
415 |
cbExtension.setEnabled(false);
|
416 |
cbExtension.setVisible(false);
|
417 |
} |
418 |
|
419 |
return cbExtension;
|
420 |
} |
421 |
|
422 |
/**
|
423 |
* This method initializes jLabel4
|
424 |
*
|
425 |
* @return javax.swing.JLabel
|
426 |
*/
|
427 |
private javax.swing.JLabel getLVisualizacion() {
|
428 |
if (lVisualizacion == null) { |
429 |
lVisualizacion = new javax.swing.JLabel();
|
430 |
lVisualizacion.setSize(86, 16); |
431 |
lVisualizacion.setText(PluginServices.getText(this, "visualizacion")); |
432 |
lVisualizacion.setLocation(10, 180); |
433 |
lVisualizacion.setVisible(false);
|
434 |
} |
435 |
|
436 |
return lVisualizacion;
|
437 |
} |
438 |
|
439 |
/**
|
440 |
* This method initializes cbVisualizacion
|
441 |
*
|
442 |
* @return javax.swing.JComboBox
|
443 |
*/
|
444 |
private javax.swing.JComboBox getCbVisualizacion() {
|
445 |
if (cbVisualizacion == null) { |
446 |
//String[] s={"Cuando activo","Siempre"};
|
447 |
cbVisualizacion = new javax.swing.JComboBox();
|
448 |
cbVisualizacion.setSize(220, 20); |
449 |
cbVisualizacion.addItem(PluginServices.getText(this, "cuando_activo")); |
450 |
cbVisualizacion.addItem(PluginServices.getText(this, "siempre")); |
451 |
cbVisualizacion.setSelectedIndex(fframeview.getViewing()); |
452 |
cbVisualizacion.setPreferredSize(new java.awt.Dimension(200, 20)); |
453 |
cbVisualizacion.setLocation(100, 180); |
454 |
cbVisualizacion.setEnabled(false);
|
455 |
cbVisualizacion.setVisible(false);
|
456 |
} |
457 |
|
458 |
return cbVisualizacion;
|
459 |
} |
460 |
|
461 |
/**
|
462 |
* This method initializes jButton
|
463 |
*
|
464 |
* @return javax.swing.JButton
|
465 |
*/
|
466 |
private javax.swing.JButton getbAceptar() {
|
467 |
if (bAceptar == null) { |
468 |
bAceptar = new javax.swing.JButton();
|
469 |
bAceptar.setSize(85, 26); |
470 |
bAceptar.setText(PluginServices.getText(this, "Aceptar")); |
471 |
bAceptar.setBounds(new java.awt.Rectangle(109,223,85,26)); |
472 |
// bAceptar.setLocation(109, 179);
|
473 |
bAceptar.addActionListener(new java.awt.event.ActionListener() {
|
474 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
475 |
newFFrameView=(FFrameView)fframeview.cloneFFrame(m_layout); |
476 |
newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect( |
477 |
rect, m_layout.getAT())); |
478 |
newFFrameView.setRotation(getPRotation().getRotation()); |
479 |
if (m_projectView != null) { |
480 |
newFFrameView.setLinked(getChbEnlaceVivo().isSelected()); |
481 |
newFFrameView.setName(m_projectView.getName()); |
482 |
|
483 |
newFFrameView.setTypeScale(getCbEscala() |
484 |
.getSelectedIndex()); |
485 |
newFFrameView.setScale(Double.parseDouble(
|
486 |
getTEscalaNumerica().getText())); |
487 |
newFFrameView.setView(m_projectView); |
488 |
|
489 |
//fframeview.setFMap(m_projectView.getMapContext());
|
490 |
newFFrameView.setExtension(getCbExtension() |
491 |
.getSelectedIndex()); |
492 |
newFFrameView.setViewing(getCbVisualizacion() |
493 |
.getSelectedIndex()); |
494 |
newFFrameView.setQuality(getCbCalidad() |
495 |
.getSelectedIndex()); |
496 |
if (grid!=null){ |
497 |
((FFrameGrid)grid).setLayout(m_layout); |
498 |
((FFrameGrid)grid).setFFrameDependence(newFFrameView); |
499 |
// ((FFrameGrid)grid).setBoundBox();
|
500 |
newFFrameView.setGrid(grid); |
501 |
} |
502 |
newFFrameView.showGrid(getChbShowGrid().isSelected()); |
503 |
newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect( |
504 |
rect, m_layout.getAT())); |
505 |
|
506 |
/* for (int i=0;i<m_layout.getFFrames().size();i++){
|
507 |
IFFrame fframe=(IFFrame)m_layout.getFFrames().get(i);
|
508 |
if (fframe instanceof FFrameScaleBar){
|
509 |
if (((FFrameScaleBar)fframe).getFFrameView()==fframeview){
|
510 |
if (getJComboBox().getSelectedIndex()!=0){
|
511 |
((FFrameScaleBar)fframe).setIsFixed(true);
|
512 |
((FFrameScaleBar)fframe).setScaleView(Long.parseLong(getJTextField().getText()));
|
513 |
}else{
|
514 |
((FFrameScaleBar)fframe).setIsFixed(false);
|
515 |
}
|
516 |
|
517 |
}
|
518 |
}
|
519 |
|
520 |
|
521 |
}
|
522 |
*/
|
523 |
} |
524 |
|
525 |
isAcepted = true;
|
526 |
|
527 |
//}else{
|
528 |
// isAcepted=false;
|
529 |
//}
|
530 |
PluginServices.getMDIManager().closeWindow(FFrameViewDialog.this); |
531 |
} |
532 |
}); |
533 |
} |
534 |
|
535 |
return bAceptar;
|
536 |
} |
537 |
|
538 |
/**
|
539 |
* This method initializes bCancelar
|
540 |
*
|
541 |
* @return javax.swing.JButton
|
542 |
*/
|
543 |
private javax.swing.JButton getBCancelar() {
|
544 |
if (bCancelar == null) { |
545 |
bCancelar = new javax.swing.JButton();
|
546 |
bCancelar.setSize(85, 26); |
547 |
bCancelar.setText(PluginServices.getText(this, "Cancelar")); |
548 |
bCancelar.setBounds(new java.awt.Rectangle(207,223,85,26)); |
549 |
// bCancelar.setLocation(207, 179);
|
550 |
bCancelar.addActionListener(new java.awt.event.ActionListener() {
|
551 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
552 |
newFFrameView=null;
|
553 |
PluginServices.getMDIManager().closeWindow(FFrameViewDialog.this); |
554 |
} |
555 |
}); |
556 |
} |
557 |
|
558 |
return bCancelar;
|
559 |
} |
560 |
|
561 |
/**
|
562 |
* This method initializes lCalidad
|
563 |
*
|
564 |
* @return javax.swing.JLabel
|
565 |
*/
|
566 |
private javax.swing.JLabel getLCalidad() {
|
567 |
if (lCalidad == null) { |
568 |
lCalidad = new javax.swing.JLabel();
|
569 |
lCalidad.setSize(86, 16); |
570 |
lCalidad.setText(PluginServices.getText(this, "calidad")); |
571 |
lCalidad.setLocation(10, 155); |
572 |
} |
573 |
|
574 |
return lCalidad;
|
575 |
} |
576 |
|
577 |
/**
|
578 |
* This method initializes cbCalidad
|
579 |
*
|
580 |
* @return javax.swing.JComboBox
|
581 |
*/
|
582 |
private javax.swing.JComboBox getCbCalidad() {
|
583 |
if (cbCalidad == null) { |
584 |
//String[] s={"Presentaci?n","Borrador"};
|
585 |
cbCalidad = new javax.swing.JComboBox();
|
586 |
cbCalidad.setSize(220, 20); |
587 |
cbCalidad.addItem(PluginServices.getText(this, "presentacion")); |
588 |
cbCalidad.addItem(PluginServices.getText(this, "borrador")); |
589 |
cbCalidad.setSelectedIndex(fframeview.getQuality()); |
590 |
cbCalidad.setPreferredSize(new java.awt.Dimension(200, 20)); |
591 |
cbCalidad.setLocation(100, 155); |
592 |
} |
593 |
|
594 |
return cbCalidad;
|
595 |
} |
596 |
|
597 |
/* (non-Javadoc)
|
598 |
* @see com.iver.mdiApp.ui.MDIManager.View#getViewInfo()
|
599 |
*/
|
600 |
public WindowInfo getWindowInfo() {
|
601 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
|
602 |
|
603 |
//vi.setResizable(false);
|
604 |
m_viewinfo.setTitle(PluginServices.getText(this,
|
605 |
"propiedades_marco_vista"));
|
606 |
|
607 |
return m_viewinfo;
|
608 |
} |
609 |
|
610 |
/**
|
611 |
* @see com.iver.cit.gvsig.project.documents.layout.fframes.gui.dialogs.IFFrameDialog#getIsAcepted()
|
612 |
*/
|
613 |
public boolean getIsAcepted() { |
614 |
return isAcepted;
|
615 |
} |
616 |
|
617 |
/**
|
618 |
* @see com.iver.mdiApp.ui.MDIManager.IWindow#windowActivated()
|
619 |
*/
|
620 |
public void viewActivated() { |
621 |
} |
622 |
|
623 |
/**
|
624 |
* This method initializes rotation
|
625 |
*
|
626 |
* @return javax.swing.JPanel
|
627 |
*/
|
628 |
private JPRotation getPRotation() {
|
629 |
if (rotation == null) { |
630 |
rotation = new JPRotation();
|
631 |
rotation.setBounds(330, 90, 120, 120); |
632 |
} |
633 |
return rotation;
|
634 |
} |
635 |
|
636 |
public IFFrame getFFrame() {
|
637 |
return newFFrameView;
|
638 |
} |
639 |
|
640 |
/**
|
641 |
* This method initializes bGrid
|
642 |
*
|
643 |
* @return javax.swing.JButton
|
644 |
*/
|
645 |
private JButton getBGrid() { |
646 |
if (bGrid == null) { |
647 |
bGrid = new JButton(); |
648 |
bGrid.setBounds(new java.awt.Rectangle(207,186,85,26)); |
649 |
bGrid.setText("grid");
|
650 |
bGrid.addActionListener(new java.awt.event.ActionListener() {
|
651 |
|
652 |
|
653 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
654 |
FFrameGrid fframe =new FFrameGrid();
|
655 |
fframe.setLayout(m_layout); |
656 |
fframe.setFFrameDependence(fframeview); |
657 |
|
658 |
FFrameGridDialog fframedialog = new FFrameGridDialog(m_layout, fframe,fframeview);
|
659 |
// fframedialog.setFFrameView(fframeview);
|
660 |
if (fframedialog != null) { |
661 |
PluginServices.getMDIManager().addWindow(fframedialog); |
662 |
} |
663 |
IFFrame newFrame= fframedialog.getFFrame(); |
664 |
if (newFrame!=null) { |
665 |
grid=newFrame; |
666 |
} |
667 |
} |
668 |
}); |
669 |
} |
670 |
return bGrid;
|
671 |
} |
672 |
|
673 |
/**
|
674 |
* This method initializes chbShowGrid
|
675 |
*
|
676 |
* @return javax.swing.JCheckBox
|
677 |
*/
|
678 |
private JCheckBox getChbShowGrid() { |
679 |
if (chbShowGrid == null) { |
680 |
chbShowGrid = new JCheckBox(); |
681 |
chbShowGrid.setBounds(new java.awt.Rectangle(13,191,181,21)); |
682 |
chbShowGrid.setSelected(fframeview.isShowGrid()); |
683 |
chbShowGrid.setText(PluginServices.getText(this,"show_grid")); |
684 |
} |
685 |
return chbShowGrid;
|
686 |
} |
687 |
} // @jve:decl-index=0:visual-constraint="10,10"
|