svn-gvsig-desktop / branches / gvSIG_CAD_Layout_version / applications / appgvSIG / src / com / iver / cit / gvsig / gui / layout / fframes / dialogs / FFrameGraphicsDialog.java @ 1729
History | View | Annotate | Download (4.84 KB)
1 |
/*
|
---|---|
2 |
* Created on 02-ago-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.gui.layout.fframes.dialogs; |
46 |
|
47 |
import com.iver.andami.PluginServices; |
48 |
import com.iver.andami.ui.mdiManager.ViewInfo; |
49 |
|
50 |
import com.iver.cit.gvsig.fmap.core.v02.FConstant; |
51 |
import com.iver.cit.gvsig.gui.layout.Layout; |
52 |
import com.iver.cit.gvsig.gui.layout.fframes.FFrameGraphics; |
53 |
import com.iver.cit.gvsig.gui.legendmanager.panels.FPanelLegendDefault; |
54 |
|
55 |
import java.awt.geom.Rectangle2D; |
56 |
|
57 |
|
58 |
/**
|
59 |
* Di?logo de las propiedades de los gr?ficos.
|
60 |
*
|
61 |
* @author Vicente Caballero Navarro
|
62 |
*/
|
63 |
public class FFrameGraphicsDialog extends FPanelLegendDefault |
64 |
implements IFFrameDialog {
|
65 |
private Rectangle2D rect = new Rectangle2D.Double(); |
66 |
private Layout m_layout = null; // @jve:visual-info decl-index=0 visual-constraint="393,10" |
67 |
private boolean isAcepted = false; |
68 |
private FFrameGraphics fframegraphics = null; |
69 |
private javax.swing.JButton bAceptar = null; |
70 |
private javax.swing.JButton bCancelar = null; |
71 |
|
72 |
/**
|
73 |
* Crea un nuevo FFrameGraphicsDialog.
|
74 |
*
|
75 |
* @param layout Referencia al Layout.
|
76 |
* @param fframe Referencia al fframe de gr?fico.
|
77 |
*/
|
78 |
public FFrameGraphicsDialog(Layout layout, FFrameGraphics fframe) {
|
79 |
m_layout = layout; |
80 |
fframegraphics = fframe; |
81 |
/////setFSymbol(fframegraphics.getFSymbol());
|
82 |
fillCheckBox.setSelected(false);
|
83 |
|
84 |
initialize(); |
85 |
this.getJPanelPoint().setVisible(false); |
86 |
} |
87 |
|
88 |
/**
|
89 |
* This method initializes this
|
90 |
*/
|
91 |
private void initialize() { |
92 |
this.add(getBAceptar(), null); |
93 |
this.add(getBCancelar(), null); |
94 |
this.setSize(532, 373); |
95 |
} |
96 |
|
97 |
/**
|
98 |
* @see com.iver.mdiApp.ui.MDIManager.SingletonView#getViewModel()
|
99 |
*/
|
100 |
public Object getViewModel() { |
101 |
return "FPanelLegendDefault"; |
102 |
} |
103 |
|
104 |
/**
|
105 |
* @see com.iver.mdiApp.ui.MDIManager.View#getViewInfo()
|
106 |
*/
|
107 |
public ViewInfo getViewInfo() {
|
108 |
ViewInfo m_viewinfo = new ViewInfo(ViewInfo.MODALDIALOG);
|
109 |
m_viewinfo.setTitle(PluginServices.getText(this, "propiedades_grafico")); |
110 |
|
111 |
return m_viewinfo;
|
112 |
} |
113 |
|
114 |
/**
|
115 |
* @see com.iver.cit.gvsig.gui.layout.fframes.dialogs.IFFrameDialog#setRectangle(java.awt.geom.Rectangle2D)
|
116 |
*/
|
117 |
public void setRectangle(Rectangle2D r) { |
118 |
rect.setRect(r); |
119 |
} |
120 |
|
121 |
/**
|
122 |
* @see com.iver.cit.gvsig.gui.layout.fframes.dialogs.IFFrameDialog#getIsAcepted()
|
123 |
*/
|
124 |
public boolean getIsAcepted() { |
125 |
return isAcepted;
|
126 |
} |
127 |
|
128 |
/**
|
129 |
* This method initializes bAceptar
|
130 |
*
|
131 |
* @return javax.swing.JButton
|
132 |
*/
|
133 |
private javax.swing.JButton getBAceptar() {
|
134 |
if (bAceptar == null) { |
135 |
bAceptar = new javax.swing.JButton();
|
136 |
bAceptar.setBounds(85, 326, 122, 28); |
137 |
bAceptar.setText(PluginServices.getText(this, "Aceptar")); |
138 |
bAceptar.addActionListener(new java.awt.event.ActionListener() {
|
139 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
140 |
if (getFSymbol().getSymbolType() == FConstant.SYMBOL_TYPE_POINT) {
|
141 |
updateControls(false); // Para que lo que haya en |
142 |
} |
143 |
|
144 |
////fframegraphics.setFSymbol(getFSymbol());
|
145 |
|
146 |
PluginServices.getMDIManager().closeView(FFrameGraphicsDialog.this); |
147 |
m_layout.refresh(); |
148 |
isAcepted = true;
|
149 |
} |
150 |
}); |
151 |
} |
152 |
|
153 |
return bAceptar;
|
154 |
} |
155 |
|
156 |
/**
|
157 |
* This method initializes bCancelar
|
158 |
*
|
159 |
* @return javax.swing.JButton
|
160 |
*/
|
161 |
private javax.swing.JButton getBCancelar() {
|
162 |
if (bCancelar == null) { |
163 |
bCancelar = new javax.swing.JButton();
|
164 |
bCancelar.setBounds(292, 326, 122, 28); |
165 |
bCancelar.setText(PluginServices.getText(this, "Cancelar")); |
166 |
bCancelar.addActionListener(new java.awt.event.ActionListener() {
|
167 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
168 |
PluginServices.getMDIManager().closeView(FFrameGraphicsDialog.this); |
169 |
} |
170 |
}); |
171 |
} |
172 |
|
173 |
return bCancelar;
|
174 |
} |
175 |
|
176 |
/**
|
177 |
* @see com.iver.mdiApp.ui.MDIManager.View#viewActivated()
|
178 |
*/
|
179 |
public void viewActivated() { |
180 |
} |
181 |
} |