Revision 773 2.1/trunk/org.gvsig.view3d/org.gvsig.view3d.swing/org.gvsig.view3d.swing.impl/src/main/java/org/gvsig/view3d/swing/impl/properties/DefaultGeneralProperties3DPanel.java
DefaultGeneralProperties3DPanel.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright ? 2007-2017 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 2 |
|
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 |
*/ |
|
1 | 24 |
package org.gvsig.view3d.swing.impl.properties; |
2 | 25 |
|
3 | 26 |
import gov.nasa.worldwind.WorldWind; |
... | ... | |
16 | 39 |
import org.gvsig.tools.swing.api.threadsafedialogs.ThreadSafeDialogsManager; |
17 | 40 |
import org.gvsig.view3d.swing.api.properties.GeneralProperties3D; |
18 | 41 |
|
19 |
public class DefaultGeneralProperties3DPanel extends |
|
20 |
AbstractGeneralProperties3DPanel { |
|
42 |
/** |
|
43 |
* |
|
44 |
* @author <a href="mailto:lmarques@disid.com">Lluis Marques</a> |
|
45 |
* |
|
46 |
*/ |
|
47 |
public class DefaultGeneralProperties3DPanel extends AbstractGeneralProperties3DPanel { |
|
21 | 48 |
|
22 | 49 |
private static final long serialVersionUID = -4877460179232095806L; |
23 | 50 |
|
... | ... | |
39 | 66 |
|
40 | 67 |
public void actionPerformed(ActionEvent e) { |
41 | 68 |
|
42 |
ThreadSafeDialogsManager tsd = |
|
43 |
ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
69 |
ThreadSafeDialogsManager tsd = ToolsSwingLocator.getThreadSafeDialogsManager(); |
|
44 | 70 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
45 | 71 |
|
46 | 72 |
FileStore store = WorldWind.getDataFileStore(); |
... | ... | |
51 | 77 |
stb.append(" "); |
52 | 78 |
stb.append(store.getWriteLocation().getAbsolutePath()); |
53 | 79 |
stb.append("\n"); |
54 |
stb.append(i18nManager |
|
55 |
.getTranslation("are_you_sure_remove_cache_XquestionX")); |
|
80 |
stb.append(i18nManager.getTranslation("are_you_sure_remove_cache_XquestionX")); |
|
56 | 81 |
|
57 |
int reply = |
|
58 |
tsd.confirmDialog(stb.toString(), |
|
59 |
i18nManager.getTranslation("remove_cache"), |
|
60 |
JOptionPane.OK_CANCEL_OPTION, |
|
61 |
JOptionPane.QUESTION_MESSAGE); |
|
82 |
int reply = tsd.confirmDialog(stb.toString(), i18nManager.getTranslation("remove_cache"), |
|
83 |
JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); |
|
62 | 84 |
|
63 | 85 |
if (reply == JOptionPane.OK_OPTION) { |
64 | 86 |
deleteFiles(cacheRoot); |
... | ... | |
70 | 92 |
|
71 | 93 |
private void fillPanel() { |
72 | 94 |
|
73 |
getHeightField().setText( |
|
74 |
String.valueOf(properties.getDefaultViewHeight())); |
|
75 |
getWidthField().setText( |
|
76 |
String.valueOf(properties.getDefaultViewWidth())); |
|
77 |
getAtmosphereCheckBox().setSelected( |
|
78 |
properties.getAtmosphereVisibility()); |
|
79 |
getNorthIndicatorCheckBox().setSelected( |
|
80 |
properties.getNorthIndicatorVisibility()); |
|
95 |
getHeightField().setText(String.valueOf(properties.getDefaultViewHeight())); |
|
96 |
getWidthField().setText(String.valueOf(properties.getDefaultViewWidth())); |
|
97 |
getAtmosphereCheckBox().setSelected(properties.getAtmosphereVisibility()); |
|
98 |
getNorthIndicatorCheckBox().setSelected(properties.getNorthIndicatorVisibility()); |
|
81 | 99 |
getMinimapCheckBox().setSelected(properties.getMinimapVisibility()); |
82 |
getStarsBackGroundCheckBox().setSelected( |
|
83 |
properties.getStarsBackgroundVisibility()); |
|
100 |
getStarsBackGroundCheckBox().setSelected(properties.getStarsBackgroundVisibility()); |
|
84 | 101 |
getScaleCheckBox().setSelected(properties.getScaleVisibility()); |
85 |
getViewPortAnimationCheckBox().setSelected( |
|
86 |
properties.getViewPortAnimation()); |
|
102 |
getViewPortAnimationCheckBox().setSelected(properties.getViewPortAnimation()); |
|
87 | 103 |
|
88 | 104 |
if (properties.getCachePath() == null || properties.getCachePath().equals("")) { |
89 |
getCacheField().setText( |
|
90 |
WorldWind.getDataFileStore().getWriteLocation() |
|
91 |
.getAbsolutePath()); |
|
105 |
getCacheField().setText(WorldWind.getDataFileStore().getWriteLocation().getAbsolutePath()); |
|
92 | 106 |
} else { |
93 | 107 |
getCacheField().setText(properties.getCachePath().getAbsolutePath()); |
94 | 108 |
} |
Also available in: Unified diff