root / branches / v2_0_0_prep / libraries / libCorePlugin / src / org / gvsig / coreplugin / preferences / general / GeneralPage.java @ 38608
History | View | Annotate | Download (3.18 KB)
1 | 7214 | jaume | /* 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 | 29630 | jpiera | package org.gvsig.coreplugin.preferences.general; |
42 | 7214 | jaume | |
43 | import javax.swing.ImageIcon; |
||
44 | import javax.swing.JCheckBox; |
||
45 | import javax.swing.JPanel; |
||
46 | |||
47 | 29630 | jpiera | import org.gvsig.andami.PluginServices; |
48 | import org.gvsig.andami.preferences.AbstractPreferencePage; |
||
49 | |||
50 | 7214 | jaume | /**
|
51 | * First default page in the Preferences Dialog. It is supposed to be
|
||
52 | * used to hold simple user interaction settings such as:
|
||
53 | * <ol>
|
||
54 | * <li>
|
||
55 | * Window positions.
|
||
56 | * </li>
|
||
57 | * <li>
|
||
58 | * Mouse behaviors (double click vs. simple click).
|
||
59 | * </li>
|
||
60 | * <li>
|
||
61 | * Users' language preferences.
|
||
62 | * </li>
|
||
63 | * <li>
|
||
64 | * Confirm overwriting files.
|
||
65 | * </li>
|
||
66 | * <li>
|
||
67 | * Toolbars config
|
||
68 | * </li>
|
||
69 | * </ol>
|
||
70 | *
|
||
71 | * @author jaume dominguez faus - jaume.dominguez@iver.es
|
||
72 | *
|
||
73 | */
|
||
74 | public class GeneralPage extends AbstractPreferencePage { |
||
75 | private ImageIcon icon; |
||
76 | public static String id; |
||
77 | private JCheckBox rememberWindowPosition; |
||
78 | private JCheckBox rememberWindowSize; |
||
79 | |||
80 | public GeneralPage() {
|
||
81 | super();
|
||
82 | initialize(); |
||
83 | id = this.getClass().getName();
|
||
84 | } |
||
85 | |||
86 | private void initialize() { |
||
87 | 38564 | jjdelcerro | icon = PluginServices.getIconTheme().get("edit-setup-general");
|
88 | 7214 | jaume | // remember windows position check box
|
89 | addComponent(rememberWindowPosition = new JCheckBox(PluginServices.getText(this, "options.general.remember_windows_pos"))); |
||
90 | // remember windows sizes check box
|
||
91 | addComponent(rememberWindowSize = new JCheckBox(PluginServices.getText(this, "options.general.remember_windows_size"))); |
||
92 | 13881 | jaume | |
93 | 7214 | jaume | } |
94 | |||
95 | |||
96 | public String getID() { |
||
97 | return id;
|
||
98 | } |
||
99 | |||
100 | public String getTitle() { |
||
101 | return PluginServices.getText(this, "pref.general"); |
||
102 | } |
||
103 | |||
104 | public JPanel getPanel() { |
||
105 | return this; |
||
106 | } |
||
107 | |||
108 | public void initializeValues() { |
||
109 | 13881 | jaume | // TODO remember window position
|
110 | // TODO remember window size
|
||
111 | 7214 | jaume | } |
112 | |||
113 | public void storeValues() { |
||
114 | } |
||
115 | |||
116 | public void initializeDefaults() { |
||
117 | 13881 | jaume | // TODO remember window position
|
118 | // TODO remember window size
|
||
119 | 7214 | jaume | } |
120 | |||
121 | public ImageIcon getIcon() { |
||
122 | return icon;
|
||
123 | } |
||
124 | |||
125 | public boolean isValueChanged() { |
||
126 | return super.hasChanged(); |
||
127 | } |
||
128 | |||
129 | public void setChangesApplied() { |
||
130 | setChanged(false);
|
||
131 | } |
||
132 | |||
133 | 13881 | jaume | |
134 | |||
135 | 7214 | jaume | } |