svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.ui / src / main / java / org / gvsig / gui / beans / propertiespanel / PropertyStruct.java @ 40561
History | View | Annotate | Download (4.48 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
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 3
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
25 |
*
|
26 |
* Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
|
27 |
*
|
28 |
* This program is free software; you can redistribute it and/or
|
29 |
* modify it under the terms of the GNU General Public License
|
30 |
* as published by the Free Software Foundation; either version 2
|
31 |
* of the License, or (at your option) any later version.
|
32 |
*
|
33 |
* This program is distributed in the hope that it will be useful,
|
34 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
35 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
36 |
* GNU General Public License for more details.
|
37 |
*
|
38 |
* You should have received a copy of the GNU General Public License
|
39 |
* along with this program; if not, write to the Free Software
|
40 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
41 |
*/
|
42 |
package org.gvsig.gui.beans.propertiespanel; |
43 |
|
44 |
import java.awt.Component; |
45 |
|
46 |
import javax.swing.JLabel; |
47 |
/**
|
48 |
* Clase con todos los datos posibles que puede tener una clave/valor
|
49 |
* especificada.
|
50 |
*
|
51 |
* @version 23/04/2007
|
52 |
* @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
|
53 |
*/
|
54 |
public class PropertyStruct { |
55 |
/**
|
56 |
* Representa al contenido que tendra el label
|
57 |
*/
|
58 |
private String textLabel = ""; |
59 |
|
60 |
/**
|
61 |
* Clave del elemento
|
62 |
*/
|
63 |
private String key = ""; |
64 |
|
65 |
/**
|
66 |
* Valor inicial del elemento
|
67 |
*/
|
68 |
private Object oldValue = null; |
69 |
|
70 |
/**
|
71 |
* Valor despu?s de haberlo modificado en la ventana
|
72 |
*/
|
73 |
private Object newValue = null; |
74 |
|
75 |
/**
|
76 |
* Lista de opciones extras que determina como sera un
|
77 |
* <code>Component</code>
|
78 |
*/
|
79 |
private Object[] extras = null; |
80 |
|
81 |
/**
|
82 |
* <code>JLabel</code> que representa al componente
|
83 |
*/
|
84 |
private JLabel jLabel = null; |
85 |
|
86 |
/**
|
87 |
* Componente en si donde se modificar? el valor
|
88 |
*/
|
89 |
private Component component = null; |
90 |
|
91 |
/**
|
92 |
* Crea un PropertyStruct vacio
|
93 |
*/
|
94 |
public PropertyStruct() {
|
95 |
} |
96 |
|
97 |
/**
|
98 |
* Crea un PropertyStruct;
|
99 |
* @param textLabel
|
100 |
* @param key
|
101 |
* @param value
|
102 |
* @param extras
|
103 |
*/
|
104 |
public PropertyStruct(String textLabel, String key, Object value, Object[] extras) { |
105 |
setTextLabel(textLabel); |
106 |
setKey(key); |
107 |
setOldValue(value); |
108 |
setNewValue(value); |
109 |
setExtras(extras); |
110 |
} |
111 |
|
112 |
/**
|
113 |
* @return the component
|
114 |
*/
|
115 |
public Component getComponent() { |
116 |
return component;
|
117 |
} |
118 |
|
119 |
/**
|
120 |
* @param component the component to set
|
121 |
*/
|
122 |
public void setComponent(Component component) { |
123 |
this.component = component;
|
124 |
} |
125 |
|
126 |
/**
|
127 |
* @return the extras
|
128 |
*/
|
129 |
public Object[] getExtras() { |
130 |
return extras;
|
131 |
} |
132 |
|
133 |
/**
|
134 |
* @param extras the extras to set
|
135 |
*/
|
136 |
public void setExtras(Object[] extras) { |
137 |
this.extras = extras;
|
138 |
} |
139 |
|
140 |
/**
|
141 |
* @return the jLabel
|
142 |
*/
|
143 |
public JLabel getJLabel() { |
144 |
return jLabel;
|
145 |
} |
146 |
|
147 |
/**
|
148 |
* @param label the jLabel to set
|
149 |
*/
|
150 |
public void setJLabel(JLabel label) { |
151 |
jLabel = label; |
152 |
} |
153 |
|
154 |
/**
|
155 |
* @return the key
|
156 |
*/
|
157 |
public String getKey() { |
158 |
return key;
|
159 |
} |
160 |
|
161 |
/**
|
162 |
* @param key the key to set
|
163 |
*/
|
164 |
public void setKey(String key) { |
165 |
this.key = key;
|
166 |
} |
167 |
|
168 |
/**
|
169 |
* @return the newValue
|
170 |
*/
|
171 |
public Object getNewValue() { |
172 |
return newValue;
|
173 |
} |
174 |
|
175 |
/**
|
176 |
* @param newValue the newValue to set
|
177 |
*/
|
178 |
public void setNewValue(Object newValue) { |
179 |
this.newValue = newValue;
|
180 |
} |
181 |
|
182 |
/**
|
183 |
* @return the oldValue
|
184 |
*/
|
185 |
public Object getOldValue() { |
186 |
return oldValue;
|
187 |
} |
188 |
|
189 |
/**
|
190 |
* @param oldValue the oldValue to set
|
191 |
*/
|
192 |
public void setOldValue(Object oldValue) { |
193 |
this.oldValue = oldValue;
|
194 |
} |
195 |
|
196 |
/**
|
197 |
* @return the textLabel
|
198 |
*/
|
199 |
public String getTextLabel() { |
200 |
return textLabel;
|
201 |
} |
202 |
|
203 |
/**
|
204 |
* @param textLabel the textLabel to set
|
205 |
*/
|
206 |
public void setTextLabel(String textLabel) { |
207 |
this.textLabel = textLabel;
|
208 |
} |
209 |
} |