Revision 43256
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/PluginsLocator.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import org.gvsig.andami.actioninfo.ActionInfoManager; |
27 | 27 |
import org.gvsig.andami.ui.mdiFrame.MainFrame; |
28 |
import org.gvsig.dialogremember.DialogRememberManager; |
|
29 | 28 |
import org.gvsig.tools.locator.AbstractLocator; |
30 | 29 |
import org.gvsig.tools.locator.Locator; |
31 | 30 |
import org.gvsig.tools.locator.LocatorException; |
... | ... | |
41 | 40 |
public static final String PLUGINS_MANAGER_NAME = "PluginsManager"; |
42 | 41 |
public static final String PLUGINS_ACTIONINFO_MANAGER_NAME = "PluginsActionInfoManager"; |
43 | 42 |
public static final String PLUGINS_LOCALE_MANAGER_NAME = "LocaleManager"; |
44 |
public static final String PLUGINS_DIALOGREMEMBERDER_MANAGER_NAME = "DialogReminderManager"; |
|
45 | 43 |
|
46 | 44 |
private static final String PLUGINS_MANAGER_DESCRIPTION = "PluginsManager of Andami framework"; |
47 | 45 |
private static final String PLUGINS_ACTIONINFO_MANAGER_DESCRIPTION = "PluginsActionInfoManager"; |
48 | 46 |
private static final String PLUGINS_LOCALE_MANAGER_DESCRIPTION = "LocaleManager"; |
49 |
private static final String PLUGINS_DIALOGREMEMBER_MANAGER_DESCRIPTION = "DialogReminderManager"; |
|
50 | 47 |
|
51 | 48 |
/** |
52 | 49 |
* Unique instance. |
... | ... | |
128 | 125 |
getInstance().register(PLUGINS_LOCALE_MANAGER_NAME, PLUGINS_LOCALE_MANAGER_DESCRIPTION, |
129 | 126 |
clazz); |
130 | 127 |
} |
131 |
|
|
132 |
public static DialogRememberManager getDialogRemembereManager() throws LocatorException { |
|
133 |
return (DialogRememberManager) getInstance().get(PLUGINS_DIALOGREMEMBERDER_MANAGER_NAME); |
|
134 |
} |
|
135 |
|
|
136 |
public static void registerDialogRememberManager(Class clazz) { |
|
137 |
getInstance().register(PLUGINS_DIALOGREMEMBERDER_MANAGER_NAME, PLUGINS_DIALOGREMEMBER_MANAGER_DESCRIPTION, |
|
138 |
clazz); |
|
139 |
} |
|
140 |
} |
|
128 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/PluginsLibrary.java | ||
---|---|---|
30 | 30 |
import org.gvsig.andami.installer.icontheme.IconThemeInstallerFactory.RegisterIconThemeInstaller; |
31 | 31 |
import org.gvsig.andami.installer.translations.TranslationsInstallerFactory.RegisterTranslationsInstaller; |
32 | 32 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
33 |
import org.gvsig.dialogremember.impl.DefaultDialogRememberManager; |
|
34 | 33 |
import org.gvsig.installer.lib.api.InstallerLibrary; |
35 | 34 |
import org.gvsig.tools.ToolsLocator; |
36 | 35 |
import org.gvsig.tools.library.AbstractLibrary; |
... | ... | |
51 | 50 |
PluginsLocator.registerDefaultManager(DefaultPluginsManager.class); |
52 | 51 |
PluginsLocator.registerActionInfoManager(DefaultActionInfoManager.class); |
53 | 52 |
PluginsLocator.registerLocaleManager(DefaultLocaleManager.class); |
54 |
PluginsLocator.registerDialogRememberManager(DefaultDialogRememberManager.class); |
|
53 |
|
|
55 | 54 |
ToolsLocator.registerDefaultFirewallManager(DefaultFirewallConfiguration.class); |
56 | 55 |
|
57 | 56 |
// Force initialize of the LocaleManager |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/ui/mdiFrame/DefaultThreadSafeDialogs.java | ||
---|---|---|
33 | 33 |
import java.lang.reflect.Constructor; |
34 | 34 |
import javax.swing.JCheckBox; |
35 | 35 |
|
36 |
import javax.swing.JFileChooser; |
|
37 | 36 |
import javax.swing.JLabel; |
38 | 37 |
import javax.swing.JOptionPane; |
39 | 38 |
import javax.swing.JPanel; |
... | ... | |
46 | 45 |
import org.gvsig.andami.ui.mdiManager.MDIManager; |
47 | 46 |
import org.gvsig.andami.ui.mdiManager.WindowInfo; |
48 | 47 |
import org.gvsig.dialogremember.DialogRememeber; |
48 |
import org.gvsig.filedialogchooser.FileDialogChooser; |
|
49 | 49 |
import org.gvsig.tools.ToolsLocator; |
50 | 50 |
import org.gvsig.tools.task.CancellableTask; |
51 | 51 |
import org.gvsig.tools.task.RunnableWithParameters; |
52 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
52 | 53 |
import org.slf4j.Logger; |
53 | 54 |
import org.slf4j.LoggerFactory; |
54 | 55 |
|
... | ... | |
154 | 155 |
DialogRememeber r = null; |
155 | 156 |
Object msg = message; |
156 | 157 |
if( msgid != null ) { |
157 |
r = PluginsLocator.getDialogRemembereManager().add(msgid);
|
|
158 |
r = ToolsUtilLocator.getDialogRemembereManager().add(msgid);
|
|
158 | 159 |
if( r.hasValue() ) { |
159 | 160 |
this.returnValue = r.getValue(); |
160 | 161 |
return; |
... | ... | |
275 | 276 |
DialogRememeber r = null; |
276 | 277 |
Object msg = message; |
277 | 278 |
if (msgid != null) { |
278 |
r = PluginsLocator.getDialogRemembereManager().add(msgid);
|
|
279 |
r = ToolsUtilLocator.getDialogRemembereManager().add(msgid);
|
|
279 | 280 |
if (r.hasValue() && ((boolean)r.getValue()) ) { |
280 | 281 |
return; |
281 | 282 |
} |
... | ... | |
466 | 467 |
) { |
467 | 468 |
RunnableWithParameters runnable = new RunnableWithParameters() { |
468 | 469 |
public void run() { |
469 |
JFileChooser fc = new JFileChooser(); |
|
470 |
// FileDialogChooser fc = new JFileChooserBased(); |
|
471 |
FileDialogChooser fc = ToolsUtilLocator.getFileDialogChooserManager().create(); |
|
470 | 472 |
fc.setDialogTitle(title); |
471 | 473 |
fc.setDialogType(type); |
472 | 474 |
fc.setFileSelectionMode(selectionMode); |
... | ... | |
474 | 476 |
fc.setCurrentDirectory(initialPath); |
475 | 477 |
fc.setFileFilter(filter); |
476 | 478 |
fc.setFileHidingEnabled(fileHidingEnabled); |
477 |
int r = JFileChooser.CANCEL_OPTION;
|
|
479 |
int r = FileDialogChooser.CANCEL_OPTION;
|
|
478 | 480 |
switch(type) { |
479 |
case JFileChooser.SAVE_DIALOG:
|
|
481 |
case FileDialogChooser.SAVE_DIALOG:
|
|
480 | 482 |
r = fc.showSaveDialog(getRootComponent()); |
481 | 483 |
break; |
482 |
case JFileChooser.OPEN_DIALOG:
|
|
484 |
case FileDialogChooser.OPEN_DIALOG:
|
|
483 | 485 |
default: |
484 | 486 |
r = fc.showOpenDialog(getRootComponent()); |
485 | 487 |
break; |
486 | 488 |
} |
487 |
if( r != JFileChooser.APPROVE_OPTION ) {
|
|
489 |
if( r != FileDialogChooser.APPROVE_OPTION ) {
|
|
488 | 490 |
this.returnValue = null; |
489 | 491 |
return; |
490 | 492 |
} |
... | ... | |
508 | 510 |
} |
509 | 511 |
|
510 | 512 |
public File[] showOpenDirectoryDialog(String title, File initialPath) { |
511 |
return showChooserDialog(title, JFileChooser.OPEN_DIALOG, JFileChooser.DIRECTORIES_ONLY, false, initialPath, null, false);
|
|
513 |
return showChooserDialog(title, FileDialogChooser.OPEN_DIALOG, FileDialogChooser.DIRECTORIES_ONLY, false, initialPath, null, false);
|
|
512 | 514 |
} |
513 | 515 |
|
514 | 516 |
|
515 | 517 |
public File[] showOpenFileDialog(String title, File initialPath) { |
516 |
return showChooserDialog(title, JFileChooser.OPEN_DIALOG, JFileChooser.FILES_ONLY, false, initialPath, null, false);
|
|
518 |
return showChooserDialog(title, FileDialogChooser.OPEN_DIALOG, FileDialogChooser.FILES_ONLY, false, initialPath, null, false);
|
|
517 | 519 |
} |
518 | 520 |
|
519 | 521 |
|
520 | 522 |
public File[] showSaveFileDialog(String title, File initialPath) { |
521 |
return showChooserDialog(title, JFileChooser.SAVE_DIALOG, JFileChooser.FILES_ONLY, false, initialPath, null, false);
|
|
523 |
return showChooserDialog(title, FileDialogChooser.SAVE_DIALOG, FileDialogChooser.FILES_ONLY, false, initialPath, null, false);
|
|
522 | 524 |
} |
523 | 525 |
|
524 | 526 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/resources/default-log4j/log4j.properties | ||
---|---|---|
4 | 4 |
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout |
5 | 5 |
|
6 | 6 |
# Pattern to output the caller's file name and line number. |
7 |
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n |
|
7 |
log4j.appender.stdout.layout.ConversionPattern=%5p %r [%t] (%F:%L) - %m%n
|
|
8 | 8 |
|
9 | 9 |
log4j.logger.org.gvsig.andami.plugins=INFO |
10 | 10 |
log4j.logger.org.gvsig.tools=INFO |
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/pom.xml | ||
---|---|---|
316 | 316 |
<scope>runtime</scope> |
317 | 317 |
</dependency> |
318 | 318 |
|
319 |
|
|
320 | 319 |
</dependencies> |
321 | 320 |
|
322 | 321 |
|
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/preferencespage/dialogremember/DialogRememberPage.java | ||
---|---|---|
7 | 7 |
import javax.swing.event.ListSelectionEvent; |
8 | 8 |
import javax.swing.event.ListSelectionListener; |
9 | 9 |
import org.gvsig.andami.IconThemeHelper; |
10 |
import org.gvsig.andami.PluginsLocator; |
|
11 | 10 |
import org.gvsig.andami.preferences.IPreference; |
12 | 11 |
import org.gvsig.andami.preferences.StoreException; |
13 | 12 |
import org.gvsig.dialogremember.DialogRememberManager; |
... | ... | |
15 | 14 |
import org.gvsig.tools.ToolsLocator; |
16 | 15 |
import org.gvsig.tools.i18n.I18nManager; |
17 | 16 |
import org.gvsig.tools.swing.api.JListWithCheckbox; |
17 |
import org.gvsig.tools.swing.api.ListElement; |
|
18 | 18 |
import org.gvsig.tools.swing.api.ToolsSwingLocator; |
19 | 19 |
import org.gvsig.tools.swing.api.ToolsSwingManager; |
20 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
20 | 21 |
|
21 | 22 |
public class DialogRememberPage extends DialogRememberView implements IPreference { |
22 | 23 |
// |
... | ... | |
29 | 30 |
public static String id = DialogRememberPage.class.getName(); |
30 | 31 |
private ImageIcon icon; |
31 | 32 |
|
32 |
private static class ListElement<T> { |
|
33 |
private final String label; |
|
34 |
private final T value; |
|
35 |
|
|
36 |
public ListElement(String label, T value) { |
|
37 |
this.label = label; |
|
38 |
this.value = value; |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public String toString() { |
|
43 |
return this.label; |
|
44 |
} |
|
45 |
|
|
46 |
public T getValue() { |
|
47 |
return this.value; |
|
48 |
} |
|
49 |
} |
|
50 |
|
|
51 | 33 |
public DialogRememberPage() { |
52 | 34 |
//setParentID(GeneralPage.class.getName()); |
53 | 35 |
initComponents(); |
... | ... | |
94 | 76 |
|
95 | 77 |
@Override |
96 | 78 |
public void initializeValues() { |
97 |
DialogRememberManager remembers = PluginsLocator.getDialogRemembereManager();
|
|
79 |
DialogRememberManager remembers = ToolsUtilLocator.getDialogRemembereManager();
|
|
98 | 80 |
|
99 | 81 |
DefaultListModel model = new DefaultListModel(); |
100 | 82 |
ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel(); |
... | ... | |
112 | 94 |
|
113 | 95 |
@Override |
114 | 96 |
public void initializeDefaults() { |
115 |
DialogRememberManager remembers = PluginsLocator.getDialogRemembereManager();
|
|
97 |
DialogRememberManager remembers = ToolsUtilLocator.getDialogRemembereManager();
|
|
116 | 98 |
|
117 | 99 |
DefaultListModel model = new DefaultListModel(); |
118 | 100 |
ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel(); |
... | ... | |
142 | 124 |
|
143 | 125 |
@Override |
144 | 126 |
public void storeValues() throws StoreException { |
145 |
DialogRememberManager remembers = PluginsLocator.getDialogRemembereManager();
|
|
127 |
DialogRememberManager remembers = ToolsUtilLocator.getDialogRemembereManager();
|
|
146 | 128 |
|
147 | 129 |
ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel(); |
148 | 130 |
int n=0; |
... | ... | |
161 | 143 |
|
162 | 144 |
@Override |
163 | 145 |
public boolean isValueChanged() { |
164 |
DialogRememberManager remembers = PluginsLocator.getDialogRemembereManager();
|
|
146 |
DialogRememberManager remembers = ToolsUtilLocator.getDialogRemembereManager();
|
|
165 | 147 |
|
166 | 148 |
ListSelectionModel checkModel = this.lstCheckdsRemembers.getCheckedModel(); |
167 | 149 |
int n=0; |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/swing/FilesystemExplorerWizardPanelController.java | ||
---|---|---|
13 | 13 |
import java.util.Locale; |
14 | 14 |
|
15 | 15 |
import javax.swing.DefaultListSelectionModel; |
16 |
import javax.swing.JFileChooser; |
|
16 | 17 |
import javax.swing.ListSelectionModel; |
17 | 18 |
import javax.swing.event.ListSelectionEvent; |
18 | 19 |
import javax.swing.event.ListSelectionListener; |
... | ... | |
25 | 26 |
import org.gvsig.app.ApplicationLocator; |
26 | 27 |
import org.gvsig.app.ApplicationManager; |
27 | 28 |
import org.gvsig.app.prepareAction.PrepareContext; |
29 |
import org.gvsig.filedialogchooser.FileDialogChooser; |
|
28 | 30 |
import org.gvsig.fmap.dal.DataStoreParameters; |
29 | 31 |
import org.gvsig.fmap.dal.exception.DataException; |
30 | 32 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer; |
... | ... | |
32 | 34 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.swing.FilesystemExplorerWizardPanel.MyFileFilter; |
33 | 35 |
import org.gvsig.fmap.dal.swing.DALSwingLocator; |
34 | 36 |
import org.gvsig.fmap.mapcontext.MapContext; |
35 |
import org.gvsig.gui.beans.swing.JFileChooser; |
|
36 | 37 |
import org.gvsig.tools.ToolsLocator; |
37 | 38 |
import org.gvsig.tools.dynobject.DynObject; |
38 | 39 |
import org.gvsig.tools.i18n.I18nManager; |
40 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
39 | 41 |
|
40 | 42 |
|
41 | 43 |
/** |
... | ... | |
263 | 265 |
|
264 | 266 |
private List<FilesystemStoreParameters> chooseFilesParameters() { |
265 | 267 |
|
266 |
JFileChooser fileChooser = |
|
267 |
new JFileChooser(OPEN_LAYER_FILE_CHOOSER_ID, |
|
268 |
explorer.getCurrentPath()); |
|
268 |
FileDialogChooser fileChooser = ToolsUtilLocator.getFileDialogChooserManager().create(OPEN_LAYER_FILE_CHOOSER_ID); |
|
269 |
fileChooser.setCurrentDirectory(explorer.getCurrentPath()); |
|
269 | 270 |
fileChooser.setMultiSelectionEnabled(true); |
270 | 271 |
fileChooser.setAcceptAllFileFilterUsed(false); |
271 | 272 |
|
... | ... | |
292 | 293 |
|
293 | 294 |
if (result == JFileChooser.APPROVE_OPTION) { |
294 | 295 |
lastFilter = (MyFileFilter) fileChooser.getFileFilter(); |
295 |
JFileChooser.setLastPath(OPEN_LAYER_FILE_CHOOSER_ID, fileChooser.getCurrentDirectory()); |
|
296 | 296 |
String providerName = null; |
297 | 297 |
if( lastFilter!=null ) { |
298 | 298 |
if( !DEFAULT_FILTER.equalsIgnoreCase(lastFilter.getDescription()) ) { |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/PreferencesExtension.java | ||
---|---|---|
29 | 29 |
import org.gvsig.andami.IconThemeHelper; |
30 | 30 |
import org.gvsig.andami.Launcher; |
31 | 31 |
import org.gvsig.andami.PluginServices; |
32 |
import org.gvsig.andami.PluginsLocator; |
|
33 |
import org.gvsig.andami.PluginsManager; |
|
32 | 34 |
import org.gvsig.andami.plugins.Extension; |
33 | 35 |
import org.gvsig.andami.plugins.config.generate.Extensions; |
34 | 36 |
import org.gvsig.andami.plugins.config.generate.PluginConfig; |
35 | 37 |
import org.gvsig.andami.preferences.DlgPreferences; |
36 | 38 |
import org.gvsig.andami.preferences.IPreference; |
37 | 39 |
import org.gvsig.andami.preferences.IPreferenceExtension; |
38 |
import org.gvsig.coreplugin.preferences.general.AppearancePage; |
|
39 | 40 |
import org.gvsig.coreplugin.preferences.general.BrowserControlPage; |
40 | 41 |
import org.gvsig.coreplugin.preferences.general.ExtensionPage; |
41 | 42 |
import org.gvsig.coreplugin.preferences.general.ExtensionsPage; |
... | ... | |
46 | 47 |
import org.gvsig.coreplugin.preferences.general.NotificationsPage; |
47 | 48 |
import org.gvsig.coreplugin.preferences.general.ScreenSettingsPage; |
48 | 49 |
import org.gvsig.coreplugin.preferences.general.SkinPreferences; |
50 |
import org.gvsig.coreplugin.preferences.general.appearance.AppearancePage; |
|
49 | 51 |
import org.gvsig.coreplugin.preferences.network.FirewallPage; |
50 | 52 |
import org.gvsig.coreplugin.preferences.network.NetworkPage; |
51 | 53 |
import org.gvsig.tools.ToolsLocator; |
54 |
import org.gvsig.tools.dynobject.DynObject; |
|
52 | 55 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
53 | 56 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
54 | 57 |
import org.gvsig.tools.i18n.I18nManager; |
58 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
55 | 59 |
|
56 | 60 |
import org.slf4j.Logger; |
57 | 61 |
import org.slf4j.LoggerFactory; |
... | ... | |
83 | 87 |
|
84 | 88 |
@Override |
85 | 89 |
public void initialize() { |
86 |
|
|
90 |
initializeUseNativeFileChooser(); |
|
87 | 91 |
registerIcons(); |
88 | 92 |
initializeCoreExtensions(); |
89 | 93 |
} |
90 | 94 |
|
95 |
private void initializeUseNativeFileChooser() { |
|
96 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
97 |
PluginServices plugin = pluginsManager.getPlugin(PreferencesExtension.class); |
|
98 |
|
|
99 |
DynObject pluginProperties = plugin.getPluginProperties(); |
|
100 |
|
|
101 |
boolean useNativeFileChooser = (Boolean) pluginProperties.getDynValue("useNativeFileChooser"); |
|
102 |
ToolsUtilLocator.getFileDialogChooserManager().setUseNativeFileChooser(useNativeFileChooser); |
|
103 |
} |
|
104 |
|
|
91 | 105 |
private void registerIcons() { |
92 | 106 |
IconThemeHelper.registerIcon("action", "edit-setup", this); |
93 | 107 |
IconThemeHelper.registerIcon("action", "application-exit", this); |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/preferences/general/AppearancePage.java | ||
---|---|---|
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 |
|
|
25 |
package org.gvsig.coreplugin.preferences.general; |
|
26 |
|
|
27 |
import java.awt.event.ActionEvent; |
|
28 |
import java.awt.event.ActionListener; |
|
29 |
import java.util.ArrayList; |
|
30 |
|
|
31 |
import javax.swing.ImageIcon; |
|
32 |
import javax.swing.JComboBox; |
|
33 |
import javax.swing.JPanel; |
|
34 |
import javax.swing.LookAndFeel; |
|
35 |
import javax.swing.UIManager; |
|
36 |
import javax.swing.UIManager.LookAndFeelInfo; |
|
37 |
import org.apache.commons.lang3.BooleanUtils; |
|
38 |
|
|
39 |
import org.slf4j.Logger; |
|
40 |
import org.slf4j.LoggerFactory; |
|
41 |
|
|
42 |
import org.gvsig.andami.Launcher; |
|
43 |
import org.gvsig.andami.PluginServices; |
|
44 |
import org.gvsig.andami.PluginsLocator; |
|
45 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
|
46 |
|
|
47 |
/** |
|
48 |
* Appearance page. Where the user can choose Look&Feels and maybe some more stuff. |
|
49 |
* |
|
50 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
|
51 |
* |
|
52 |
*/ |
|
53 |
public class AppearancePage extends AbstractPreferencePage{ |
|
54 |
private JComboBox lookAndFeelCombo; |
|
55 |
private String id; |
|
56 |
private ImageIcon icon; |
|
57 |
private String lookAndFeel; |
|
58 |
private boolean changed = false; |
|
59 |
private Logger logger = LoggerFactory.getLogger(this.getClass()); |
|
60 |
private PluginServices ps = PluginServices.getPluginServices(this); |
|
61 |
private ActionListener myAction; |
|
62 |
|
|
63 |
public AppearancePage() { |
|
64 |
super(); |
|
65 |
id = this.getClass().getName(); |
|
66 |
icon = PluginServices.getIconTheme().get("edit-setup-appearance"); |
|
67 |
setParentID(GeneralPage.id); |
|
68 |
// install the plastic look and feel before getting the laf combobox |
|
69 |
UIManager.installLookAndFeel("Plastic XP", "com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
70 |
// install the extra LAF's before getting the LAF combobox |
|
71 |
String osName = System.getProperty("os.name"); |
|
72 |
if (osName.toLowerCase().startsWith("mac os x")) { |
|
73 |
UIManager.installLookAndFeel("Quaqua", "ch.randelshofer.quaqua.QuaquaLookAndFeel"); |
|
74 |
} |
|
75 |
addComponent(PluginServices.getText(this, "options.general.select_theme"), getLookAndFeelComboBox()); |
|
76 |
myAction = new ActionListener() { |
|
77 |
public void actionPerformed(ActionEvent e) { |
|
78 |
lookAndFeel = ((LF) lookAndFeelCombo.getSelectedItem()).getClassName(); |
|
79 |
changed = true; |
|
80 |
|
|
81 |
/* Changing it on the fly can cause rendering issues |
|
82 |
try { |
|
83 |
UIManager.setLookAndFeel(lookAndFeel); |
|
84 |
SwingUtilities |
|
85 |
.updateComponentTreeUI((Component) PluginServices |
|
86 |
.getMainFrame()); |
|
87 |
} catch (Exception ex) { |
|
88 |
logger.warn(Messages.getString("Launcher.look_and_feel"), |
|
89 |
ex); |
|
90 |
} |
|
91 |
*/ |
|
92 |
} |
|
93 |
}; |
|
94 |
|
|
95 |
} |
|
96 |
|
|
97 |
public String getID() { |
|
98 |
return id; |
|
99 |
} |
|
100 |
|
|
101 |
public String getTitle() { |
|
102 |
return PluginServices.getText(this, "pref.appearance"); |
|
103 |
} |
|
104 |
|
|
105 |
public JPanel getPanel() { |
|
106 |
return this; |
|
107 |
} |
|
108 |
|
|
109 |
public void initializeValues() { |
|
110 |
getLookAndFeelComboBox().removeActionListener(myAction); |
|
111 |
lookAndFeel = Launcher.getAndamiConfig().getLookAndFeel(); |
|
112 |
if (lookAndFeel == null) { |
|
113 |
lookAndFeel = Launcher.getDefaultLookAndFeel(); |
|
114 |
} |
|
115 |
|
|
116 |
for (int i=0; i<getLookAndFeelComboBox().getModel().getSize(); i++) { |
|
117 |
LF element = (LF) getLookAndFeelComboBox().getModel().getElementAt(i); |
|
118 |
if (element.getClassName().equals(lookAndFeel)) { |
|
119 |
getLookAndFeelComboBox().setSelectedIndex(i); |
|
120 |
break; |
|
121 |
} |
|
122 |
} |
|
123 |
getLookAndFeelComboBox().addActionListener(myAction); |
|
124 |
} |
|
125 |
|
|
126 |
|
|
127 |
public void storeValues() { |
|
128 |
Launcher.getAndamiConfig().setLookAndFeel(lookAndFeel); |
|
129 |
} |
|
130 |
|
|
131 |
public void initializeDefaults() { |
|
132 |
// getLookAndFeelComboBox().removeActionListener(myAction); |
|
133 |
|
|
134 |
final String defaultLookAndFeel = Launcher.getDefaultLookAndFeel(); |
|
135 |
for (int i = 0; i < getLookAndFeelComboBox().getModel().getSize(); i++) { |
|
136 |
LF lf = (LF) getLookAndFeelComboBox().getModel().getElementAt(i); |
|
137 |
if (defaultLookAndFeel.equals(lf.getClassName())) { |
|
138 |
getLookAndFeelComboBox().setSelectedIndex(i); |
|
139 |
break; |
|
140 |
} |
|
141 |
} |
|
142 |
// getLookAndFeelComboBox().addActionListener(myAction); |
|
143 |
} |
|
144 |
|
|
145 |
public ImageIcon getIcon() { |
|
146 |
return icon; |
|
147 |
} |
|
148 |
|
|
149 |
private JComboBox getLookAndFeelComboBox() { |
|
150 |
if (lookAndFeelCombo==null) { |
|
151 |
boolean enablelaf = BooleanUtils.toBoolean(PluginServices.getArgumentByName("enablelaf")); |
|
152 |
if( enablelaf ) { |
|
153 |
LookAndFeelInfo[] lfs = UIManager.getInstalledLookAndFeels(); |
|
154 |
ArrayList a = new ArrayList(); |
|
155 |
for (int i = 0; i < lfs.length; i++) { |
|
156 |
LF lf = new LF(lfs[i]); |
|
157 |
|
|
158 |
// test if the look and feel is supported in this platform before adding it to the list |
|
159 |
Class lafClassDef; |
|
160 |
try { |
|
161 |
lafClassDef = Class.forName(lfs[i].getClassName()); |
|
162 |
LookAndFeel laf; |
|
163 |
laf = (LookAndFeel) lafClassDef.newInstance(); |
|
164 |
|
|
165 |
if (laf.isSupportedLookAndFeel()) { |
|
166 |
a.add(lf); |
|
167 |
} |
|
168 |
|
|
169 |
} catch (ClassNotFoundException e2) { |
|
170 |
logger.error(ps.getText("error_loading_look_and_feel_"+lfs[i].getName()), e2); |
|
171 |
} catch (InstantiationException e1) { |
|
172 |
logger.error(ps.getText("error_loading_look_and_feel_"+lfs[i].getName()), e1); |
|
173 |
} catch (IllegalAccessException e1) { |
|
174 |
logger.error(ps.getText("error_loading_look_and_feel_"+lfs[i].getName()), e1); |
|
175 |
} |
|
176 |
} |
|
177 |
lookAndFeelCombo = new JComboBox(a.toArray(new LF[a.size()])); |
|
178 |
} else { |
|
179 |
lookAndFeelCombo = new JComboBox(); |
|
180 |
} |
|
181 |
} |
|
182 |
return lookAndFeelCombo; |
|
183 |
} |
|
184 |
|
|
185 |
private class LF { |
|
186 |
LookAndFeelInfo lfi; |
|
187 |
|
|
188 |
public LF(LookAndFeelInfo lfi) { |
|
189 |
this.lfi = lfi; |
|
190 |
} |
|
191 |
|
|
192 |
public String getClassName() { |
|
193 |
return lfi.getClassName(); |
|
194 |
} |
|
195 |
|
|
196 |
public String toString() { |
|
197 |
return lfi.getName(); |
|
198 |
} |
|
199 |
} |
|
200 |
|
|
201 |
public boolean isValueChanged() { |
|
202 |
return changed; |
|
203 |
} |
|
204 |
|
|
205 |
public void setChangesApplied() { |
|
206 |
changed = false; |
|
207 |
} |
|
208 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/preferences/general/appearance/AppearancePageView.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
|
|
3 |
<object classname="com.jeta.forms.store.memento.FormPackage"> |
|
4 |
<at name="fileversion"> |
|
5 |
<object classname="com.jeta.forms.store.memento.FormsVersion2"> |
|
6 |
<at name="major">2</at> |
|
7 |
<at name="minor">0</at> |
|
8 |
<at name="sub">0</at> |
|
9 |
</object> |
|
10 |
</at> |
|
11 |
<at name="form"> |
|
12 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
13 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
14 |
<at name="cellconstraints"> |
|
15 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
16 |
<at name="column">1</at> |
|
17 |
<at name="row">1</at> |
|
18 |
<at name="colspan">1</at> |
|
19 |
<at name="rowspan">1</at> |
|
20 |
<at name="halign">default</at> |
|
21 |
<at name="valign">default</at> |
|
22 |
<at name="insets" object="insets">0,0,0,0</at> |
|
23 |
</object> |
|
24 |
</at> |
|
25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
26 |
</super> |
|
27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/preferences/general/appearance/AppearancePageView.xml</at> |
|
28 |
<at name="path">datos/devel/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/preferences/general/appearance/AppearancePageView.xml</at> |
|
29 |
<at name="rowspecs">CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE</at> |
|
30 |
<at name="colspecs">FILL:4DLU:NONE,LEFT:DEFAULT:GROW(1.0),FILL:4DLU:NONE</at> |
|
31 |
<at name="components"> |
|
32 |
<object classname="java.util.LinkedList"> |
|
33 |
<item > |
|
34 |
<at name="value"> |
|
35 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
36 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
37 |
<at name="cellconstraints"> |
|
38 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
39 |
<at name="column">2</at> |
|
40 |
<at name="row">2</at> |
|
41 |
<at name="colspan">1</at> |
|
42 |
<at name="rowspan">1</at> |
|
43 |
<at name="halign">default</at> |
|
44 |
<at name="valign">default</at> |
|
45 |
<at name="insets" object="insets">0,0,0,0</at> |
|
46 |
</object> |
|
47 |
</at> |
|
48 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
49 |
</super> |
|
50 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
51 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
52 |
<at name="beanproperties"> |
|
53 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
54 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
55 |
<at name="properties"> |
|
56 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
57 |
<at name="border"> |
|
58 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
59 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
60 |
<at name="name">border</at> |
|
61 |
</super> |
|
62 |
<at name="borders"> |
|
63 |
<object classname="java.util.LinkedList"> |
|
64 |
<item > |
|
65 |
<at name="value"> |
|
66 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
67 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
68 |
<at name="name">border</at> |
|
69 |
</super> |
|
70 |
</object> |
|
71 |
</at> |
|
72 |
</item> |
|
73 |
</object> |
|
74 |
</at> |
|
75 |
</object> |
|
76 |
</at> |
|
77 |
<at name="name">lbllookAndFeel</at> |
|
78 |
<at name="width">90</at> |
|
79 |
<at name="text">Usar apariencia</at> |
|
80 |
<at name="fill"> |
|
81 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
82 |
<at name="name">fill</at> |
|
83 |
</object> |
|
84 |
</at> |
|
85 |
<at name="height">14</at> |
|
86 |
</object> |
|
87 |
</at> |
|
88 |
</object> |
|
89 |
</at> |
|
90 |
</object> |
|
91 |
</at> |
|
92 |
</item> |
|
93 |
<item > |
|
94 |
<at name="value"> |
|
95 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
96 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
97 |
<at name="cellconstraints"> |
|
98 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
99 |
<at name="column">2</at> |
|
100 |
<at name="row">4</at> |
|
101 |
<at name="colspan">1</at> |
|
102 |
<at name="rowspan">1</at> |
|
103 |
<at name="halign">fill</at> |
|
104 |
<at name="valign">default</at> |
|
105 |
<at name="insets" object="insets">0,0,0,0</at> |
|
106 |
</object> |
|
107 |
</at> |
|
108 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
109 |
</super> |
|
110 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
111 |
<at name="beanclass">javax.swing.JComboBox</at> |
|
112 |
<at name="beanproperties"> |
|
113 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
114 |
<at name="classname">javax.swing.JComboBox</at> |
|
115 |
<at name="properties"> |
|
116 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
117 |
<at name="border"> |
|
118 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
119 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
120 |
<at name="name">border</at> |
|
121 |
</super> |
|
122 |
<at name="borders"> |
|
123 |
<object classname="java.util.LinkedList"> |
|
124 |
<item > |
|
125 |
<at name="value"> |
|
126 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
127 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
128 |
<at name="name">border</at> |
|
129 |
</super> |
|
130 |
</object> |
|
131 |
</at> |
|
132 |
</item> |
|
133 |
</object> |
|
134 |
</at> |
|
135 |
</object> |
|
136 |
</at> |
|
137 |
<at name="name">cboLookAndFeel</at> |
|
138 |
<at name="width">611</at> |
|
139 |
<at name="items"> |
|
140 |
<object classname="com.jeta.forms.store.properties.ItemsProperty"> |
|
141 |
<at name="name">items</at> |
|
142 |
</object> |
|
143 |
</at> |
|
144 |
<at name="height">20</at> |
|
145 |
</object> |
|
146 |
</at> |
|
147 |
</object> |
|
148 |
</at> |
|
149 |
</object> |
|
150 |
</at> |
|
151 |
</item> |
|
152 |
<item > |
|
153 |
<at name="value"> |
|
154 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
155 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
156 |
<at name="cellconstraints"> |
|
157 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
158 |
<at name="column">2</at> |
|
159 |
<at name="row">8</at> |
|
160 |
<at name="colspan">1</at> |
|
161 |
<at name="rowspan">1</at> |
|
162 |
<at name="halign">default</at> |
|
163 |
<at name="valign">default</at> |
|
164 |
<at name="insets" object="insets">0,0,0,0</at> |
|
165 |
</object> |
|
166 |
</at> |
|
167 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
168 |
</super> |
|
169 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
170 |
<at name="beanclass">javax.swing.JCheckBox</at> |
|
171 |
<at name="beanproperties"> |
|
172 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
173 |
<at name="classname">javax.swing.JCheckBox</at> |
|
174 |
<at name="properties"> |
|
175 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
176 |
<at name="border"> |
|
177 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
178 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
179 |
<at name="name">border</at> |
|
180 |
</super> |
|
181 |
<at name="borders"> |
|
182 |
<object classname="java.util.LinkedList"> |
|
183 |
<item > |
|
184 |
<at name="value"> |
|
185 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
186 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
187 |
<at name="name">border</at> |
|
188 |
</super> |
|
189 |
</object> |
|
190 |
</at> |
|
191 |
</item> |
|
192 |
</object> |
|
193 |
</at> |
|
194 |
</object> |
|
195 |
</at> |
|
196 |
<at name="actionCommand">Usar selector de ficheros nativo</at> |
|
197 |
<at name="name">chkUseNativeFileChooser</at> |
|
198 |
<at name="width">202</at> |
|
199 |
<at name="text">Usar selector de ficheros nativo</at> |
|
200 |
<at name="height">16</at> |
|
201 |
</object> |
|
202 |
</at> |
|
203 |
</object> |
|
204 |
</at> |
|
205 |
</object> |
|
206 |
</at> |
|
207 |
</item> |
|
208 |
<item > |
|
209 |
<at name="value"> |
|
210 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
211 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
212 |
<at name="cellconstraints"> |
|
213 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
214 |
<at name="column">2</at> |
|
215 |
<at name="row">6</at> |
|
216 |
<at name="colspan">1</at> |
|
217 |
<at name="rowspan">1</at> |
|
218 |
<at name="halign">right</at> |
|
219 |
<at name="valign">default</at> |
|
220 |
<at name="insets" object="insets">0,0,0,0</at> |
|
221 |
</object> |
|
222 |
</at> |
|
223 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
224 |
</super> |
|
225 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
226 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
227 |
<at name="beanproperties"> |
|
228 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
229 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
230 |
<at name="properties"> |
|
231 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
232 |
<at name="border"> |
|
233 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
234 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
235 |
<at name="name">border</at> |
|
236 |
</super> |
|
237 |
<at name="borders"> |
|
238 |
<object classname="java.util.LinkedList"> |
|
239 |
<item > |
|
240 |
<at name="value"> |
|
241 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
242 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
243 |
<at name="name">border</at> |
|
244 |
</super> |
|
245 |
</object> |
|
246 |
</at> |
|
247 |
</item> |
|
248 |
</object> |
|
249 |
</at> |
|
250 |
</object> |
|
251 |
</at> |
|
252 |
<at name="name">lblNeedRestart</at> |
|
253 |
<at name="width">256</at> |
|
254 |
<at name="text">(Debera reiniciar para cambiar la apariencia)</at> |
|
255 |
<at name="fill"> |
|
256 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
257 |
<at name="name">fill</at> |
|
258 |
</object> |
|
259 |
</at> |
|
260 |
<at name="height">14</at> |
|
261 |
</object> |
|
262 |
</at> |
|
263 |
</object> |
|
264 |
</at> |
|
265 |
</object> |
|
266 |
</at> |
|
267 |
</item> |
|
268 |
</object> |
|
269 |
</at> |
|
270 |
<at name="properties"> |
|
271 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
272 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
273 |
<at name="properties"> |
|
274 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
275 |
<at name="border"> |
|
276 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
277 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
278 |
<at name="name">border</at> |
|
279 |
</super> |
|
280 |
<at name="borders"> |
|
281 |
<object classname="java.util.LinkedList"/> |
|
282 |
</at> |
|
283 |
</object> |
|
284 |
</at> |
|
285 |
<at name="name"/> |
|
286 |
<at name="fill"> |
|
287 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
288 |
<at name="name">fill</at> |
|
289 |
</object> |
|
290 |
</at> |
|
291 |
<at name="scollBars"> |
|
292 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
293 |
<at name="name">scollBars</at> |
|
294 |
<at name="verticalpolicy">21</at> |
|
295 |
<at name="horizontalpolicy">31</at> |
|
296 |
<at name="border"> |
|
297 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
298 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
299 |
<at name="name">border</at> |
|
300 |
</super> |
|
301 |
<at name="borders"> |
|
302 |
<object classname="java.util.LinkedList"> |
|
303 |
<item > |
|
304 |
<at name="value"> |
|
305 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
306 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
307 |
<at name="name">border</at> |
|
308 |
</super> |
|
309 |
</object> |
|
310 |
</at> |
|
311 |
</item> |
|
312 |
</object> |
|
313 |
</at> |
|
314 |
</object> |
|
315 |
</at> |
|
316 |
</object> |
|
317 |
</at> |
|
318 |
</object> |
|
319 |
</at> |
|
320 |
</object> |
|
321 |
</at> |
|
322 |
<at name="cellpainters"> |
|
323 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
324 |
<at name="rows"> |
|
325 |
<object classname="[Ljava.lang.Object;" size="10"> |
|
326 |
<at name="item" index="0"> |
|
327 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
328 |
</at> |
|
329 |
<at name="item" index="1"> |
|
330 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
331 |
</at> |
|
332 |
<at name="item" index="2"> |
|
333 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
334 |
</at> |
|
335 |
<at name="item" index="3"> |
|
336 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
337 |
</at> |
|
338 |
<at name="item" index="4"> |
|
339 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
340 |
</at> |
|
341 |
<at name="item" index="5"> |
|
342 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
343 |
</at> |
|
344 |
<at name="item" index="6"> |
|
345 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
346 |
</at> |
|
347 |
<at name="item" index="7"> |
|
348 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
349 |
</at> |
|
350 |
<at name="item" index="8"> |
|
351 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
352 |
</at> |
|
353 |
<at name="item" index="9"> |
|
354 |
<object classname="[Ljava.lang.Object;" size="3"/> |
|
355 |
</at> |
|
356 |
</object> |
|
357 |
</at> |
|
358 |
</object> |
|
359 |
</at> |
|
360 |
<at name="rowgroups"> |
|
361 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
362 |
<at name="groups"> |
|
363 |
<object classname="java.util.HashMap"/> |
|
364 |
</at> |
|
365 |
</object> |
|
366 |
</at> |
|
367 |
<at name="colgroups"> |
|
368 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
369 |
<at name="groups"> |
|
370 |
<object classname="java.util.HashMap"/> |
|
371 |
</at> |
|
372 |
</object> |
|
373 |
</at> |
|
374 |
</object> |
|
375 |
</at> |
|
376 |
</object> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/preferences/general/appearance/AppearancePageView.java | ||
---|---|---|
1 |
package org.gvsig.coreplugin.preferences.general.appearance; |
|
2 |
|
|
3 |
import com.jeta.open.i18n.I18NUtils; |
|
4 |
import com.jgoodies.forms.layout.CellConstraints; |
|
5 |
import com.jgoodies.forms.layout.FormLayout; |
|
6 |
import java.awt.BorderLayout; |
|
7 |
import java.awt.ComponentOrientation; |
|
8 |
import java.awt.Container; |
|
9 |
import java.awt.Dimension; |
|
10 |
import javax.swing.Box; |
|
11 |
import javax.swing.ImageIcon; |
|
12 |
import javax.swing.JCheckBox; |
|
13 |
import javax.swing.JComboBox; |
|
14 |
import javax.swing.JFrame; |
|
15 |
import javax.swing.JLabel; |
|
16 |
import javax.swing.JPanel; |
|
17 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
|
18 |
|
|
19 |
|
|
20 |
public abstract class AppearancePageView extends AbstractPreferencePage |
|
21 |
{ |
|
22 |
JLabel lbllookAndFeel = new JLabel(); |
|
23 |
JComboBox cboLookAndFeel = new JComboBox(); |
|
24 |
JCheckBox chkUseNativeFileChooser = new JCheckBox(); |
|
25 |
JLabel lblNeedRestart = new JLabel(); |
|
26 |
|
|
27 |
/** |
|
28 |
* Default constructor |
|
29 |
*/ |
|
30 |
public AppearancePageView() |
|
31 |
{ |
|
32 |
initializePanel(); |
|
33 |
} |
|
34 |
|
|
35 |
/** |
|
36 |
* Adds fill components to empty cells in the first row and first column of the grid. |
|
37 |
* This ensures that the grid spacing will be the same as shown in the designer. |
|
38 |
* @param cols an array of column indices in the first row where fill components should be added. |
|
39 |
* @param rows an array of row indices in the first column where fill components should be added. |
|
40 |
*/ |
|
41 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
|
42 |
{ |
|
43 |
Dimension filler = new Dimension(10,10); |
|
44 |
|
|
45 |
boolean filled_cell_11 = false; |
|
46 |
CellConstraints cc = new CellConstraints(); |
|
47 |
if ( cols.length > 0 && rows.length > 0 ) |
|
48 |
{ |
|
49 |
if ( cols[0] == 1 && rows[0] == 1 ) |
|
50 |
{ |
|
51 |
/** add a rigid area */ |
|
52 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
|
53 |
filled_cell_11 = true; |
|
54 |
} |
|
55 |
} |
|
56 |
|
|
57 |
for( int index = 0; index < cols.length; index++ ) |
|
58 |
{ |
|
59 |
if ( cols[index] == 1 && filled_cell_11 ) |
|
60 |
{ |
|
61 |
continue; |
|
62 |
} |
|
63 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
|
64 |
} |
|
65 |
|
|
66 |
for( int index = 0; index < rows.length; index++ ) |
|
67 |
{ |
|
68 |
if ( rows[index] == 1 && filled_cell_11 ) |
|
69 |
{ |
|
70 |
continue; |
|
71 |
} |
|
72 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
|
73 |
} |
|
74 |
|
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* Helper method to load an image file from the CLASSPATH |
|
79 |
* @param imageName the package and name of the file to load relative to the CLASSPATH |
|
80 |
* @return an ImageIcon instance with the specified image file |
|
81 |
* @throws IllegalArgumentException if the image resource cannot be loaded. |
|
82 |
*/ |
|
83 |
public ImageIcon loadImage( String imageName ) |
|
84 |
{ |
|
85 |
try |
|
86 |
{ |
|
87 |
ClassLoader classloader = getClass().getClassLoader(); |
|
88 |
java.net.URL url = classloader.getResource( imageName ); |
|
89 |
if ( url != null ) |
|
90 |
{ |
|
91 |
ImageIcon icon = new ImageIcon( url ); |
|
92 |
return icon; |
|
93 |
} |
|
94 |
} |
|
95 |
catch( Exception e ) |
|
96 |
{ |
|
97 |
e.printStackTrace(); |
|
98 |
} |
|
99 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
|
100 |
} |
|
101 |
|
|
102 |
/** |
|
103 |
* Method for recalculating the component orientation for |
|
104 |
* right-to-left Locales. |
|
105 |
* @param orientation the component orientation to be applied |
|
106 |
*/ |
|
107 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
|
108 |
{ |
|
109 |
// Not yet implemented... |
|
110 |
// I18NUtils.applyComponentOrientation(this, orientation); |
|
111 |
super.applyComponentOrientation(orientation); |
|
112 |
} |
|
113 |
|
|
114 |
public JPanel createPanel() |
|
115 |
{ |
|
116 |
JPanel jpanel1 = new JPanel(); |
|
117 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,LEFT:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE"); |
|
118 |
CellConstraints cc = new CellConstraints(); |
|
119 |
jpanel1.setLayout(formlayout1); |
|
120 |
|
|
121 |
lbllookAndFeel.setName("lbllookAndFeel"); |
|
122 |
lbllookAndFeel.setText("Usar apariencia"); |
|
123 |
jpanel1.add(lbllookAndFeel,cc.xy(2,2)); |
|
124 |
|
|
125 |
cboLookAndFeel.setName("cboLookAndFeel"); |
|
126 |
jpanel1.add(cboLookAndFeel,new CellConstraints(2,4,1,1,CellConstraints.FILL,CellConstraints.DEFAULT)); |
|
127 |
|
|
128 |
chkUseNativeFileChooser.setActionCommand("Usar selector de ficheros nativo"); |
|
129 |
chkUseNativeFileChooser.setName("chkUseNativeFileChooser"); |
|
130 |
chkUseNativeFileChooser.setText("Usar selector de ficheros nativo"); |
|
131 |
jpanel1.add(chkUseNativeFileChooser,cc.xy(2,8)); |
|
132 |
|
|
133 |
lblNeedRestart.setName("lblNeedRestart"); |
|
134 |
lblNeedRestart.setText("(Debera reiniciar para cambiar la apariencia)"); |
|
135 |
jpanel1.add(lblNeedRestart,new CellConstraints(2,6,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT)); |
|
136 |
|
|
137 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9,10 }); |
|
138 |
return jpanel1; |
|
139 |
} |
|
140 |
|
|
141 |
/** |
|
142 |
* Initializer |
|
143 |
*/ |
|
144 |
protected void initializePanel() |
|
145 |
{ |
|
146 |
setLayout(new BorderLayout()); |
|
147 |
add(createPanel(), BorderLayout.CENTER); |
|
148 |
} |
|
149 |
|
|
150 |
|
|
151 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/java/org/gvsig/coreplugin/preferences/general/appearance/AppearancePage.java | ||
---|---|---|
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 |
package org.gvsig.coreplugin.preferences.general.appearance; |
|
25 |
|
|
26 |
import java.util.ArrayList; |
|
27 |
import java.util.List; |
|
28 |
import javax.swing.DefaultComboBoxModel; |
|
29 |
import javax.swing.ImageIcon; |
|
30 |
import javax.swing.JPanel; |
|
31 |
import javax.swing.LookAndFeel; |
|
32 |
import javax.swing.UIManager; |
|
33 |
import javax.swing.UIManager.LookAndFeelInfo; |
|
34 |
import org.apache.commons.lang3.BooleanUtils; |
|
35 |
import org.apache.commons.lang3.StringUtils; |
|
36 |
import org.gvsig.andami.IconThemeHelper; |
|
37 |
import org.gvsig.andami.Launcher; |
|
38 |
import org.gvsig.andami.PluginServices; |
|
39 |
import org.gvsig.andami.PluginsLocator; |
|
40 |
import org.gvsig.andami.PluginsManager; |
|
41 |
import org.gvsig.andami.preferences.IPreference; |
|
42 |
import org.gvsig.andami.preferences.StoreException; |
|
43 |
import org.gvsig.coreplugin.PreferencesExtension; |
|
44 |
import org.gvsig.coreplugin.preferences.general.GeneralPage; |
|
45 |
import org.gvsig.tools.ToolsLocator; |
|
46 |
import org.gvsig.tools.dynobject.DynObject; |
|
47 |
import org.gvsig.tools.i18n.I18nManager; |
|
48 |
import org.gvsig.tools.util.ToolsUtilLocator; |
|
49 |
import org.slf4j.Logger; |
|
50 |
import org.slf4j.LoggerFactory; |
|
51 |
|
|
52 |
/** |
|
53 |
* Appearance page. Where the user can choose Look&Feels and maybe some more |
|
54 |
* stuff. |
|
55 |
*/ |
|
56 |
public class AppearancePage extends AppearancePageView implements IPreference { |
|
57 |
// |
|
58 |
// The class AppearancePageView can extend from AbstractPreferencePage, not JPanel, |
|
59 |
// if rereate it from the GUI builder change te class declaration to: |
|
60 |
// public abstract class AppearancePageView extends AbstractPreferencePage |
|
61 |
|
|
62 |
private static final long serialVersionUID = 9004756473020260443L; |
|
63 |
|
|
64 |
private static final Logger logger = LoggerFactory.getLogger(AppearancePage.class); |
|
65 |
|
|
66 |
public static String id = AppearancePage.class.getName(); |
|
67 |
private ImageIcon icon; |
|
68 |
private boolean enableLookAndFeel = true; |
|
69 |
private final String defaultLookAndFeel; |
|
70 |
|
|
71 |
public static class ListElement<T> { |
|
72 |
|
|
73 |
private final String label; |
|
74 |
private final T value; |
|
75 |
|
|
76 |
public ListElement(String label, T value) { |
|
77 |
this.label = label; |
|
78 |
this.value = value; |
|
79 |
} |
|
80 |
|
|
81 |
@Override |
|
82 |
public String toString() { |
|
83 |
return this.label; |
|
84 |
} |
|
85 |
|
|
86 |
public T getValue() { |
|
87 |
return this.value; |
|
88 |
} |
|
89 |
} |
|
90 |
|
|
91 |
public AppearancePage() { |
|
92 |
setParentID(GeneralPage.id); |
|
93 |
installDefaultLookAndFeel(); |
|
94 |
this.defaultLookAndFeel = Launcher.getDefaultLookAndFeel(); |
|
95 |
this.enableLookAndFeel = BooleanUtils.toBoolean(PluginServices.getArgumentByName("enablelaf")); |
|
96 |
this.initComponents(); |
|
97 |
} |
|
98 |
|
|
99 |
private void installDefaultLookAndFeel() { |
|
100 |
try { |
|
101 |
// install the plastic look and feel before getting the laf combobox |
|
102 |
UIManager.installLookAndFeel("Plastic XP", "com.jgoodies.looks.plastic.PlasticXPLookAndFeel"); |
|
103 |
// install the extra LAF's before getting the LAF combobox |
|
104 |
String osName = System.getProperty("os.name"); |
|
105 |
if( osName.toLowerCase().startsWith("mac os x") ) { |
|
106 |
UIManager.installLookAndFeel("Quaqua", "ch.randelshofer.quaqua.QuaquaLookAndFeel"); |
|
107 |
} |
|
108 |
} catch (Throwable th) { |
|
109 |
logger.warn("Problems installing default look and feel", th); |
|
110 |
} |
|
111 |
} |
|
112 |
|
|
113 |
private LookAndFeelInfo[] getSupportedsLookAndFeels() { |
|
114 |
if( !this.enableLookAndFeel ) { |
|
115 |
return null; |
|
116 |
} |
|
117 |
List<LookAndFeelInfo> supporteds = new ArrayList(); |
|
118 |
try { |
|
119 |
LookAndFeelInfo[] installedLookAndFeels = UIManager.getInstalledLookAndFeels(); |
|
120 |
for( LookAndFeelInfo lookAndfeelInfo : installedLookAndFeels ) { |
|
121 |
try { |
|
122 |
Class<?> lookAndFeelClass = Class.forName(lookAndfeelInfo.getClassName()); |
|
123 |
LookAndFeel lookAndFeel = (LookAndFeel) lookAndFeelClass.newInstance(); |
|
124 |
if( lookAndFeel.isSupportedLookAndFeel() ) { |
|
125 |
supporteds.add(lookAndfeelInfo); |
|
126 |
} |
|
127 |
} catch (Throwable th) { |
|
128 |
|
|
129 |
} |
|
130 |
} |
|
131 |
} catch (Throwable th) { |
|
132 |
return null; |
|
133 |
} |
|
134 |
if( supporteds.isEmpty() ) { |
|
135 |
return null; |
|
136 |
} |
|
137 |
return supporteds.toArray(new LookAndFeelInfo[supporteds.size()]); |
|
138 |
} |
|
139 |
|
|
140 |
private void initComponents() { |
|
141 |
icon = IconThemeHelper.getImageIcon("edit-setup-appearance"); |
|
142 |
LookAndFeelInfo[] lafs = this.getSupportedsLookAndFeels(); |
|
143 |
if( lafs == null ) { |
|
144 |
this.cboLookAndFeel.setEnabled(false); |
|
145 |
} else { |
|
146 |
DefaultComboBoxModel model = new DefaultComboBoxModel(); |
|
147 |
for( LookAndFeelInfo laf : lafs ) { |
|
148 |
model.addElement(new ListElement<>(laf.getName(), laf)); |
|
149 |
} |
|
150 |
this.cboLookAndFeel.setModel(model); |
|
151 |
this.cboLookAndFeel.setEnabled(true); |
|
152 |
} |
|
153 |
this.translateAll(); |
|
154 |
} |
|
155 |
|
|
156 |
private void translateAll() { |
|
157 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
|
158 |
this.lblNeedRestart.setText("("+i18n.getTranslation("Los_cambios_efectuados_sobre_estos_valores_se_aplicaran_al_reiniciar_la_aplicacion")+")"); |
|
159 |
this.lbllookAndFeel.setText(i18n.getTranslation("options.general.select_theme")); |
|
160 |
this.chkUseNativeFileChooser.setText(i18n.getTranslation("_use_native_file_dialog_chooser")); |
|
161 |
} |
|
162 |
|
|
163 |
@Override |
|
164 |
public boolean isResizeable() { |
|
165 |
return true; |
|
166 |
} |
|
167 |
|
|
168 |
@Override |
|
169 |
public void initializeValues() { |
|
170 |
this.initializeDefaults(); |
|
171 |
this.chkUseNativeFileChooser.setSelected(ToolsUtilLocator.getFileDialogChooserManager().useNativeFileChooser()); |
|
172 |
} |
|
173 |
|
|
174 |
@Override |
|
175 |
public void initializeDefaults() { |
|
176 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
177 |
PluginServices plugin = pluginsManager.getPlugin(PreferencesExtension.class); |
|
178 |
|
|
179 |
DynObject pluginProperties = plugin.getPluginProperties(); |
|
180 |
|
|
181 |
this.chkUseNativeFileChooser.setSelected((Boolean) pluginProperties.getDynValue("useNativeFileChooser")); |
|
182 |
|
|
183 |
if( this.cboLookAndFeel.getModel().getSize()>0 ) { |
|
184 |
this.cboLookAndFeel.setSelectedIndex(0); |
|
185 |
if( !StringUtils.isEmpty(defaultLookAndFeel) ) { |
|
186 |
DefaultComboBoxModel<ListElement<LookAndFeelInfo>> model = (DefaultComboBoxModel<ListElement<LookAndFeelInfo>>) this.cboLookAndFeel.getModel(); |
|
187 |
for( int i=0; i<model.getSize() ; i++ ) { |
|
188 |
ListElement<LookAndFeelInfo> element = model.getElementAt(i); |
|
189 |
if( defaultLookAndFeel.equals(element.getValue().getClassName()) ) { |
|
190 |
this.cboLookAndFeel.setSelectedIndex(i); |
|
191 |
break; |
|
192 |
} |
|
193 |
} |
|
194 |
} |
|
195 |
this.cboLookAndFeel.setEnabled(true); |
|
196 |
} else { |
|
197 |
this.cboLookAndFeel.setEnabled(false); |
|
198 |
} |
|
199 |
} |
|
200 |
|
|
201 |
@Override |
|
202 |
public String getID() { |
|
203 |
return id; |
|
204 |
} |
|
205 |
|
|
206 |
@Override |
|
207 |
public String getTitle() { |
|
208 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
209 |
return i18nManager.getTranslation("pref.appearance"); |
|
210 |
} |
|
211 |
|
|
212 |
@Override |
|
213 |
public JPanel getPanel() { |
|
214 |
return this; |
|
215 |
} |
|
216 |
|
|
217 |
@Override |
|
218 |
public void storeValues() throws StoreException { |
|
219 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
220 |
PluginServices plugin = pluginsManager.getPlugin(PreferencesExtension.class); |
|
221 |
|
|
222 |
DynObject pluginProperties = plugin.getPluginProperties(); |
|
223 |
|
|
224 |
pluginProperties.setDynValue("useNativeFileChooser", this.chkUseNativeFileChooser.isSelected()); |
|
225 |
ToolsUtilLocator.getFileDialogChooserManager().setUseNativeFileChooser(this.chkUseNativeFileChooser.isSelected()); |
|
226 |
|
|
227 |
if( this.cboLookAndFeel.isEnabled() ) { |
|
228 |
ListElement<LookAndFeelInfo> element = (ListElement<LookAndFeelInfo>) this.cboLookAndFeel.getSelectedItem(); |
|
229 |
if( element!=null ) { |
|
230 |
String lookAndFeel = element.getValue().getClassName(); |
|
231 |
Launcher.getAndamiConfig().setLookAndFeel(lookAndFeel); |
|
232 |
} |
|
233 |
} |
|
234 |
} |
|
235 |
|
|
236 |
@Override |
|
237 |
public ImageIcon getIcon() { |
|
238 |
return icon; |
|
239 |
} |
|
240 |
|
|
241 |
@Override |
|
242 |
public boolean isValueChanged() { |
|
243 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
244 |
PluginServices plugin = pluginsManager.getPlugin(PreferencesExtension.class); |
|
245 |
|
|
246 |
DynObject pluginProperties = plugin.getPluginProperties(); |
|
247 |
|
|
248 |
boolean changed = false; |
|
249 |
|
|
250 |
if( !changed ) { |
|
251 |
changed = this.chkUseNativeFileChooser.isSelected() != ToolsUtilLocator.getFileDialogChooserManager().useNativeFileChooser(); |
|
252 |
} |
|
253 |
if( changed ) { |
|
254 |
if( this.cboLookAndFeel.isEnabled() ) { |
|
255 |
ListElement<LookAndFeelInfo> element = (ListElement<LookAndFeelInfo>) this.cboLookAndFeel.getSelectedItem(); |
|
256 |
if( element!=null ) { |
|
257 |
changed = element.getValue().getClassName().equalsIgnoreCase(defaultLookAndFeel); |
|
258 |
} |
|
259 |
} |
|
260 |
} |
|
261 |
return changed; |
|
262 |
} |
|
263 |
|
|
264 |
@Override |
|
265 |
public void setChangesApplied() { |
|
266 |
// Do nothing |
|
267 |
} |
|
268 |
|
|
269 |
} |
|
0 | 270 |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/resources-plugin/plugin-persistence.def | ||
---|---|---|
15 | 15 |
<field name="showNotificationsInStatusbar" type="Boolean" defaultValue="true" mandatory="false"> |
16 | 16 |
<description></description> |
17 | 17 |
</field> |
18 |
<field name="useNativeFileChooser" type="Boolean" mandatory="false" defaultValue="true"> |
|
19 |
<description></description> |
|
20 |
</field> |
|
21 |
|
|
18 | 22 |
|
19 | 23 |
</fields> |
20 | 24 |
</class> |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
53 | 53 |
options.general.browser.specify_a_command=<html>Ejecutar un comando propio.<br>Ej.: firefox %url <br>(donde %url es la URL a cargar)</html>. |
54 | 54 |
options.general.remember_windows_pos=Recordar la posici\u00f3n de las ventanas. |
55 | 55 |
options.general.remember_windows_size=Recordar el tama\u00f1o de las ventanas. |
56 |
options.general.select_theme=Usar apariencia (requiere reiniciar)
|
|
56 |
options.general.select_theme=Usar apariencia |
|
57 | 57 |
options.network.click_to_test_connection=Pulse el bot\u00f3n para comprobar la conexi\u00f3n |
58 | 58 |
options.network.status=Estado de la conexi\u00f3n |
59 | 59 |
pref.appearance=Apariencia |
... | ... | |
91 | 91 |
Show_notifications_in_the_console_window=Mostrar las notificaciones en la ventana de la consola |
92 | 92 |
Show_notifications_in_the_statusbar=Mostrar las notificaciones en la linea de estado |
93 | 93 |
extension_does_not_provide_preferences_pages=La extension {0} no provee p\u00e1ginas de preferencias |
94 |
cant_initialize_values_for_{0}_page_in_{1}=No se ha podido inicializar los valores de la p\u00e1gina {0} de la extension {1} |
|
94 |
cant_initialize_values_for_{0}_page_in_{1}=No se ha podido inicializar los valores de la p\u00e1gina {0} de la extension {1} |
|
95 |
_use_native_file_dialog_chooser=Usar dialogo de seleccion de ficheros nativo |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.coreplugin.app/org.gvsig.coreplugin.app.mainplugin/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
53 | 53 |
options.general.browser.specify_a_command=<html>Run a custom command.<br>Ie firefox %url<br>(where %url will be the URL to load)</html>. |
54 | 54 |
options.general.remember_windows_pos=Remember window position. |
55 | 55 |
options.general.remember_windows_size=Remebember window size. |
56 |
options.general.select_theme=Use appearance (requires restart)
|
|
56 |
options.general.select_theme=Use appearance |
|
57 | 57 |
options.network.click_to_test_connection=Press button to test the connection |
58 | 58 |
options.network.status=Network status |
59 | 59 |
pref.appearance=Appearance |
... | ... | |
83 | 83 |
_Export_default_icon_theme=Export default icon theme |
84 | 84 |
_Icon_theme=Icon theme |
85 | 85 |
extension_does_not_provide_preferences_pages={0} extension does not provide preferences pages |
86 |
cant_initialize_values_for_{0}_page_in_{1}=cant initialize values for {0} page in {1} |
|
86 |
cant_initialize_values_for_{0}_page_in_{1}=cant initialize values for {0} page in {1} |
|
87 |
_use_native_file_dialog_chooser=Use native file dialog chooser |
trunk/org.gvsig.desktop/pom.xml | ||
---|---|---|
2608 | 2608 |
|
2609 | 2609 |
<jython.artifactId>jython-standalone</jython.artifactId> |
2610 | 2610 |
<!-- External project versions --> |
2611 |
<gvsig.tools.version>3.0.117</gvsig.tools.version>
|
|
2611 |
<gvsig.tools.version>3.0.119</gvsig.tools.version>
|
|
2612 | 2612 |
<gvsig.proj.version>1.0.4</gvsig.proj.version> |
2613 | 2613 |
<gvsig.projection.api.version>2.0.25</gvsig.projection.api.version> |
2614 | 2614 |
|
Also available in: Unified diff