svn-gvsig-desktop / tags / v1_0_2_RELEASE / libraries / libCorePlugin / src / com / iver / core / preferences / general / GeneralPage.java @ 11432
History | View | Annotate | Download (3.08 KB)
1 | 6102 | 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 | 5792 | caballero | 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 | 6102 | jaume | public static String id; |
76 | 5792 | caballero | private JCheckBox rememberWindowPosition; |
77 | private JCheckBox rememberWindowSize; |
||
78 | 6102 | jaume | |
79 | 5792 | caballero | 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 | 6102 | jaume | |
95 | 5792 | caballero | 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 | 6575 | jaume | // TODO
|
109 | 5792 | caballero | } |
110 | |||
111 | 6662 | caballero | public void storeValues() { |
112 | 5792 | caballero | } |
113 | |||
114 | public void initializeDefaults() { |
||
115 | 6575 | jaume | // TODO
|
116 | } |
||
117 | 5792 | caballero | |
118 | public ImageIcon getIcon() { |
||
119 | return icon;
|
||
120 | } |
||
121 | 6102 | jaume | |
122 | 6805 | jaume | public boolean isValueChanged() { |
123 | return super.hasChanged(); |
||
124 | } |
||
125 | 6102 | jaume | |
126 | 6810 | jaume | public void setChangesApplied() { |
127 | setChanged(false);
|
||
128 | } |
||
129 | 6805 | jaume | |
130 | 6810 | jaume | |
131 | 5792 | caballero | } |