Statistics
| Revision:

svn-gvsig-desktop / trunk / extensions / extGraph_predes / src / com / iver / cit / gvsig / graph / preferences / RoutePage.java @ 8352

History | View | Annotate | Download (3.88 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

    
42
/* CVS MESSAGES:
43
 *
44
 * $Id: RoutePage.java 8352 2006-10-26 07:46:58Z jaume $
45
 * $Log$
46
 * Revision 1.5  2006-10-26 07:46:58  jaume
47
 * *** empty log message ***
48
 *
49
 * Revision 1.4  2006/10/25 10:50:41  jaume
50
 * movement of classes and gui stuff
51
 *
52
 * Revision 1.3  2006/10/24 16:31:40  jaume
53
 * *** empty log message ***
54
 *
55
 * Revision 1.2  2006/10/23 16:00:20  jaume
56
 * *** empty log message ***
57
 *
58
 * Revision 1.1  2006/10/23 08:05:39  jaume
59
 * GUI
60
 *
61
 *
62
 */
63
package com.iver.cit.gvsig.graph.preferences;
64

    
65
import java.awt.Dimension;
66
import java.awt.event.ActionEvent;
67
import java.awt.event.ActionListener;
68

    
69
import javax.swing.BorderFactory;
70
import javax.swing.ImageIcon;
71
import javax.swing.JPanel;
72

    
73
import org.gvsig.gui.beans.swing.JButton;
74

    
75
import com.iver.andami.PluginServices;
76
import com.iver.andami.preferences.AbstractPreferencePage;
77
import com.iver.andami.preferences.StoreException;
78
import com.iver.cit.gvsig.fmap.core.FShape;
79
import com.iver.cit.gvsig.fmap.core.ISymbol;
80
import com.iver.cit.gvsig.gvsig.gui.styling.SymbolPreview;
81
import com.iver.cit.gvsig.gvsig.gui.styling.SymbolSelector;
82

    
83
public class RoutePage extends AbstractPreferencePage {
84
        private ImageIcon icon;
85
        private SymbolPreview symbolPreview;
86
        private JButton btnChangeSymbol;
87

    
88
        public RoutePage() {
89
                icon = new ImageIcon(this.getClass().getClassLoader().getResource(
90
                                "images/net-analyst-icon.png"));
91
                symbolPreview = new SymbolPreview();
92
                symbolPreview.setPreferredSize(new Dimension(100, 100));
93
                symbolPreview.setBorder(BorderFactory.createBevelBorder(1));
94

    
95
                JPanel aux = new JPanel();
96
                aux.add(symbolPreview);
97
                addComponent(PluginServices.getText(this, "use_symbol") +":", aux);
98
                aux = new JPanel();
99
                aux.add(btnChangeSymbol = new JButton(PluginServices.getText(this, "change")));
100
                btnChangeSymbol.addActionListener(new ActionListener() {
101
                        public void actionPerformed(ActionEvent e) {
102
                                SymbolSelector symbSelec = new SymbolSelector(FShape.POINT);
103
                                PluginServices.getMDIManager().addWindow(symbSelec);
104
                                ISymbol sym = symbSelec.getSymbol();
105
                                if (sym!=null)
106
                                        symbolPreview.setSymbol(sym);
107
                        }
108
                });
109
                addComponent("", aux);
110
        }
111

    
112
        public void storeValues() throws StoreException {
113
                // TODO Auto-generated method stub
114

    
115
        }
116

    
117
        public void setChangesApplied() {
118
                // TODO Auto-generated method stub
119

    
120
        }
121

    
122
        public String getID() {
123
                return getClass().getName();
124
        }
125

    
126
        public String getTitle() {
127
                return PluginServices.getText(this, "net_analyst");
128
        }
129

    
130
        public JPanel getPanel() {
131
                return this;
132
        }
133

    
134
        public void initializeValues() {
135
                // TODO Auto-generated method stub
136

    
137
        }
138

    
139
        public void initializeDefaults() {
140
                // TODO Auto-generated method stub
141

    
142
        }
143

    
144
        public ImageIcon getIcon() {
145
                return icon;
146
        }
147

    
148
        public boolean isValueChanged() {
149
                // TODO Auto-generated method stub
150
                return false;
151
        }
152

    
153
}