Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extPublish / src / com / iver / cit / gvsig / publish / gui / PublishPreferencesPage.java @ 10626

History | View | Annotate | Download (2.21 KB)

1
package com.iver.cit.gvsig.publish.gui;
2

    
3
import javax.swing.ImageIcon;
4
import javax.swing.JPanel;
5
import javax.swing.JTextField;
6

    
7
import com.iver.andami.PluginServices;
8
import com.iver.andami.preferences.AbstractPreferencePage;
9
import com.iver.andami.preferences.StoreException;
10
import com.iver.cit.gvsig.publish.persistence.PublishPersistence;
11

    
12
/**
13
 * extPublish preferences dialog.
14
 * @author "Luis W. Sevilla" <sevilla_lui@gva.es>
15
 *
16
 */
17

    
18
public class PublishPreferencesPage extends AbstractPreferencePage {
19
        public static final String GDAL_PATH = "GDAL_PATH";
20
        protected String id;
21
        private ImageIcon icon = null;
22
        private JTextField gdalPath;
23
        public PublishPreferencesPage() {
24
                super();
25
                id = this.getClass().getName();
26
                //icon = new ImageIcon(this.getClass().getClassLoader().getResource("images/emblem-work.png"));
27
                // proxy host
28
                addComponent(PluginServices.getText(this, "gdal_path") + ":",
29
                        gdalPath = new JTextField("", 30));
30
        }
31

    
32
        /*
33
         *  (non-Javadoc)
34
         * @see com.iver.andami.preferences.AbstractPreferencePage#storeValues()
35
         */
36
        public void storeValues() throws StoreException {
37
                PublishPersistence persistence = new PublishPersistence(this);
38
                persistence.setGdalPath(gdalPath.getText());
39
                persistence.setPersistent();
40
        }
41

    
42
        /*
43
         *  (non-Javadoc)
44
         * @see com.iver.andami.preferences.AbstractPreferencePage#setChangesApplied()
45
         */
46
        public void setChangesApplied() {
47
                PublishPersistence persistence = new PublishPersistence(this);
48
                persistence.setGdalPath(gdalPath.getText());
49
                persistence.setPersistent();
50
        }
51

    
52
        public String getID() {
53
                return id;
54
        }
55

    
56
        public String getTitle() {
57
                 return PluginServices.getText(this, "publishing");
58
        }
59

    
60
        public JPanel getPanel() {
61
                return this;
62
        }
63

    
64
        /*
65
         *  (non-Javadoc)
66
         * @see com.iver.andami.preferences.IPreference#initializeValues()
67
         */
68
        public void initializeValues() {
69
                PublishPersistence persistence = new PublishPersistence(this);
70
                gdalPath.setText(persistence.getGdalPath());        
71
        }
72

    
73
        /*
74
         *  (non-Javadoc)
75
         * @see com.iver.andami.preferences.IPreference#initializeDefaults()
76
         */
77
        public void initializeDefaults() {
78
                gdalPath.setText("");        
79

    
80
        }
81

    
82
        public ImageIcon getIcon() {
83
                // TODO Auto-generated method stub
84
                return null;
85
        }
86

    
87
        public boolean isValueChanged() {
88
                 return true;
89
        }
90

    
91
}