svn-gvsig-desktop / trunk / extensions / extGraph_predes / src / com / iver / cit / gvsig / graph / gui / wizard / NetPage2.java @ 8280
History | View | Annotate | Download (3.05 KB)
1 | 8188 | 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 | *
|
||
44 | * $Id$
|
||
45 | * $Log$
|
||
46 | 8189 | jaume | * Revision 1.2 2006-10-19 15:15:27 jaume
|
47 | 8188 | jaume | * *** empty log message ***
|
48 | *
|
||
49 | 8189 | jaume | * Revision 1.1 2006/10/19 15:12:10 jaume
|
50 | * *** empty log message ***
|
||
51 | 8188 | jaume | *
|
52 | 8189 | jaume | *
|
53 | 8188 | jaume | */
|
54 | package com.iver.cit.gvsig.graph.gui.wizard; |
||
55 | |||
56 | import javax.swing.ButtonGroup; |
||
57 | import javax.swing.JRadioButton; |
||
58 | |||
59 | import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
||
60 | |||
61 | import com.iver.andami.PluginServices; |
||
62 | import com.iver.utiles.swing.JComboBox; |
||
63 | |||
64 | import jwizardcomponent.JWizardPanel; |
||
65 | /**
|
||
66 | * Select costs or way type.
|
||
67 | * @author jaume dominguez faus - jaume.dominguez@iver.es
|
||
68 | 8189 | jaume | * @deprecated
|
69 | 8188 | jaume | */
|
70 | public class NetPage2 extends JWizardPanel { |
||
71 | |||
72 | private NetWizard owner;
|
||
73 | private JRadioButton rdBtnCosts; |
||
74 | private JRadioButton rdBtnWayType; |
||
75 | |||
76 | NetPage2(NetWizard wizard) { |
||
77 | super(wizard.getWizardComponents());
|
||
78 | this.owner = wizard;
|
||
79 | initialize(); |
||
80 | } |
||
81 | |||
82 | private void initialize() { |
||
83 | GridBagLayoutPanel contentPane = new GridBagLayoutPanel();
|
||
84 | contentPane.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
|
||
85 | PluginServices.getText(this, "criterium (esto ho llevare)"), |
||
86 | javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
||
87 | javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
||
88 | |||
89 | contentPane.addComponent( |
||
90 | rdBtnCosts = new JRadioButton( |
||
91 | PluginServices.getText(this, "cost_from_a_table_field"))); |
||
92 | contentPane.addComponent( |
||
93 | rdBtnWayType = new JRadioButton( |
||
94 | PluginServices.getText(this, "based_upon_the_road_type"))); |
||
95 | |||
96 | ButtonGroup group = new ButtonGroup(); |
||
97 | group.add(rdBtnCosts); |
||
98 | group.add(rdBtnWayType); |
||
99 | this.add(contentPane);
|
||
100 | } |
||
101 | |||
102 | public void next() { |
||
103 | Boolean costs = null; |
||
104 | if (rdBtnCosts.isSelected())
|
||
105 | costs = new Boolean(true); |
||
106 | if (rdBtnWayType.isSelected())
|
||
107 | costs = new Boolean(false); |
||
108 | |||
109 | if (costs!=null) { |
||
110 | owner.setUsingCosts(costs); |
||
111 | ((NetPage3) owner.getWizardComponents().getWizardPanel(2))
|
||
112 | .refresh(); |
||
113 | goNext(); |
||
114 | } |
||
115 | |||
116 | } |
||
117 | |||
118 | |||
119 | } |