svn-gvsig-desktop / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / gui / panelServices / LayerAttributesPanel.java @ 10626
History | View | Annotate | Download (3.84 KB)
1 |
package com.iver.cit.gvsig.publish.gui.panelServices; |
---|---|
2 |
|
3 |
import java.awt.Insets; |
4 |
import java.awt.geom.Rectangle2D; |
5 |
|
6 |
import javax.swing.JTextField; |
7 |
|
8 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
9 |
|
10 |
import com.iver.andami.PluginServices; |
11 |
import com.iver.utiles.StringUtilities; |
12 |
|
13 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
14 |
*
|
15 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
16 |
*
|
17 |
* This program is free software; you can redistribute it and/or
|
18 |
* modify it under the terms of the GNU General Public License
|
19 |
* as published by the Free Software Foundation; either version 2
|
20 |
* of the License, or (at your option) any later version.
|
21 |
*
|
22 |
* This program is distributed in the hope that it will be useful,
|
23 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25 |
* GNU General Public License for more details.
|
26 |
*
|
27 |
* You should have received a copy of the GNU General Public License
|
28 |
* along with this program; if not, write to the Free Software
|
29 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
30 |
*
|
31 |
* For more information, contact:
|
32 |
*
|
33 |
* Generalitat Valenciana
|
34 |
* Conselleria d'Infraestructures i Transport
|
35 |
* Av. Blasco Ib??ez, 50
|
36 |
* 46010 VALENCIA
|
37 |
* SPAIN
|
38 |
*
|
39 |
* +34 963862235
|
40 |
* gvsig@gva.es
|
41 |
* www.gvsig.gva.es
|
42 |
*
|
43 |
* or
|
44 |
*
|
45 |
* IVER T.I. S.A
|
46 |
* Salamanca 50
|
47 |
* 46005 Valencia
|
48 |
* Spain
|
49 |
*
|
50 |
* +34 963163400
|
51 |
* dac@iver.es
|
52 |
*/
|
53 |
/* CVS MESSAGES:
|
54 |
*
|
55 |
* $Id: LayerAttributesPanel.java 10626 2007-03-06 16:55:54Z caballero $
|
56 |
* $Log$
|
57 |
* Revision 1.2 2007-03-06 16:50:30 caballero
|
58 |
* Exceptions
|
59 |
*
|
60 |
* Revision 1.1 2006/11/22 15:57:03 jorpiell
|
61 |
* Se ha ajustado el interfaz de usuario
|
62 |
*
|
63 |
* Revision 1.3 2006/11/22 12:48:21 jorpiell
|
64 |
* Subidos algunos cambios para ver las capas en forma de ?rbol
|
65 |
*
|
66 |
* Revision 1.2 2006/11/20 12:59:05 dagilgon
|
67 |
* *** empty log message ***
|
68 |
*
|
69 |
* Revision 1.1 2006/11/17 13:43:45 jorpiell
|
70 |
* A?adido el nuevo panel donde se muestran las capas
|
71 |
*
|
72 |
*
|
73 |
*/
|
74 |
/**
|
75 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
76 |
*/
|
77 |
public class LayerAttributesPanel extends GridBagLayoutPanel{ |
78 |
private JTextField tbName = null; |
79 |
private JTextField tbTitle = null; |
80 |
private JTextField tbAbstract = null; |
81 |
private JTextField tbExtent = null; |
82 |
private JTextField tbSRS = null; |
83 |
|
84 |
public LayerAttributesPanel(){
|
85 |
super();
|
86 |
addComponent(PluginServices.getText(this, "name") + ":", |
87 |
tbName = new JTextField("",50),new Insets(1,0,1,7)); |
88 |
tbName.setEditable(false);
|
89 |
addComponent(PluginServices.getText(this, "title") + ":", |
90 |
tbTitle = new JTextField("",50),new Insets(1,0,1,7)); |
91 |
addComponent(PluginServices.getText(this, "abstract") + ":", |
92 |
tbAbstract = new JTextField("",50),new Insets(1,0,1,7)); |
93 |
addComponent(PluginServices.getText(this, "extent") + ":", |
94 |
tbExtent = new JTextField("",50),new Insets(1,0,1,7)); |
95 |
tbExtent.setEditable(false);
|
96 |
addComponent(PluginServices.getText(this, "srs") + ":", |
97 |
tbSRS = new JTextField("",50),new Insets(1,0,1,7)); |
98 |
tbSRS.setEditable(false);
|
99 |
} |
100 |
|
101 |
public String getTbAbstract() { |
102 |
return tbAbstract.getText();
|
103 |
} |
104 |
|
105 |
public Rectangle2D getTbExtent() { |
106 |
try{
|
107 |
return StringUtilities.string2Rect(tbExtent.getText());
|
108 |
}catch(Exception e){ |
109 |
return null; |
110 |
} |
111 |
} |
112 |
|
113 |
public String getTbName() { |
114 |
return tbName.getText();
|
115 |
} |
116 |
|
117 |
public String getTbSRS() { |
118 |
return tbSRS.getText();
|
119 |
} |
120 |
|
121 |
public String getTbTitle() { |
122 |
return tbTitle.getText();
|
123 |
} |
124 |
|
125 |
public void setTbAbstract(String tbAbstract) { |
126 |
this.tbAbstract.setText(tbAbstract);
|
127 |
} |
128 |
|
129 |
public void setTbExtent(Rectangle2D tbExtent) { |
130 |
try{
|
131 |
this.tbExtent.setText(StringUtilities.rect2String(tbExtent));
|
132 |
}catch(NullPointerException e){ |
133 |
this.tbExtent.setText(""); |
134 |
} |
135 |
} |
136 |
|
137 |
public void setTbName(String tbName) { |
138 |
this.tbName.setText(tbName);
|
139 |
} |
140 |
|
141 |
public void setTbSRS(String tbSRS) { |
142 |
this.tbSRS.setText(tbSRS);
|
143 |
} |
144 |
|
145 |
public void setTbTitle(String tbTitle) { |
146 |
this.tbTitle.setText(tbTitle);
|
147 |
} |
148 |
} |