svn-document-layout / trunk / org.gvsig.app.document.layout2.app / org.gvsig.app.document.layout2.app.mainplugin / src / main / java / org / gvsig / app / project / documents / layout / fframes / gui / dialogs / FFrameViewDialog.java @ 228
History | View | Annotate | Download (18 KB)
1 | 5 | jldominguez | /* gvSIG. Geographic Information System of the Valencian Government
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
4 | * of the Valencian Government (CIT)
|
||
5 | *
|
||
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 2
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | */
|
||
22 | package org.gvsig.app.project.documents.layout.fframes.gui.dialogs; |
||
23 | |||
24 | import java.awt.Dimension; |
||
25 | 218 | cmartinez | import java.awt.GridBagConstraints; |
26 | import java.awt.GridBagLayout; |
||
27 | import java.awt.Insets; |
||
28 | 219 | cmartinez | import java.awt.event.ActionEvent; |
29 | import java.awt.event.ActionListener; |
||
30 | 5 | jldominguez | import java.awt.geom.Rectangle2D; |
31 | |||
32 | import javax.swing.JButton; |
||
33 | import javax.swing.JCheckBox; |
||
34 | import javax.swing.JList; |
||
35 | 93 | jldominguez | import javax.swing.JOptionPane; |
36 | 218 | cmartinez | import javax.swing.JPanel; |
37 | 5 | jldominguez | |
38 | import org.gvsig.andami.messages.NotificationManager; |
||
39 | import org.gvsig.andami.ui.mdiManager.WindowInfo; |
||
40 | 93 | jldominguez | import org.gvsig.app.ApplicationLocator; |
41 | 5 | jldominguez | import org.gvsig.app.project.ProjectManager; |
42 | import org.gvsig.app.project.documents.layout.FLayoutUtilities; |
||
43 | import org.gvsig.app.project.documents.layout.LayoutManager; |
||
44 | import org.gvsig.app.project.documents.layout.fframes.FFrameGrid; |
||
45 | import org.gvsig.app.project.documents.layout.fframes.FFrameView; |
||
46 | import org.gvsig.app.project.documents.layout.fframes.IFFrame; |
||
47 | import org.gvsig.app.project.documents.layout.fframes.ListViewModel; |
||
48 | import org.gvsig.app.project.documents.layout.fframes.gui.JPRotation; |
||
49 | import org.gvsig.app.project.documents.layout.gui.LayoutPanel; |
||
50 | import org.gvsig.app.project.documents.view.DefaultViewDocument; |
||
51 | import org.gvsig.fmap.mapcontext.ViewPort; |
||
52 | 93 | jldominguez | import org.gvsig.i18n.Messages; |
53 | 5 | jldominguez | |
54 | /**
|
||
55 | 219 | cmartinez | * Dialog to add a view to the Layout document, by means of a FFrameView
|
56 | 5 | jldominguez | *
|
57 | * @author Vicente Caballero Navarro
|
||
58 | 219 | cmartinez | * @author Cesar Martinez Izquierdo
|
59 | 5 | jldominguez | */
|
60 | public class FFrameViewDialog extends AbstractFFrameDialog implements |
||
61 | IFFrameDialog { |
||
62 | |||
63 | private static final long serialVersionUID = -7223804566537544559L; |
||
64 | |||
65 | private final LayoutManager layoutManager; |
||
66 | 219 | cmartinez | private javax.swing.JLabel lViews = null; |
67 | 5 | jldominguez | private javax.swing.JScrollPane jScrollPane = null; |
68 | 219 | cmartinez | private javax.swing.JList liViews = null; // @jve:visual-info decl-index=0 |
69 | 5 | jldominguez | // visual-constraint="98,-3"
|
70 | 219 | cmartinez | private javax.swing.JCheckBox chbSyncLayers = null; |
71 | 5 | jldominguez | private javax.swing.JButton bAceptar = null; |
72 | private javax.swing.JButton bCancelar = null; |
||
73 | private javax.swing.JLabel lCalidad = null; |
||
74 | private javax.swing.JComboBox cbCalidad = null; |
||
75 | private DefaultViewDocument m_projectView = null; |
||
76 | private Rectangle2D rect = new Rectangle2D.Double(); |
||
77 | private FFrameView fframeview = null; // new FFrameView(); |
||
78 | private boolean isAcepted = false; |
||
79 | private JPRotation rotation = null; |
||
80 | private FFrameView newFFrameView = null; |
||
81 | private javax.swing.JButton bGrid = null; |
||
82 | private javax.swing.JCheckBox chbShowGrid = null; |
||
83 | 218 | cmartinez | private JPanel pnlFirstRow = null; |
84 | private JCheckBox chbSyncExtent = null; |
||
85 | |||
86 | private WindowInfo windowInfo = null; |
||
87 | 5 | jldominguez | |
88 | 218 | cmartinez | |
89 | 5 | jldominguez | /**
|
90 | * This is the default constructor
|
||
91 | *
|
||
92 | * @param layoutPanel
|
||
93 | * Referencia al Layout.
|
||
94 | * @param fframe
|
||
95 | * Referencia al fframe vista.
|
||
96 | */
|
||
97 | public FFrameViewDialog(LayoutPanel layoutPanel, IFFrame frame) {
|
||
98 | super(layoutPanel, frame);
|
||
99 | fframeview = (FFrameView) frame; |
||
100 | 218 | cmartinez | initComponents(); |
101 | 5 | jldominguez | layoutManager = (LayoutManager) ProjectManager.getInstance()
|
102 | .getDocumentManager("project.document.layout");
|
||
103 | } |
||
104 | |||
105 | /**
|
||
106 | * This method initializes this
|
||
107 | */
|
||
108 | 218 | cmartinez | private void initComponents() { |
109 | this.setLayout(new GridBagLayout()); |
||
110 | GridBagConstraints c = new GridBagConstraints(); |
||
111 | Insets insets = new Insets(5, 5, 5, 5); |
||
112 | int row = 0; |
||
113 | c.gridx = 0;
|
||
114 | c.gridy = row++; |
||
115 | c.insets = new Insets(0,0,0,0); |
||
116 | c.anchor = GridBagConstraints.LINE_START;
|
||
117 | c.gridwidth = GridBagConstraints.REMAINDER;
|
||
118 | add(getFirstRowPnl(), c); |
||
119 | c.insets = insets; |
||
120 | c.gridx = 0;
|
||
121 | c.gridy = row++; |
||
122 | c.gridwidth = GridBagConstraints.REMAINDER;
|
||
123 | 219 | cmartinez | add(getChbSyncLayers(), c); |
124 | 218 | cmartinez | c.insets = insets; |
125 | c.gridx = 0;
|
||
126 | c.gridy = row++; |
||
127 | c.gridwidth = GridBagConstraints.REMAINDER;
|
||
128 | add(getChbSyncExtent(), c); |
||
129 | c.gridx = 0;
|
||
130 | c.gridy = row++; |
||
131 | c.gridwidth = 1;
|
||
132 | add(getLCalidad(), c); |
||
133 | c.gridx = 1;
|
||
134 | c.gridwidth = GridBagConstraints.REMAINDER;
|
||
135 | add(getCbCalidad(), c); |
||
136 | c.gridx = 0;
|
||
137 | c.gridy = row++; |
||
138 | c.gridwidth = 1;
|
||
139 | add(getChbShowGrid(), c); |
||
140 | c.gridx = 1;
|
||
141 | c.gridwidth = GridBagConstraints.REMAINDER;
|
||
142 | add(getBGrid(), c); |
||
143 | JPanel acceptCancelPnl = new JPanel(new GridBagLayout()); |
||
144 | c.anchor = GridBagConstraints.LINE_START;
|
||
145 | c.gridx = 0;
|
||
146 | c.gridy = 0;
|
||
147 | c.gridwidth = 1;
|
||
148 | acceptCancelPnl.add(getbAceptar(), c); |
||
149 | c.gridx = 1;
|
||
150 | acceptCancelPnl.add(getBCancelar(), c); |
||
151 | c.gridx = 0;
|
||
152 | c.gridy = row++; |
||
153 | c.anchor = GridBagConstraints.LINE_END;
|
||
154 | c.gridwidth = GridBagConstraints.REMAINDER;
|
||
155 | add(acceptCancelPnl, c); |
||
156 | 5 | jldominguez | } |
157 | |||
158 | public void setRectangle(Rectangle2D r) { |
||
159 | rect.setRect(r); |
||
160 | } |
||
161 | 218 | cmartinez | |
162 | private JPanel getFirstRowPnl() { |
||
163 | if (pnlFirstRow==null) { |
||
164 | pnlFirstRow = new JPanel(new GridBagLayout()); |
||
165 | GridBagConstraints c = new GridBagConstraints(); |
||
166 | Insets insets = new Insets(5, 5, 5, 5); |
||
167 | c.gridx = 0;
|
||
168 | c.gridy = 1;
|
||
169 | c.insets = insets; |
||
170 | c.anchor = GridBagConstraints.PAGE_START;
|
||
171 | 219 | cmartinez | pnlFirstRow.add(getLViews(), c); |
172 | 218 | cmartinez | c.gridx = 1;
|
173 | pnlFirstRow.add(getScrolledViewList(), c); |
||
174 | c.gridx = 2;
|
||
175 | pnlFirstRow.add(getPRotation(), c); |
||
176 | } |
||
177 | return pnlFirstRow;
|
||
178 | 5 | jldominguez | } |
179 | |||
180 | /**
|
||
181 | * This method initializes lVistas
|
||
182 | *
|
||
183 | * @return javax.swing.JLabel
|
||
184 | */
|
||
185 | 219 | cmartinez | private javax.swing.JLabel getLViews() {
|
186 | if (lViews == null) { |
||
187 | lViews = new javax.swing.JLabel();
|
||
188 | lViews.setText(Messages.getText("Vista"));
|
||
189 | 5 | jldominguez | } |
190 | |||
191 | 219 | cmartinez | return lViews;
|
192 | 5 | jldominguez | } |
193 | |||
194 | /**
|
||
195 | * This method initializes jScrollPane
|
||
196 | *
|
||
197 | * @return javax.swing.JScrollPane
|
||
198 | */
|
||
199 | 218 | cmartinez | private javax.swing.JScrollPane getScrolledViewList() {
|
200 | 5 | jldominguez | if (jScrollPane == null) { |
201 | jScrollPane = new javax.swing.JScrollPane();
|
||
202 | 218 | cmartinez | jScrollPane.setViewportView(getViewList()); |
203 | jScrollPane.setPreferredSize(new java.awt.Dimension(300, 100)); |
||
204 | 5 | jldominguez | } |
205 | return jScrollPane;
|
||
206 | } |
||
207 | |||
208 | /**
|
||
209 | * This method initializes liVistas
|
||
210 | *
|
||
211 | * @return javax.swing.JList
|
||
212 | */
|
||
213 | 218 | cmartinez | private javax.swing.JList getViewList() {
|
214 | 219 | cmartinez | if (liViews == null) { |
215 | 5 | jldominguez | ListViewModel listmodel = new ListViewModel();
|
216 | 93 | jldominguez | |
217 | if (listmodel.addViews()) {
|
||
218 | JOptionPane.showMessageDialog(
|
||
219 | ApplicationLocator.getManager().getRootComponent(), |
||
220 | Messages.getText("_Some_views_excluded_from_list_because_have_editing_layers"),
|
||
221 | Messages.getText("propiedades_marco_vista"),
|
||
222 | JOptionPane.WARNING_MESSAGE);
|
||
223 | } |
||
224 | |||
225 | 219 | cmartinez | liViews = new javax.swing.JList();
|
226 | liViews.setModel(listmodel); |
||
227 | for (int i = 0; i < liViews.getModel().getSize(); i++) { |
||
228 | 5 | jldominguez | if (fframeview.getMapContext() != null) { |
229 | |||
230 | DefaultViewDocument pvaux = |
||
231 | 219 | cmartinez | (DefaultViewDocument) liViews.getModel().getElementAt( |
232 | 5 | jldominguez | i); |
233 | |||
234 | if (pvaux.getMapContext()
|
||
235 | .equals(fframeview.getMapContext())) { |
||
236 | 219 | cmartinez | liViews.setSelectedIndex(i); |
237 | 5 | jldominguez | m_projectView = |
238 | 219 | cmartinez | (DefaultViewDocument) liViews.getModel() |
239 | 5 | jldominguez | .getElementAt(i); |
240 | } |
||
241 | } |
||
242 | } |
||
243 | |||
244 | 219 | cmartinez | liViews |
245 | 5 | jldominguez | .addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
246 | |||
247 | private int selectIndex = -1; |
||
248 | public void valueChanged( |
||
249 | javax.swing.event.ListSelectionEvent e) { |
||
250 | int selectInt =
|
||
251 | ((JList) e.getSource()).getSelectedIndex();
|
||
252 | if (selectInt != selectIndex) {
|
||
253 | selectIndex = selectInt; |
||
254 | if (selectIndex == -1) { |
||
255 | return;
|
||
256 | } |
||
257 | m_projectView = |
||
258 | 219 | cmartinez | (DefaultViewDocument) liViews.getModel() |
259 | 5 | jldominguez | .getElementAt(selectInt); |
260 | ViewPort vp; |
||
261 | try {
|
||
262 | vp = |
||
263 | (ViewPort) m_projectView.getMapContext() |
||
264 | .getViewPort().clone(); |
||
265 | vp.setImageSize(new Dimension((int) rect |
||
266 | .getWidth(), (int) rect.getHeight()));
|
||
267 | } catch (CloneNotSupportedException e1) { |
||
268 | NotificationManager.addError("Excepci?n :", e1);
|
||
269 | } |
||
270 | } |
||
271 | } |
||
272 | }); |
||
273 | } |
||
274 | |||
275 | 219 | cmartinez | return liViews;
|
276 | 5 | jldominguez | } |
277 | |||
278 | /**
|
||
279 | * This method initializes chbEnlaceVivo
|
||
280 | *
|
||
281 | * @return javax.swing.JCheckBox
|
||
282 | */
|
||
283 | 219 | cmartinez | private javax.swing.JCheckBox getChbSyncLayers() {
|
284 | if (chbSyncLayers == null) { |
||
285 | chbSyncLayers = new javax.swing.JCheckBox();
|
||
286 | chbSyncLayers.setText(Messages.getText("Synchronize_layers"));
|
||
287 | chbSyncLayers.setSelected(fframeview.getLayerSynced()); |
||
288 | chbSyncLayers.addActionListener(new ActionListener() { |
||
289 | |||
290 | public void actionPerformed(ActionEvent e) { |
||
291 | if (chbSyncLayers.isSelected()) {
|
||
292 | JOptionPane.showMessageDialog(FFrameViewDialog.this,
|
||
293 | Messages.getText("Warning_Enabling_layer_synchronization_will_discard_any_change_not_present_in_associated_view"),
|
||
294 | Messages.getText("Warning_Layer_sync"),
|
||
295 | JOptionPane.WARNING_MESSAGE);
|
||
296 | } |
||
297 | } |
||
298 | |||
299 | }); |
||
300 | 5 | jldominguez | } |
301 | |||
302 | 219 | cmartinez | return chbSyncLayers;
|
303 | 5 | jldominguez | } |
304 | 218 | cmartinez | |
305 | private javax.swing.JCheckBox getChbSyncExtent() {
|
||
306 | if (chbSyncExtent==null) { |
||
307 | chbSyncExtent = new javax.swing.JCheckBox();
|
||
308 | chbSyncExtent.setText(Messages.getText("Synchronize_extents"));
|
||
309 | 219 | cmartinez | chbSyncExtent.setSelected(fframeview.getExtentSynced()); |
310 | 218 | cmartinez | } |
311 | return chbSyncExtent;
|
||
312 | 5 | jldominguez | } |
313 | |||
314 | /**
|
||
315 | * This method initializes jButton
|
||
316 | *
|
||
317 | * @return javax.swing.JButton
|
||
318 | */
|
||
319 | private javax.swing.JButton getbAceptar() {
|
||
320 | if (bAceptar == null) { |
||
321 | bAceptar = new javax.swing.JButton();
|
||
322 | 218 | cmartinez | bAceptar.setText(Messages.getText("Aceptar"));
|
323 | 5 | jldominguez | bAceptar.addActionListener(new java.awt.event.ActionListener() {
|
324 | |||
325 | public void actionPerformed(java.awt.event.ActionEvent e) { |
||
326 | try {
|
||
327 | newFFrameView = (FFrameView) fframeview.clone(); |
||
328 | newFFrameView.setBoundBox(FLayoutUtilities.toSheetRect( |
||
329 | rect, layoutPanel.getLayoutControl().getAT())); |
||
330 | newFFrameView.setRotation(getPRotation().getRotation()); |
||
331 | 147 | cmartinez | newFFrameView.setHasToc(true);
|
332 | 219 | cmartinez | newFFrameView.setLayerSynced(getChbSyncLayers() |
333 | .isSelected()); |
||
334 | newFFrameView.setExtentSynced(getChbSyncExtent().isSelected()); |
||
335 | 147 | cmartinez | |
336 | 5 | jldominguez | if (m_projectView != null) { |
337 | newFFrameView.setView(m_projectView); |
||
338 | newFFrameView.setQuality(getCbCalidad() |
||
339 | .getSelectedIndex()); |
||
340 | if (fframeview.getGrid() != null) { |
||
341 | ((FFrameGrid) fframeview.getGrid()) |
||
342 | .setFFrameDependence(newFFrameView); |
||
343 | newFFrameView.setGrid(fframeview.getGrid()); |
||
344 | } |
||
345 | newFFrameView.showGrid(getChbShowGrid() |
||
346 | .isSelected()); |
||
347 | newFFrameView.setBoundBox(FLayoutUtilities |
||
348 | .toSheetRect(rect, layoutPanel |
||
349 | .getLayoutControl().getAT())); |
||
350 | } |
||
351 | } catch (CloneNotSupportedException e1) { |
||
352 | 183 | cmartinez | LOG.error("It is not possible to clone the object", e);
|
353 | 5 | jldominguez | } |
354 | isAcepted = true;
|
||
355 | 219 | cmartinez | ApplicationLocator.getManager().getUIManager().closeWindow( |
356 | 5 | jldominguez | FFrameViewDialog.this); |
357 | 183 | cmartinez | layoutPanel.getLayoutControl().setDefaultTool(); |
358 | 5 | jldominguez | } |
359 | }); |
||
360 | } |
||
361 | |||
362 | return bAceptar;
|
||
363 | } |
||
364 | |||
365 | /**
|
||
366 | * This method initializes bCancelar
|
||
367 | *
|
||
368 | * @return javax.swing.JButton
|
||
369 | */
|
||
370 | private javax.swing.JButton getBCancelar() {
|
||
371 | if (bCancelar == null) { |
||
372 | bCancelar = new javax.swing.JButton();
|
||
373 | 218 | cmartinez | bCancelar.setText(Messages.getText("Cancelar"));
|
374 | 5 | jldominguez | bCancelar.addActionListener(new java.awt.event.ActionListener() {
|
375 | |||
376 | public void actionPerformed(java.awt.event.ActionEvent e) { |
||
377 | newFFrameView = null;
|
||
378 | 219 | cmartinez | ApplicationLocator.getManager().getUIManager().closeWindow( |
379 | 5 | jldominguez | FFrameViewDialog.this); |
380 | } |
||
381 | }); |
||
382 | } |
||
383 | |||
384 | return bCancelar;
|
||
385 | } |
||
386 | |||
387 | /**
|
||
388 | * This method initializes lCalidad
|
||
389 | *
|
||
390 | * @return javax.swing.JLabel
|
||
391 | */
|
||
392 | private javax.swing.JLabel getLCalidad() {
|
||
393 | if (lCalidad == null) { |
||
394 | lCalidad = new javax.swing.JLabel();
|
||
395 | 218 | cmartinez | lCalidad.setText(Messages.getText("calidad"));
|
396 | 5 | jldominguez | } |
397 | |||
398 | return lCalidad;
|
||
399 | } |
||
400 | |||
401 | /**
|
||
402 | * This method initializes cbCalidad
|
||
403 | *
|
||
404 | * @return javax.swing.JComboBox
|
||
405 | */
|
||
406 | private javax.swing.JComboBox getCbCalidad() {
|
||
407 | if (cbCalidad == null) { |
||
408 | // String[] s={"Presentaci?n","Borrador"};
|
||
409 | cbCalidad = new javax.swing.JComboBox();
|
||
410 | 218 | cmartinez | cbCalidad.addItem(Messages.getText("presentacion"));
|
411 | cbCalidad.addItem(Messages.getText("borrador"));
|
||
412 | 5 | jldominguez | cbCalidad.setSelectedIndex(fframeview.getQuality()); |
413 | } |
||
414 | |||
415 | return cbCalidad;
|
||
416 | } |
||
417 | |||
418 | /*
|
||
419 | * (non-Javadoc)
|
||
420 | *
|
||
421 | * @see com.iver.mdiApp.ui.MDIManager.View#getViewInfo()
|
||
422 | */
|
||
423 | public WindowInfo getWindowInfo() {
|
||
424 | 218 | cmartinez | if (windowInfo==null) { |
425 | windowInfo = new WindowInfo(WindowInfo.MODALDIALOG | WindowInfo.RESIZABLE);
|
||
426 | windowInfo.setHeight(300);
|
||
427 | windowInfo.setWidth(550);
|
||
428 | windowInfo.setTitle(Messages.getText( |
||
429 | "propiedades_marco_vista"));
|
||
430 | } |
||
431 | return windowInfo;
|
||
432 | 5 | jldominguez | } |
433 | |||
434 | /**
|
||
435 | * @see org.gvsig.app.project.documents.layout.fframes.gui.dialogs.IFFrameDialog#getIsAcepted()
|
||
436 | */
|
||
437 | public boolean getIsAcepted() { |
||
438 | return isAcepted;
|
||
439 | } |
||
440 | |||
441 | /**
|
||
442 | * This method initializes rotation
|
||
443 | *
|
||
444 | * @return javax.swing.JPanel
|
||
445 | */
|
||
446 | private JPRotation getPRotation() {
|
||
447 | if (rotation == null) { |
||
448 | rotation = new JPRotation();
|
||
449 | 219 | cmartinez | rotation.setRotation(fframeview.getRotation()); |
450 | 5 | jldominguez | } |
451 | return rotation;
|
||
452 | } |
||
453 | |||
454 | public IFFrame getFFrame() {
|
||
455 | return newFFrameView;
|
||
456 | } |
||
457 | |||
458 | /**
|
||
459 | * This method initializes bGrid
|
||
460 | *
|
||
461 | * @return javax.swing.JButton
|
||
462 | */
|
||
463 | private JButton getBGrid() { |
||
464 | if (bGrid == null) { |
||
465 | bGrid = new JButton(); |
||
466 | 218 | cmartinez | bGrid.setText(Messages.getText("configurar"));
|
467 | 5 | jldominguez | bGrid.addActionListener(new java.awt.event.ActionListener() {
|
468 | |||
469 | public void actionPerformed(java.awt.event.ActionEvent e) { |
||
470 | FFrameGrid fframeGrid = null;
|
||
471 | |||
472 | if (fframeview.getGrid() != null) { |
||
473 | fframeGrid = (FFrameGrid) fframeview.getGrid(); |
||
474 | } else {
|
||
475 | fframeGrid = (FFrameGrid) layoutManager.createFrame(FFrameGrid.PERSISTENCE_DEFINITION_NAME); |
||
476 | fframeGrid.setFFrameDependence(fframeview); |
||
477 | } |
||
478 | |||
479 | FFrameGridDialog fframeGridDialog = |
||
480 | (FFrameGridDialog)layoutManager.createFFrameDialog(fframeGrid, layoutPanel); |
||
481 | fframeGridDialog.setFFrameView(fframeview); |
||
482 | |||
483 | |||
484 | if (fframeGridDialog != null) { |
||
485 | 219 | cmartinez | ApplicationLocator.getManager().getUIManager().addWindow(fframeGridDialog); |
486 | 5 | jldominguez | } |
487 | IFFrame newFrame = fframeGridDialog.getFFrame(); |
||
488 | if (newFrame != null) { |
||
489 | fframeview.setGrid(newFrame); |
||
490 | } |
||
491 | } |
||
492 | }); |
||
493 | } |
||
494 | return bGrid;
|
||
495 | } |
||
496 | |||
497 | /**
|
||
498 | * This method initializes chbShowGrid
|
||
499 | *
|
||
500 | * @return javax.swing.JCheckBox
|
||
501 | */
|
||
502 | private JCheckBox getChbShowGrid() { |
||
503 | if (chbShowGrid == null) { |
||
504 | chbShowGrid = new JCheckBox(); |
||
505 | chbShowGrid.setSelected(fframeview.isShowGrid()); |
||
506 | 218 | cmartinez | chbShowGrid.setText(Messages.getText("Show_grid"));
|
507 | 5 | jldominguez | } |
508 | return chbShowGrid;
|
||
509 | } |
||
510 | |||
511 | public Object getWindowProfile() { |
||
512 | return WindowInfo.DIALOG_PROFILE;
|
||
513 | } |
||
514 | |||
515 | } // @jve:decl-index=0:visual-constraint="10,10" |