svn-gvsig-desktop / 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 / GeneralPage.java @ 40558
History | View | Annotate | Download (2.88 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 |
package org.gvsig.coreplugin.preferences.general; |
25 |
|
26 |
import javax.swing.ImageIcon; |
27 |
import javax.swing.JCheckBox; |
28 |
import javax.swing.JPanel; |
29 |
|
30 |
import org.gvsig.andami.PluginServices; |
31 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
32 |
|
33 |
/**
|
34 |
* First default page in the Preferences Dialog. It is supposed to be
|
35 |
* used to hold simple user interaction settings such as:
|
36 |
* <ol>
|
37 |
* <li>
|
38 |
* Window positions.
|
39 |
* </li>
|
40 |
* <li>
|
41 |
* Mouse behaviors (double click vs. simple click).
|
42 |
* </li>
|
43 |
* <li>
|
44 |
* Users' language preferences.
|
45 |
* </li>
|
46 |
* <li>
|
47 |
* Confirm overwriting files.
|
48 |
* </li>
|
49 |
* <li>
|
50 |
* Toolbars config
|
51 |
* </li>
|
52 |
* </ol>
|
53 |
*
|
54 |
* @author jaume dominguez faus - jaume.dominguez@iver.es
|
55 |
*
|
56 |
*/
|
57 |
public class GeneralPage extends AbstractPreferencePage { |
58 |
private ImageIcon icon; |
59 |
public static String id; |
60 |
|
61 |
private JCheckBox rememberWindowPosition; |
62 |
private JCheckBox rememberWindowSize; |
63 |
|
64 |
public GeneralPage() {
|
65 |
super();
|
66 |
initialize(); |
67 |
id = this.getClass().getName();
|
68 |
} |
69 |
|
70 |
private void initialize() { |
71 |
icon = PluginServices.getIconTheme().get("edit-setup-general");
|
72 |
|
73 |
/*
|
74 |
* Removed until behavior is clear when
|
75 |
* we do not store pos/size
|
76 |
*
|
77 |
// remember windows position check box
|
78 |
addComponent(rememberWindowPosition = new JCheckBox(PluginServices.getText(this, "options.general.remember_windows_pos")));
|
79 |
// remember windows sizes check box
|
80 |
addComponent(rememberWindowSize = new JCheckBox(PluginServices.getText(this, "options.general.remember_windows_size")));
|
81 |
*/
|
82 |
} |
83 |
|
84 |
|
85 |
public String getID() { |
86 |
return id;
|
87 |
} |
88 |
|
89 |
public String getTitle() { |
90 |
return PluginServices.getText(this, "pref.general"); |
91 |
} |
92 |
|
93 |
public JPanel getPanel() { |
94 |
return this; |
95 |
} |
96 |
|
97 |
public void initializeValues() { |
98 |
} |
99 |
|
100 |
public void storeValues() { |
101 |
} |
102 |
|
103 |
public void initializeDefaults() { |
104 |
} |
105 |
|
106 |
public ImageIcon getIcon() { |
107 |
return icon;
|
108 |
} |
109 |
|
110 |
public boolean isValueChanged() { |
111 |
return super.hasChanged(); |
112 |
} |
113 |
|
114 |
public void setChangesApplied() { |
115 |
setChanged(false);
|
116 |
} |
117 |
|
118 |
|
119 |
|
120 |
} |