Revision 5804
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/network/FirewallPage.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.1 2006-06-12 16:04:28 caballero |
|
46 |
* Revision 1.2 2006-06-13 07:43:08 fjp |
|
47 |
* Ajustes sobre los cuadros de dialogos de preferencias |
|
48 |
* |
|
49 |
* Revision 1.1 2006/06/12 16:04:28 caballero |
|
47 | 50 |
* Preferencias |
48 | 51 |
* |
49 | 52 |
* Revision 1.11 2006/06/06 10:26:31 jaume |
... | ... | |
194 | 197 |
return this; |
195 | 198 |
} |
196 | 199 |
|
197 |
public String getParentID() { |
|
198 |
return parentID; |
|
199 |
} |
|
200 |
|
|
201 | 200 |
public boolean storeValues() { |
202 | 201 |
Properties systemSettings = System.getProperties(); |
203 | 202 |
URL httpURL, socksURL; |
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/network/NetworkPage.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.1 2006-06-12 16:04:28 caballero |
|
46 |
* Revision 1.2 2006-06-13 07:43:08 fjp |
|
47 |
* Ajustes sobre los cuadros de dialogos de preferencias |
|
48 |
* |
|
49 |
* Revision 1.1 2006/06/12 16:04:28 caballero |
|
47 | 50 |
* Preferencias |
48 | 51 |
* |
49 | 52 |
* Revision 1.6 2006/06/06 10:26:31 jaume |
... | ... | |
155 | 158 |
return this; |
156 | 159 |
} |
157 | 160 |
|
158 |
public String getParentID() { |
|
159 |
return null; |
|
160 |
} |
|
161 | 161 |
|
162 | 162 |
public void initializeValues() { |
163 | 163 |
lblNetworkStatus = new JLabel(); |
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/general/ExtensionPage.java | ||
---|---|---|
48 | 48 |
super(); |
49 | 49 |
icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/emblem-work.png")); |
50 | 50 |
this.extension=extension; |
51 |
setParentID(ExtensionsPage.class.getName()); |
|
51 | 52 |
initialize(); |
52 | 53 |
} |
53 | 54 |
|
... | ... | |
78 | 79 |
return this; |
79 | 80 |
} |
80 | 81 |
|
81 |
public String getParentID() { |
|
82 |
return ExtensionsPage.class.getName(); |
|
83 |
} |
|
84 | 82 |
|
83 |
|
|
85 | 84 |
public void initializeValues() { |
86 | 85 |
// TODO Auto-generated method stub |
87 | 86 |
|
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/general/GeneralPage.java | ||
---|---|---|
62 | 62 |
return this; |
63 | 63 |
} |
64 | 64 |
|
65 |
public String getParentID() { |
|
66 |
return null; |
|
67 |
} |
|
68 |
|
|
69 | 65 |
public void initializeValues() { |
70 | 66 |
|
71 | 67 |
} |
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/general/DirExtensionsPage.java | ||
---|---|---|
29 | 29 |
super(); |
30 | 30 |
initialize(); |
31 | 31 |
id = this.getClass().getName(); |
32 |
setParentID(GeneralPage.class.getName()); |
|
32 | 33 |
} |
33 | 34 |
|
34 | 35 |
private void initialize() { |
... | ... | |
51 | 52 |
return this; |
52 | 53 |
} |
53 | 54 |
|
54 |
public String getParentID() { |
|
55 |
return GeneralPage.class.getName(); |
|
56 |
} |
|
57 | 55 |
|
56 |
|
|
58 | 57 |
public void initializeValues() { |
59 | 58 |
|
60 | 59 |
} |
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/general/ExtensionsPage.java | ||
---|---|---|
19 | 19 |
public ExtensionsPage() { |
20 | 20 |
super(); |
21 | 21 |
icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/bonobo-component-browser.png")); |
22 |
setParentID(GeneralPage.class.getName()); |
|
22 | 23 |
initialize(); |
23 | 24 |
} |
24 | 25 |
|
... | ... | |
47 | 48 |
return this; |
48 | 49 |
} |
49 | 50 |
|
50 |
public String getParentID() { |
|
51 |
return GeneralPage.class.getName(); |
|
52 |
} |
|
53 | 51 |
|
52 |
|
|
54 | 53 |
public void initializeValues() { |
55 | 54 |
// TODO Auto-generated method stub |
56 | 55 |
|
trunk/libraries/libCorePlugin/src/com/iver/core/preferences/general/LanguagePage.java | ||
---|---|---|
13 | 13 |
import com.iver.andami.PluginServices; |
14 | 14 |
import com.iver.andami.preferences.AbstractPreferencePage; |
15 | 15 |
|
16 |
|
|
17 | 16 |
public class LanguagePage extends AbstractPreferencePage { |
18 | 17 |
|
19 | 18 |
private ImageIcon icon; |
19 |
|
|
20 | 20 |
private String id; |
21 |
|
|
21 | 22 |
private JPanel pN = null; |
23 |
|
|
22 | 24 |
private JPanel pC = null; |
25 |
|
|
23 | 26 |
private JPanel jPanel = null; |
27 |
|
|
24 | 28 |
private JComboBox cmbIdioma = null; |
29 |
|
|
25 | 30 |
public LanguagePage() { |
26 | 31 |
super(); |
27 | 32 |
initialize(); |
28 | 33 |
id = this.getClass().getName(); |
34 |
setParentID(GeneralPage.class.getName()); |
|
29 | 35 |
} |
30 | 36 |
|
31 | 37 |
private void initialize() { |
32 |
icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/babel.png")); |
|
33 |
this.setLayout(new BorderLayout()); |
|
34 |
this.setSize(new java.awt.Dimension(386,177)); |
|
35 |
this.add(getPN(), java.awt.BorderLayout.NORTH); |
|
36 |
this.add(getPC(), java.awt.BorderLayout.CENTER); |
|
38 |
icon = new ImageIcon(this.getClass().getClassLoader().getResource( |
|
39 |
"images/babel.png")); |
|
40 |
this.setLayout(new BorderLayout()); |
|
41 |
this.setSize(new java.awt.Dimension(386, 177)); |
|
42 |
this.add(getPN(), java.awt.BorderLayout.NORTH); |
|
43 |
this.add(getPC(), java.awt.BorderLayout.CENTER); |
|
37 | 44 |
} |
38 | 45 |
|
39 | 46 |
public String getID() { |
... | ... | |
48 | 55 |
return this; |
49 | 56 |
} |
50 | 57 |
|
51 |
public String getParentID() { |
|
52 |
return GeneralPage.class.getName(); |
|
58 |
public void initializeValues() { |
|
53 | 59 |
} |
54 | 60 |
|
55 |
public void initializeValues() { |
|
56 |
} |
|
57 | 61 |
private class LanguageItem { |
58 | 62 |
public Locale locale; |
63 |
|
|
59 | 64 |
public String description; |
60 | 65 |
|
61 |
public LanguageItem(Locale loc, String str){ |
|
66 |
public LanguageItem(Locale loc, String str) {
|
|
62 | 67 |
locale = loc; |
63 | 68 |
description = str; |
64 | 69 |
} |
65 | 70 |
|
66 |
public String toString(){ |
|
71 |
public String toString() {
|
|
67 | 72 |
return description; |
68 | 73 |
} |
69 | 74 |
} |
75 |
|
|
70 | 76 |
public boolean storeValues() { |
71 |
// Se escribe el idioma
|
|
77 |
// Se escribe el idioma
|
|
72 | 78 |
LanguageItem sel = (LanguageItem) cmbIdioma.getSelectedItem(); |
73 | 79 |
Launcher.getAndamiConfig().setLocaleLanguage(sel.locale.getLanguage()); |
74 | 80 |
Launcher.getAndamiConfig().setLocaleCountry(sel.locale.getCountry()); |
... | ... | |
87 | 93 |
|
88 | 94 |
/** |
89 | 95 |
* This method initializes pN |
90 |
* |
|
96 |
*
|
|
91 | 97 |
* @return javax.swing.JPanel |
92 | 98 |
*/ |
93 | 99 |
private JPanel getPN() { |
... | ... | |
99 | 105 |
|
100 | 106 |
/** |
101 | 107 |
* This method initializes pC |
102 |
* |
|
108 |
*
|
|
103 | 109 |
* @return javax.swing.JPanel |
104 | 110 |
*/ |
105 | 111 |
private JPanel getPC() { |
... | ... | |
112 | 118 |
|
113 | 119 |
/** |
114 | 120 |
* This method initializes jPanel |
115 |
* |
|
121 |
*
|
|
116 | 122 |
* @return javax.swing.JPanel |
117 | 123 |
*/ |
118 | 124 |
private JPanel getJPanel() { |
119 | 125 |
if (jPanel == null) { |
120 | 126 |
jPanel = new JPanel(); |
121 |
jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "idioma", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
127 |
jPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, |
|
128 |
"idioma", |
|
129 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
130 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, |
|
131 |
null)); |
|
122 | 132 |
jPanel.add(getJComboBox(), null); |
123 | 133 |
} |
124 | 134 |
return jPanel; |
... | ... | |
126 | 136 |
|
127 | 137 |
/** |
128 | 138 |
* This method initializes jComboBox |
129 |
* |
|
139 |
*
|
|
130 | 140 |
* @return javax.swing.JComboBox |
131 | 141 |
*/ |
132 | 142 |
private JComboBox getJComboBox() { |
133 | 143 |
if (cmbIdioma == null) { |
134 | 144 |
cmbIdioma = new JComboBox(); |
135 |
cmbIdioma.setPreferredSize(new java.awt.Dimension(195,20)); |
|
145 |
cmbIdioma.setPreferredSize(new java.awt.Dimension(195, 20));
|
|
136 | 146 |
|
137 | 147 |
Locale esp = new Locale("es"); |
138 | 148 |
Locale eng = new Locale("en"); |
139 | 149 |
Locale fra = new Locale("fr"); |
140 | 150 |
Locale ita = new Locale("it"); |
141 | 151 |
Locale val = new Locale("ca"); |
142 |
Locale cs = new Locale("cs"); // Checo
|
|
143 |
Locale eu = new Locale("eu"); // euskera
|
|
144 |
Locale brasil = new Locale("pt", "BR");
|
|
145 |
Locale de = new Locale("de"); // Alem?n
|
|
146 |
Locale gr = new Locale("el", "GR"); // Griego
|
|
147 |
Locale gl = new Locale("gl", "GL"); // Griego
|
|
152 |
Locale cs = new Locale("cs"); // Checo
|
|
153 |
Locale eu = new Locale("eu"); // euskera
|
|
154 |
Locale brasil = new Locale("pt", "BR");
|
|
155 |
Locale de = new Locale("de"); // Alem?n
|
|
156 |
Locale gr = new Locale("el", "GR"); // Griego
|
|
157 |
Locale gl = new Locale("gl", "GL"); // Griego
|
|
148 | 158 |
|
149 | 159 |
// Parche para valenciano/catal?n valenci?/catal? |
150 | 160 |
String strValenciano = PluginServices.getText(this, "__catalan"); |
151 |
// Parche para euskera
|
|
161 |
// Parche para euskera
|
|
152 | 162 |
|
153 |
Locale localeActual = Locale.getDefault(); // Se configura en la clase Launcher |
|
154 |
String strEuskera; |
|
155 |
if (eu.getDisplayLanguage().compareTo("vascuence") == 0) |
|
156 |
strEuskera = "Euskera"; |
|
157 |
else |
|
158 |
strEuskera = eu.getDisplayLanguage(); |
|
163 |
Locale localeActual = Locale.getDefault(); // Se configura en la |
|
164 |
// clase Launcher |
|
165 |
String strEuskera; |
|
166 |
if (eu.getDisplayLanguage().compareTo("vascuence") == 0) |
|
167 |
strEuskera = "Euskera"; |
|
168 |
else |
|
169 |
strEuskera = eu.getDisplayLanguage(); |
|
159 | 170 |
|
160 |
|
|
161 |
LanguageItem[] lenguajes = new LanguageItem[]{ |
|
171 |
LanguageItem[] lenguajes = new LanguageItem[] { |
|
162 | 172 |
new LanguageItem(esp, esp.getDisplayLanguage()), |
163 | 173 |
new LanguageItem(eng, eng.getDisplayLanguage()), |
164 | 174 |
new LanguageItem(fra, fra.getDisplayLanguage()), |
165 | 175 |
new LanguageItem(ita, ita.getDisplayLanguage()), |
166 |
new LanguageItem(val, strValenciano),
|
|
167 |
new LanguageItem(cs, cs.getDisplayLanguage()),
|
|
168 |
new LanguageItem(eu, strEuskera),
|
|
169 |
new LanguageItem(brasil, brasil.getDisplayLanguage()),
|
|
176 |
new LanguageItem(val, strValenciano),
|
|
177 |
new LanguageItem(cs, cs.getDisplayLanguage()),
|
|
178 |
new LanguageItem(eu, strEuskera),
|
|
179 |
new LanguageItem(brasil, brasil.getDisplayLanguage()),
|
|
170 | 180 |
new LanguageItem(de, de.getDisplayLanguage()), |
171 | 181 |
new LanguageItem(gr, gr.getDisplayLanguage()), |
172 |
new LanguageItem(gl, gl.getDisplayLanguage())}; |
|
182 |
new LanguageItem(gl, gl.getDisplayLanguage()) };
|
|
173 | 183 |
|
174 | 184 |
DefaultComboBoxModel model = new DefaultComboBoxModel(lenguajes); |
175 | 185 |
|
176 | 186 |
for (int i = 0; i < lenguajes.length; i++) { |
177 |
if (lenguajes[i].locale.equals(Locale.getDefault())){ |
|
187 |
if (lenguajes[i].locale.equals(Locale.getDefault())) {
|
|
178 | 188 |
model.setSelectedItem(lenguajes[i]); |
179 | 189 |
} |
180 | 190 |
} |
... | ... | |
183 | 193 |
} |
184 | 194 |
return cmbIdioma; |
185 | 195 |
} |
186 |
} // @jve:decl-index=0:visual-constraint="10,10" |
|
196 |
} // @jve:decl-index=0:visual-constraint="10,10" |
trunk/frameworks/_fwAndami/src/com/iver/andami/preferences/AbstractPreferencePage.java | ||
---|---|---|
66 | 66 |
|
67 | 67 |
private String title; |
68 | 68 |
|
69 |
protected String parentID;
|
|
69 |
protected String parentID = null; // Por defecto, nodo raiz
|
|
70 | 70 |
|
71 | 71 |
/** |
72 | 72 |
* Creates a new preference page. |
... | ... | |
247 | 247 |
public final void setParentID(String parentID) { |
248 | 248 |
this.parentID = parentID; |
249 | 249 |
} |
250 |
public final String getParentID() { |
|
251 |
return parentID; |
|
252 |
} |
|
250 | 253 |
|
251 | 254 |
public final void setTitle(String title) { |
252 | 255 |
this.title = title; |
Also available in: Unified diff