root / trunk / extensions / extGraph_predes / src / com / iver / cit / gvsig / graph / preferences / RoutePage.java @ 13850
History | View | Annotate | Download (4.52 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 13850 2007-09-19 14:28:27Z fjp $
|
45 |
* $Log$
|
46 |
* Revision 1.11 2007-09-19 14:28:27 fjp
|
47 |
* Test case para ServiceArea y los ficheros de prueba con los ejes de Madrid.
|
48 |
*
|
49 |
* Revision 1.10 2007/09/07 11:29:47 fjp
|
50 |
* Casi compila. Falta arreglar lo de FArrowSymbol y retocar el graphiclist de FMap.
|
51 |
*
|
52 |
* Revision 1.9 2007/01/16 11:51:07 jaume
|
53 |
* *** empty log message ***
|
54 |
*
|
55 |
* Revision 1.8 2007/01/10 16:49:23 jaume
|
56 |
* *** empty log message ***
|
57 |
*
|
58 |
* Revision 1.7 2006/10/30 19:30:35 jaume
|
59 |
* *** empty log message ***
|
60 |
*
|
61 |
* Revision 1.6 2006/10/26 16:31:21 jaume
|
62 |
* GUI
|
63 |
*
|
64 |
* Revision 1.5 2006/10/26 07:46:58 jaume
|
65 |
* *** empty log message ***
|
66 |
*
|
67 |
* Revision 1.4 2006/10/25 10:50:41 jaume
|
68 |
* movement of classes and gui stuff
|
69 |
*
|
70 |
* Revision 1.3 2006/10/24 16:31:40 jaume
|
71 |
* *** empty log message ***
|
72 |
*
|
73 |
* Revision 1.2 2006/10/23 16:00:20 jaume
|
74 |
* *** empty log message ***
|
75 |
*
|
76 |
* Revision 1.1 2006/10/23 08:05:39 jaume
|
77 |
* GUI
|
78 |
*
|
79 |
*
|
80 |
*/
|
81 |
package com.iver.cit.gvsig.graph.preferences; |
82 |
|
83 |
import java.awt.Dimension; |
84 |
import java.awt.event.ActionEvent; |
85 |
import java.awt.event.ActionListener; |
86 |
|
87 |
import javax.swing.BorderFactory; |
88 |
import javax.swing.ImageIcon; |
89 |
import javax.swing.JPanel; |
90 |
|
91 |
import org.gvsig.gui.beans.swing.JButton; |
92 |
|
93 |
import com.iver.andami.PluginServices; |
94 |
import com.iver.andami.preferences.AbstractPreferencePage; |
95 |
import com.iver.andami.preferences.StoreException; |
96 |
import com.iver.cit.gvsig.fmap.core.FShape; |
97 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
98 |
import com.iver.cit.gvsig.gui.styling.SymbolPreviewer; |
99 |
import com.iver.cit.gvsig.gui.styling.SymbolSelector; |
100 |
import com.iver.cit.gvsig.project.documents.view.legend.gui.ISymbolSelector; |
101 |
|
102 |
public class RoutePage extends AbstractPreferencePage { |
103 |
private ImageIcon icon; |
104 |
private SymbolPreviewer symbolPreview;
|
105 |
private JButton btnChangeSymbol; |
106 |
|
107 |
public RoutePage() {
|
108 |
icon = new ImageIcon(this.getClass().getClassLoader().getResource( |
109 |
"images/net-analyst-icon.png"));
|
110 |
symbolPreview = new SymbolPreviewer();
|
111 |
symbolPreview.setPreferredSize(new Dimension(100, 100)); |
112 |
symbolPreview.setBorder(BorderFactory.createBevelBorder(1)); |
113 |
|
114 |
JPanel aux = new JPanel(); |
115 |
aux.add(symbolPreview); |
116 |
addComponent(PluginServices.getText(this, "use_symbol") +":", aux); |
117 |
aux = new JPanel(); |
118 |
aux.add(btnChangeSymbol = new JButton(PluginServices.getText(this, "change"))); |
119 |
btnChangeSymbol.addActionListener(new ActionListener() { |
120 |
public void actionPerformed(ActionEvent e) { |
121 |
ISymbolSelector symbSelec = SymbolSelector.createSymbolSelector(null, FShape.LINE);
|
122 |
PluginServices.getMDIManager().addWindow(symbSelec); |
123 |
ISymbol sym = (ISymbol) symbSelec.getSelectedObject(); |
124 |
if (sym!=null) |
125 |
symbolPreview.setSymbol(sym); |
126 |
} |
127 |
}); |
128 |
addComponent("", aux);
|
129 |
} |
130 |
|
131 |
public void storeValues() throws StoreException { |
132 |
// TODO Auto-generated method stub
|
133 |
|
134 |
} |
135 |
|
136 |
public void setChangesApplied() { |
137 |
// TODO Auto-generated method stub
|
138 |
|
139 |
} |
140 |
|
141 |
public String getID() { |
142 |
return getClass().getName();
|
143 |
} |
144 |
|
145 |
public String getTitle() { |
146 |
return PluginServices.getText(this, "net_analyst"); |
147 |
} |
148 |
|
149 |
public JPanel getPanel() { |
150 |
return this; |
151 |
} |
152 |
|
153 |
public void initializeValues() { |
154 |
// TODO Auto-generated method stub
|
155 |
|
156 |
} |
157 |
|
158 |
public void initializeDefaults() { |
159 |
// TODO Auto-generated method stub
|
160 |
|
161 |
} |
162 |
|
163 |
public ImageIcon getIcon() { |
164 |
return icon;
|
165 |
} |
166 |
|
167 |
public boolean isValueChanged() { |
168 |
// TODO Auto-generated method stub
|
169 |
return false; |
170 |
} |
171 |
|
172 |
} |