svn-gvsig-desktop / branches / v10 / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / view / legend / edition / gui / PanelEditSymbol.java @ 8766
History | View | Annotate | Download (3.83 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* of the License, or (at your option) any later version.
|
9 |
*
|
10 |
* This program is distributed in the hope that it will be useful,
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
* GNU General Public License for more details.
|
14 |
*
|
15 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
18 |
*
|
19 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.cit.gvsig.project.documents.view.legend.edition.gui; |
42 |
|
43 |
import java.awt.BorderLayout; |
44 |
import java.awt.Dimension; |
45 |
|
46 |
import javax.swing.JButton; |
47 |
import javax.swing.JPanel; |
48 |
|
49 |
import com.iver.andami.PluginServices; |
50 |
import com.iver.andami.ui.mdiManager.IWindow; |
51 |
import com.iver.andami.ui.mdiManager.WindowInfo; |
52 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
53 |
import com.iver.cit.gvsig.project.documents.view.legend.gui.FPanelLegendDefault; |
54 |
|
55 |
|
56 |
/**
|
57 |
* Panel creado para editar el s?mbolo seleccionado.
|
58 |
*
|
59 |
* @author Vicente Caballero Navarro
|
60 |
*/
|
61 |
public class PanelEditSymbol extends JPanel implements IWindow { |
62 |
private FPanelLegendDefault panel = null; |
63 |
private JButton bAceptar = null; // @jve:decl-index=0:visual-constraint="198,310" |
64 |
private JPanel panelbutton = null; |
65 |
private boolean ok=false; |
66 |
//private FSymbol symbol;
|
67 |
|
68 |
public PanelEditSymbol(){
|
69 |
initialize(); |
70 |
} |
71 |
|
72 |
/**
|
73 |
* This method initializes this
|
74 |
*
|
75 |
*/
|
76 |
private void initialize() { |
77 |
this.setLayout(new BorderLayout()); |
78 |
this.setSize(419, 343); |
79 |
this.add(getPanel(), java.awt.BorderLayout.NORTH);
|
80 |
this.add(getPanelbutton(),BorderLayout.SOUTH); |
81 |
} |
82 |
/**
|
83 |
* DOCUMENT ME!
|
84 |
*
|
85 |
* @return DOCUMENT ME!
|
86 |
*/
|
87 |
public WindowInfo getWindowInfo() {
|
88 |
WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODALDIALOG);
|
89 |
m_viewinfo.setTitle(PluginServices.getText(this, "simbolo")); |
90 |
|
91 |
return m_viewinfo;
|
92 |
} |
93 |
|
94 |
/**
|
95 |
* This method initializes panel
|
96 |
*
|
97 |
* @return javax.swing.JPanel
|
98 |
*/
|
99 |
private FPanelLegendDefault getPanel() {
|
100 |
if (panel == null) { |
101 |
panel = new FPanelLegendDefault();
|
102 |
panel.setPreferredSize(new Dimension(400, 300)); |
103 |
panel.setVisible(true);
|
104 |
} |
105 |
return panel;
|
106 |
} |
107 |
|
108 |
/**
|
109 |
* This method initializes bAceptar
|
110 |
*
|
111 |
* @return javax.swing.JButton
|
112 |
*/
|
113 |
private JButton getBAceptar() { |
114 |
if (bAceptar == null) { |
115 |
bAceptar = new JButton(); |
116 |
bAceptar.setPreferredSize(new java.awt.Dimension(80,20)); |
117 |
bAceptar.setText("Aceptar");
|
118 |
bAceptar.addActionListener(new java.awt.event.ActionListener() {
|
119 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
120 |
ok=true;
|
121 |
PluginServices.getMDIManager().closeWindow(PanelEditSymbol.this); |
122 |
} |
123 |
}); |
124 |
bAceptar.setSize(35, 20); |
125 |
} |
126 |
return bAceptar;
|
127 |
} |
128 |
public FSymbol getFSymbol(){
|
129 |
return panel.getFSymbol();
|
130 |
} |
131 |
public void setSymbol(FSymbol s){ |
132 |
ok=false;
|
133 |
panel.setFSymbol(s); |
134 |
} |
135 |
public boolean isOK(){ |
136 |
return ok;
|
137 |
} |
138 |
/**
|
139 |
* This method initializes panelbutton
|
140 |
*
|
141 |
* @return javax.swing.JPanel
|
142 |
*/
|
143 |
private JPanel getPanelbutton() { |
144 |
if (panelbutton == null) { |
145 |
panelbutton = new JPanel(); |
146 |
panelbutton.add(getBAceptar(), null);
|
147 |
} |
148 |
return panelbutton;
|
149 |
} |
150 |
} // @jve:decl-index=0:visual-constraint="10,10"
|