Statistics
| Revision:

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

History | View | Annotate | Download (3.67 KB)

1 8224 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
42
/* CVS MESSAGES:
43 8258 jaume
 *
44
 * $Id$
45
 * $Log$
46 8303 jaume
 * Revision 1.3  2006-10-24 16:31:40  jaume
47 8258 jaume
 * *** empty log message ***
48
 *
49 8303 jaume
 * Revision 1.2  2006/10/23 16:00:20  jaume
50
 * *** empty log message ***
51
 *
52 8258 jaume
 * Revision 1.1  2006/10/23 08:05:39  jaume
53
 * GUI
54
 *
55
 *
56
 */
57 8224 jaume
package com.iver.cit.gvsig.graph.preferences;
58
59 8258 jaume
import java.awt.Color;
60
import java.awt.Dimension;
61
import java.awt.Font;
62
import java.awt.event.ActionEvent;
63
import java.awt.event.ActionListener;
64
65
import javax.swing.BorderFactory;
66 8224 jaume
import javax.swing.ImageIcon;
67 8258 jaume
import javax.swing.JOptionPane;
68 8224 jaume
import javax.swing.JPanel;
69
70 8258 jaume
import org.gvsig.gui.beans.swing.JButton;
71
72 8224 jaume
import com.iver.andami.PluginServices;
73
import com.iver.andami.preferences.AbstractPreferencePage;
74
import com.iver.andami.preferences.StoreException;
75 8258 jaume
import com.iver.cit.gvsig.fmap.core.symbols.CharacterMarker;
76 8303 jaume
import com.iver.cit.gvsig.gui.styling.SymbolPreview;
77 8224 jaume
78
public class RoutePage extends AbstractPreferencePage {
79 8258 jaume
        private ImageIcon icon;
80 8303 jaume
        private SymbolPreview symbolPreview;
81 8258 jaume
        private JButton btnChangeSymbol;
82 8224 jaume
83
        public RoutePage() {
84 8258 jaume
                icon = new ImageIcon(this.getClass().getClassLoader().getResource(
85
                                "images/net-analyst-icon.png"));
86 8303 jaume
                symbolPreview = new SymbolPreview();
87
                symbolPreview.setPreferredSize(new Dimension(100, 100));
88
                symbolPreview.setSymbol(new CharacterMarker(new Font("ESRI Public1", Font.PLAIN, 0), (int) 'b', Color.BLACK));
89
                symbolPreview.setBorder(BorderFactory.createBevelBorder(1));
90 8258 jaume
91
                JPanel aux = new JPanel();
92
                aux.add(symbolPreview);
93
                addComponent(PluginServices.getText(this, "use_symbol") +":", aux);
94
                aux = new JPanel();
95
                aux.add(btnChangeSymbol = new JButton(PluginServices.getText(this, "change")));
96
                btnChangeSymbol.addActionListener(new ActionListener() {
97
                        public void actionPerformed(ActionEvent e) {
98
                                JOptionPane.showMessageDialog(RoutePage.this, "change_symbol_dialog");
99
                        }
100
                });
101
                addComponent("", aux);
102 8224 jaume
        }
103
104
        public void storeValues() throws StoreException {
105
                // TODO Auto-generated method stub
106
107
        }
108
109
        public void setChangesApplied() {
110
                // TODO Auto-generated method stub
111
112
        }
113
114
        public String getID() {
115
                return getClass().getName();
116
        }
117
118
        public String getTitle() {
119
                return PluginServices.getText(this, "net_analyst");
120
        }
121
122
        public JPanel getPanel() {
123
                return this;
124
        }
125
126
        public void initializeValues() {
127
                // TODO Auto-generated method stub
128
129
        }
130
131
        public void initializeDefaults() {
132
                // TODO Auto-generated method stub
133
134
        }
135
136
        public ImageIcon getIcon() {
137
                return icon;
138
        }
139
140
        public boolean isValueChanged() {
141
                // TODO Auto-generated method stub
142
                return false;
143
        }
144
145
}