svn-gvsig-desktop / trunk / libraries / libUIComponent / src / org / gvsig / gui / beans / propertiespanel / PropertyStruct.java @ 28501
History | View | Annotate | Download (3.54 KB)
1 | 11561 | bsanchez | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|---|---|
2 | *
|
||
3 | * Copyright (C) 2007 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 | package org.gvsig.gui.beans.propertiespanel; |
||
20 | |||
21 | import java.awt.Component; |
||
22 | |||
23 | import javax.swing.JLabel; |
||
24 | /**
|
||
25 | * Clase con todos los datos posibles que puede tener una clave/valor
|
||
26 | * especificada.
|
||
27 | 12368 | bsanchez | *
|
28 | 11561 | bsanchez | * @version 23/04/2007
|
29 | 12368 | bsanchez | * @author BorSanZa - Borja S?nchez Zamorano (borja.sanchez@iver.es)
|
30 | 11561 | bsanchez | */
|
31 | public class PropertyStruct { |
||
32 | /**
|
||
33 | 11565 | bsanchez | * Representa al contenido que tendra el label
|
34 | */
|
||
35 | private String textLabel = ""; |
||
36 | |||
37 | /**
|
||
38 | 12368 | bsanchez | * Clave del elemento
|
39 | 11561 | bsanchez | */
|
40 | 11565 | bsanchez | private String key = ""; |
41 | 11561 | bsanchez | |
42 | /**
|
||
43 | * Valor inicial del elemento
|
||
44 | */
|
||
45 | 11565 | bsanchez | private Object oldValue = null; |
46 | 11561 | bsanchez | |
47 | /**
|
||
48 | * Valor despu?s de haberlo modificado en la ventana
|
||
49 | */
|
||
50 | 11565 | bsanchez | private Object newValue = null; |
51 | 12368 | bsanchez | |
52 | 11561 | bsanchez | /**
|
53 | * Lista de opciones extras que determina como sera un
|
||
54 | * <code>Component</code>
|
||
55 | */
|
||
56 | 11565 | bsanchez | private Object[] extras = null; |
57 | 12368 | bsanchez | |
58 | 11561 | bsanchez | /**
|
59 | 12368 | bsanchez | * <code>JLabel</code> que representa al componente
|
60 | 11561 | bsanchez | */
|
61 | 11565 | bsanchez | private JLabel jLabel = null; |
62 | 12368 | bsanchez | |
63 | 11561 | bsanchez | /**
|
64 | 11565 | bsanchez | * Componente en si donde se modificar? el valor
|
65 | 11563 | bsanchez | */
|
66 | 11565 | bsanchez | private Component component = null; |
67 | |||
68 | /**
|
||
69 | * Crea un PropertyStruct vacio
|
||
70 | */
|
||
71 | public PropertyStruct() {
|
||
72 | } |
||
73 | |||
74 | /**
|
||
75 | * Crea un PropertyStruct;
|
||
76 | * @param textLabel
|
||
77 | * @param key
|
||
78 | * @param value
|
||
79 | * @param extras
|
||
80 | */
|
||
81 | public PropertyStruct(String textLabel, String key, Object value, Object[] extras) { |
||
82 | setTextLabel(textLabel); |
||
83 | setKey(key); |
||
84 | setOldValue(value); |
||
85 | 14251 | nbrodin | setNewValue(value); |
86 | 11565 | bsanchez | setExtras(extras); |
87 | } |
||
88 | 12368 | bsanchez | |
89 | 11563 | bsanchez | /**
|
90 | 11565 | bsanchez | * @return the component
|
91 | 11561 | bsanchez | */
|
92 | 11565 | bsanchez | public Component getComponent() { |
93 | return component;
|
||
94 | } |
||
95 | |||
96 | /**
|
||
97 | * @param component the component to set
|
||
98 | */
|
||
99 | public void setComponent(Component component) { |
||
100 | this.component = component;
|
||
101 | } |
||
102 | |||
103 | /**
|
||
104 | * @return the extras
|
||
105 | */
|
||
106 | public Object[] getExtras() { |
||
107 | return extras;
|
||
108 | } |
||
109 | |||
110 | /**
|
||
111 | * @param extras the extras to set
|
||
112 | */
|
||
113 | public void setExtras(Object[] extras) { |
||
114 | this.extras = extras;
|
||
115 | } |
||
116 | |||
117 | /**
|
||
118 | * @return the jLabel
|
||
119 | */
|
||
120 | public JLabel getJLabel() { |
||
121 | return jLabel;
|
||
122 | } |
||
123 | |||
124 | /**
|
||
125 | * @param label the jLabel to set
|
||
126 | */
|
||
127 | public void setJLabel(JLabel label) { |
||
128 | jLabel = label; |
||
129 | } |
||
130 | |||
131 | /**
|
||
132 | * @return the key
|
||
133 | */
|
||
134 | public String getKey() { |
||
135 | return key;
|
||
136 | } |
||
137 | |||
138 | /**
|
||
139 | * @param key the key to set
|
||
140 | */
|
||
141 | public void setKey(String key) { |
||
142 | this.key = key;
|
||
143 | } |
||
144 | |||
145 | /**
|
||
146 | * @return the newValue
|
||
147 | */
|
||
148 | public Object getNewValue() { |
||
149 | return newValue;
|
||
150 | } |
||
151 | |||
152 | /**
|
||
153 | * @param newValue the newValue to set
|
||
154 | */
|
||
155 | public void setNewValue(Object newValue) { |
||
156 | this.newValue = newValue;
|
||
157 | } |
||
158 | |||
159 | /**
|
||
160 | * @return the oldValue
|
||
161 | */
|
||
162 | public Object getOldValue() { |
||
163 | return oldValue;
|
||
164 | } |
||
165 | |||
166 | /**
|
||
167 | * @param oldValue the oldValue to set
|
||
168 | */
|
||
169 | public void setOldValue(Object oldValue) { |
||
170 | this.oldValue = oldValue;
|
||
171 | } |
||
172 | |||
173 | /**
|
||
174 | * @return the textLabel
|
||
175 | */
|
||
176 | public String getTextLabel() { |
||
177 | return textLabel;
|
||
178 | } |
||
179 | |||
180 | /**
|
||
181 | * @param textLabel the textLabel to set
|
||
182 | */
|
||
183 | public void setTextLabel(String textLabel) { |
||
184 | this.textLabel = textLabel;
|
||
185 | } |
||
186 | 11561 | bsanchez | } |