root / tags / v1_0_2_Build_902 / libraries / libCorePlugin / src / com / iver / core / preferences / general / GeneralPage.java @ 10681
History | View | Annotate | Download (3.08 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2005 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 |
* For more information, contact:
|
20 |
*
|
21 |
* Generalitat Valenciana
|
22 |
* Conselleria d'Infraestructures i Transport
|
23 |
* Av. Blasco Ib??ez, 50
|
24 |
* 46010 VALENCIA
|
25 |
* SPAIN
|
26 |
*
|
27 |
* +34 963862235
|
28 |
* gvsig@gva.es
|
29 |
* www.gvsig.gva.es
|
30 |
*
|
31 |
* or
|
32 |
*
|
33 |
* IVER T.I. S.A
|
34 |
* Salamanca 50
|
35 |
* 46005 Valencia
|
36 |
* Spain
|
37 |
*
|
38 |
* +34 963163400
|
39 |
* dac@iver.es
|
40 |
*/
|
41 |
package com.iver.core.preferences.general; |
42 |
|
43 |
import javax.swing.ImageIcon; |
44 |
import javax.swing.JCheckBox; |
45 |
import javax.swing.JPanel; |
46 |
|
47 |
import com.iver.andami.PluginServices; |
48 |
import com.iver.andami.preferences.AbstractPreferencePage; |
49 |
/**
|
50 |
* First default page in the Preferences Dialog. It is supposed to be
|
51 |
* used to hold simple user interaction settings such as:
|
52 |
* <ol>
|
53 |
* <li>
|
54 |
* Window positions.
|
55 |
* </li>
|
56 |
* <li>
|
57 |
* Mouse behaviors (double click vs. simple click).
|
58 |
* </li>
|
59 |
* <li>
|
60 |
* Users' language preferences.
|
61 |
* </li>
|
62 |
* <li>
|
63 |
* Confirm overwriting files.
|
64 |
* </li>
|
65 |
* <li>
|
66 |
* Toolbars config
|
67 |
* </li>
|
68 |
* </ol>
|
69 |
*
|
70 |
* @author jaume dominguez faus - jaume.dominguez@iver.es
|
71 |
*
|
72 |
*/
|
73 |
public class GeneralPage extends AbstractPreferencePage { |
74 |
private ImageIcon icon; |
75 |
public static String id; |
76 |
private JCheckBox rememberWindowPosition; |
77 |
private JCheckBox rememberWindowSize; |
78 |
|
79 |
public GeneralPage() {
|
80 |
super();
|
81 |
initialize(); |
82 |
id = this.getClass().getName();
|
83 |
} |
84 |
|
85 |
private void initialize() { |
86 |
icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/emblem-work.png")); |
87 |
// remember windows position check box
|
88 |
addComponent(rememberWindowPosition = new JCheckBox(PluginServices.getText(this, "options.general.remember_windows_pos"))); |
89 |
// remember windows sizes check box
|
90 |
addComponent(rememberWindowSize = new JCheckBox(PluginServices.getText(this, "options.general.remember_windows_size"))); |
91 |
|
92 |
} |
93 |
|
94 |
|
95 |
public String getID() { |
96 |
return id;
|
97 |
} |
98 |
|
99 |
public String getTitle() { |
100 |
return PluginServices.getText(this, "pref.general"); |
101 |
} |
102 |
|
103 |
public JPanel getPanel() { |
104 |
return this; |
105 |
} |
106 |
|
107 |
public void initializeValues() { |
108 |
// TODO
|
109 |
} |
110 |
|
111 |
public void storeValues() { |
112 |
} |
113 |
|
114 |
public void initializeDefaults() { |
115 |
// TODO
|
116 |
} |
117 |
|
118 |
public ImageIcon getIcon() { |
119 |
return icon;
|
120 |
} |
121 |
|
122 |
public boolean isValueChanged() { |
123 |
return super.hasChanged(); |
124 |
} |
125 |
|
126 |
public void setChangesApplied() { |
127 |
setChanged(false);
|
128 |
} |
129 |
|
130 |
|
131 |
} |