Revision 228
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/pom.xml | ||
---|---|---|
18 | 18 |
<module>org.gvsig.educa.thematicmap.lib.spi</module> |
19 | 19 |
<module>org.gvsig.educa.thematicmap.lib.impl</module> |
20 | 20 |
<module>org.gvsig.educa.thematicmap.lib.prov.installer</module> |
21 |
<module>org.gvsig.educa.thematicmap.lib.prov.game</module>
|
|
21 |
<module>org.gvsig.educa.thematicmap.lib.prov.locateonthemap</module>
|
|
22 | 22 |
<module>org.gvsig.educa.thematicmap.lib.prov.qresp</module> |
23 | 23 |
</modules> |
24 | 24 |
</project> |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.educa.thematicmap.lib.prov.locateonthemap.LocateOnTheMapProviderLibrary |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/java/org/gvsig/educa/thematicmap/lib/prov/locateonthemap/DefaultGameWindow.java | ||
---|---|---|
1 |
package org.gvsig.educa.thematicmap.lib.prov.locateonthemap; |
|
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
import java.awt.event.ActionEvent; |
|
5 |
import java.awt.event.ActionListener; |
|
6 |
|
|
7 |
import javax.swing.JButton; |
|
8 |
import javax.swing.JLabel; |
|
9 |
import javax.swing.JPanel; |
|
10 |
|
|
11 |
public class DefaultGameWindow extends JPanel { |
|
12 |
|
|
13 |
private static final long serialVersionUID = 9157246249162455764L; |
|
14 |
|
|
15 |
private String provinciaASeleccionar = null; |
|
16 |
|
|
17 |
private JPanel contentPanel; |
|
18 |
private JPanel questionPanel; |
|
19 |
|
|
20 |
private JLabel question; |
|
21 |
private JLabel provincia; |
|
22 |
private JLabel answer; |
|
23 |
|
|
24 |
private DefaultGeomSelectSwingManager swingManager; |
|
25 |
|
|
26 |
private String clickString; |
|
27 |
|
|
28 |
private JButton botonCerrar; |
|
29 |
private JButton botonRestart; |
|
30 |
|
|
31 |
public DefaultGameWindow() { |
|
32 |
// this.swingManager = GeomSelectSwingLocator.getSwingManager(); |
|
33 |
this.swingManager = new DefaultGeomSelectSwingManager(); |
|
34 |
initComponents(); |
|
35 |
} |
|
36 |
|
|
37 |
private void initComponents() { |
|
38 |
|
|
39 |
JPanel buttonsPanel = createButtonsPanel(); |
|
40 |
|
|
41 |
this.questionPanel = new JPanel(new BorderLayout()); |
|
42 |
this.clickString = "Click in one province"; |
|
43 |
|
|
44 |
this.answer = new JLabel(clickString); |
|
45 |
|
|
46 |
// this.provinciaASeleccionar = GameLocator.getManager() |
|
47 |
// .getRandomItem(); |
|
48 |
|
|
49 |
// this.question = getQuestion(); |
|
50 |
this.question = new JLabel("Selecciona la \n\n siguiente provincia:"); |
|
51 |
this.provincia = new JLabel(provinciaASeleccionar); |
|
52 |
|
|
53 |
this.questionPanel.add(this.question, BorderLayout.NORTH); |
|
54 |
this.questionPanel.add(this.provincia, BorderLayout.CENTER); |
|
55 |
this.questionPanel.add(this.answer, BorderLayout.SOUTH); |
|
56 |
|
|
57 |
this.contentPanel = new JPanel(new BorderLayout()); |
|
58 |
// this.contentPanel.setSize(50, 50); |
|
59 |
|
|
60 |
this.contentPanel.add(this.questionPanel, BorderLayout.NORTH); |
|
61 |
this.contentPanel.add(buttonsPanel, BorderLayout.SOUTH); |
|
62 |
|
|
63 |
this.add(this.contentPanel); |
|
64 |
|
|
65 |
} |
|
66 |
|
|
67 |
private void restartPanel() { |
|
68 |
|
|
69 |
this.questionPanel.remove(this.provincia); |
|
70 |
this.questionPanel.remove(this.answer); |
|
71 |
// String newRandomProvince = GameLocator.getManager().getRandomItem(); |
|
72 |
|
|
73 |
// while (newRandomProvince.equals(this.provinciaASeleccionar) |
|
74 |
// || newRandomProvince.equals("")) { |
|
75 |
// newRandomProvince = GameLocator.getManager().getRandomItem(); |
|
76 |
|
|
77 |
// } |
|
78 |
// this.provinciaASeleccionar = newRandomProvince; |
|
79 |
|
|
80 |
this.provincia = new JLabel(provinciaASeleccionar); |
|
81 |
this.clickString = "Click in one province"; |
|
82 |
this.answer = new JLabel(clickString); |
|
83 |
|
|
84 |
this.questionPanel.add(this.provincia, BorderLayout.CENTER); |
|
85 |
this.questionPanel.add(this.answer, BorderLayout.SOUTH); |
|
86 |
|
|
87 |
this.questionPanel.updateUI(); |
|
88 |
this.contentPanel.updateUI(); |
|
89 |
this.updateUI(); |
|
90 |
} |
|
91 |
|
|
92 |
public void loadSecondPanel() { |
|
93 |
|
|
94 |
this.questionPanel.remove(this.answer); |
|
95 |
|
|
96 |
// if (GameLocator.getManager().isAnswerCorrect()) { |
|
97 |
// this.answer = new JLabel("La respuesta es: CORRECTA!!"); |
|
98 |
// } else { |
|
99 |
// this.answer = new JLabel("La respuesta es: INCORRECTA :("); |
|
100 |
// } |
|
101 |
|
|
102 |
this.questionPanel.add(this.answer, BorderLayout.SOUTH); |
|
103 |
|
|
104 |
this.questionPanel.updateUI(); |
|
105 |
this.contentPanel.updateUI(); |
|
106 |
this.updateUI(); |
|
107 |
} |
|
108 |
|
|
109 |
private JPanel createButtonsPanel() { |
|
110 |
JPanel buttonsPanel = new JPanel(new BorderLayout()); |
|
111 |
this.botonCerrar = new JButton("Cerrar"); |
|
112 |
|
|
113 |
ActionListener actionClose = new ActionListener() { |
|
114 |
public void actionPerformed(ActionEvent arg0) { |
|
115 |
swingManager.closeWindow(); |
|
116 |
} |
|
117 |
}; |
|
118 |
|
|
119 |
this.botonRestart = new JButton("Restart"); |
|
120 |
|
|
121 |
ActionListener actioRestart = new ActionListener() { |
|
122 |
public void actionPerformed(ActionEvent arg0) { |
|
123 |
restartPanel(); |
|
124 |
} |
|
125 |
}; |
|
126 |
|
|
127 |
this.botonCerrar.addActionListener(actionClose); |
|
128 |
this.botonRestart.addActionListener(actioRestart); |
|
129 |
buttonsPanel.add(this.botonCerrar, BorderLayout.CENTER); |
|
130 |
buttonsPanel.add(this.botonRestart, BorderLayout.WEST); |
|
131 |
|
|
132 |
return buttonsPanel; |
|
133 |
|
|
134 |
} |
|
135 |
|
|
136 |
public DefaultGameWindow getGametestWindow() { |
|
137 |
return this; |
|
138 |
} |
|
139 |
|
|
140 |
public void setProvinciaASeleccionar(String provincia) { |
|
141 |
this.provinciaASeleccionar = provincia; |
|
142 |
} |
|
143 |
|
|
144 |
} |
|
0 | 145 |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/java/org/gvsig/educa/thematicmap/lib/prov/locateonthemap/LocateOnTheMapProviderFactory.java | ||
---|---|---|
1 |
package org.gvsig.educa.thematicmap.lib.prov.locateonthemap; |
|
2 |
|
|
3 |
import org.gvsig.tools.ToolsLocator; |
|
4 |
import org.gvsig.tools.dynobject.DynClass; |
|
5 |
import org.gvsig.tools.dynobject.DynObject; |
|
6 |
import org.gvsig.tools.dynobject.DynObjectManager; |
|
7 |
import org.gvsig.tools.service.spi.AbstractProviderFactory; |
|
8 |
import org.gvsig.tools.service.spi.Provider; |
|
9 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
10 |
|
|
11 |
public class LocateOnTheMapProviderFactory extends AbstractProviderFactory { |
|
12 |
|
|
13 |
public static final String PROVIDER_NAME = "LocateOnTheMap"; |
|
14 |
public static final String PROVIDER_DESCRIPTION = "Thematic Map provider of Locate on the map type games"; |
|
15 |
|
|
16 |
private DynClass dynclass; |
|
17 |
|
|
18 |
public void initialize() { |
|
19 |
if (dynclass == null) { |
|
20 |
DynObjectManager dynObjectManager = ToolsLocator |
|
21 |
.getDynObjectManager(); |
|
22 |
dynclass = dynObjectManager.createDynClass(PROVIDER_NAME, |
|
23 |
PROVIDER_DESCRIPTION); |
|
24 |
|
|
25 |
// question text |
|
26 |
dynclass.addDynFieldString("questionString").setMandatory(true); |
|
27 |
// name of the column with the answers |
|
28 |
dynclass.addDynFieldString("columnNameIDString").setMandatory(true); |
|
29 |
// text with a description of the game (optional?) |
|
30 |
dynclass.addDynFieldString("gameDescriptionText") |
|
31 |
.setMandatory(true); |
|
32 |
// |
|
33 |
|
|
34 |
dynclass.addDynFieldInt("howManyQuestions") |
|
35 |
.setDefaultFieldValue(Integer.valueOf(10)) |
|
36 |
.setMandatory(true); |
|
37 |
dynclass.addDynFieldBoolean("random") |
|
38 |
.setDefaultFieldValue(Boolean.TRUE).setMandatory(true); |
|
39 |
|
|
40 |
dynObjectManager.add(dynclass); |
|
41 |
|
|
42 |
} |
|
43 |
} |
|
44 |
|
|
45 |
@Override |
|
46 |
protected DynClass createParametersDynClass() { |
|
47 |
if (dynclass == null) { |
|
48 |
initialize(); |
|
49 |
} |
|
50 |
return dynclass; |
|
51 |
} |
|
52 |
|
|
53 |
@Override |
|
54 |
protected Provider doCreate(DynObject parameters, ProviderServices services) { |
|
55 |
return new LocateOnTheMapProvider(parameters, services); |
|
56 |
} |
|
57 |
|
|
58 |
} |
|
0 | 59 |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/java/org/gvsig/educa/thematicmap/lib/prov/locateonthemap/StepGeomSelectGame.java | ||
---|---|---|
1 |
package org.gvsig.educa.thematicmap.lib.prov.locateonthemap; |
|
2 |
|
|
3 |
import java.awt.GridBagConstraints; |
|
4 |
import java.awt.GridBagLayout; |
|
5 |
import java.awt.Insets; |
|
6 |
|
|
7 |
import javax.swing.JComboBox; |
|
8 |
import javax.swing.JLabel; |
|
9 |
import javax.swing.JPanel; |
|
10 |
import javax.swing.JScrollPane; |
|
11 |
import javax.swing.JTextArea; |
|
12 |
import javax.swing.JTextField; |
|
13 |
|
|
14 |
import org.apache.commons.lang3.StringUtils; |
|
15 |
import org.gvsig.educa.thematicmap.ThematicMapLocator; |
|
16 |
import org.gvsig.educa.thematicmap.ThematicMapManager; |
|
17 |
import org.gvsig.educa.thematicmap.compilation.ThematicMapCompilation; |
|
18 |
import org.gvsig.educa.thematicmap.compilation.ThematicMapCompilationInformation; |
|
19 |
import org.gvsig.educa.thematicmap.impl.editor.DefaultThematicMapCompilationEditor; |
|
20 |
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException; |
|
21 |
|
|
22 |
public class StepGeomSelectGame extends JPanel { |
|
23 |
|
|
24 |
private static final GridBagConstraints LABEL_CONSTRAINT = new GridBagConstraints( |
|
25 |
GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE, 1, 1, 0, |
|
26 |
0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(4, |
|
27 |
4, 4, 10), 2, 2); |
|
28 |
|
|
29 |
private static final GridBagConstraints FIELD_CONSTRAINT = new GridBagConstraints( |
|
30 |
GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE, |
|
31 |
GridBagConstraints.REMAINDER, 1, 1, 0, GridBagConstraints.WEST, |
|
32 |
GridBagConstraints.HORIZONTAL, new Insets(4, 4, 4, 10), 2, 2); |
|
33 |
|
|
34 |
private final ThematicMapCompilation compilation; |
|
35 |
|
|
36 |
// private final ThematicMapSwingManager swingManager; |
|
37 |
private final ThematicMapManager swingManager; |
|
38 |
|
|
39 |
@SuppressWarnings("unused") |
|
40 |
private final DefaultThematicMapCompilationEditor editor; |
|
41 |
|
|
42 |
// new |
|
43 |
private String questionString; |
|
44 |
private String columnNameIDString; |
|
45 |
|
|
46 |
private JLabel gameDescriptionText; |
|
47 |
|
|
48 |
private JLabel questionText; |
|
49 |
private JLabel answersText; |
|
50 |
|
|
51 |
private JTextField questionTextField; |
|
52 |
|
|
53 |
private JTextArea answersTextArea; |
|
54 |
|
|
55 |
private JComboBox answerIDComboBox; |
|
56 |
|
|
57 |
private JScrollPane answersListScrollPane; |
|
58 |
|
|
59 |
private JTextField txtId; |
|
60 |
|
|
61 |
private JTextField txtName; |
|
62 |
|
|
63 |
private JTextField txtVersion; |
|
64 |
|
|
65 |
private JTextArea txtDescription; |
|
66 |
|
|
67 |
private boolean allowChangeId; |
|
68 |
|
|
69 |
/** |
|
70 |
* @param defaultThematicMapCompilationEditor |
|
71 |
* @param allowChangeId |
|
72 |
*/ |
|
73 |
public StepGeomSelectGame( |
|
74 |
DefaultThematicMapCompilationEditor defaultThematicMapCompilationEditor, |
|
75 |
boolean allowChangeId) { |
|
76 |
// swingManager = ThematicMapSwingLocator.getSwingManager(); |
|
77 |
swingManager = ThematicMapLocator.getManager(); |
|
78 |
this.editor = defaultThematicMapCompilationEditor; |
|
79 |
this.compilation = defaultThematicMapCompilationEditor.getCompilation(); |
|
80 |
this.allowChangeId = allowChangeId; |
|
81 |
initializeUI(); |
|
82 |
} |
|
83 |
|
|
84 |
private void initializeUI() { |
|
85 |
this.setLayout(new GridBagLayout()); |
|
86 |
|
|
87 |
gameDescriptionText = new JLabel("Descripcion del proceso o ejercicio"); |
|
88 |
questionText = new JLabel( |
|
89 |
"Escribe la pregunta a realizar en el ejercicio:"); |
|
90 |
answersText = new JLabel("Selecciona las posibles respuestas"); |
|
91 |
|
|
92 |
questionTextField = new JTextField("Clicka en la geometr�a correcta"); |
|
93 |
questionTextField.setEditable(true); |
|
94 |
|
|
95 |
String[] itemsIDs = { "id1", "id2", "id3" }; |
|
96 |
// List idList = new ArrayList<String>(); |
|
97 |
answerIDComboBox = new JComboBox(itemsIDs); |
|
98 |
|
|
99 |
String[] answers = getSelectedItemAnswers(); |
|
100 |
|
|
101 |
// mirar si ix un darrere de laltre |
|
102 |
answersTextArea = new JTextArea(answers.toString()); |
|
103 |
answersListScrollPane = new JScrollPane(answersTextArea); |
|
104 |
|
|
105 |
// TODO add fields to container |
|
106 |
|
|
107 |
} |
|
108 |
|
|
109 |
private String[] getSelectedItemAnswers() { |
|
110 |
// TODO retornar columna asociada al item seleccionat |
|
111 |
|
|
112 |
String selectedItem = answerIDComboBox.getSelectedItem().toString(); |
|
113 |
|
|
114 |
// String[] answers = manager.getColumnItems(selectedItem) +- |
|
115 |
|
|
116 |
String[] answers = { "resp1", "resp2", "resp3" }; |
|
117 |
return answers; |
|
118 |
} |
|
119 |
|
|
120 |
/** |
|
121 |
* Add field to form |
|
122 |
* |
|
123 |
* @param key |
|
124 |
* translation key for field name |
|
125 |
* @param component |
|
126 |
* file input component |
|
127 |
* @param large |
|
128 |
* if field is large |
|
129 |
*/ |
|
130 |
// private void addField(String key, JComponent component, boolean large) { |
|
131 |
// GridBagConstraints gbc = LABEL_CONSTRAINT; |
|
132 |
// if (large) { |
|
133 |
// // gbc = LARGE_LABEL_CONSTRAINT; |
|
134 |
// } |
|
135 |
// add(new JLabel(swingManager.getTranslation(key)), gbc.clone()); |
|
136 |
// gbc = FIELD_CONSTRAINT; |
|
137 |
// if (large) { |
|
138 |
// // gbc = LARGE_FIELD_CONSTRAINT; |
|
139 |
// } |
|
140 |
// add(component, gbc.clone()); |
|
141 |
// } |
|
142 |
|
|
143 |
/** {@inheridDoc} */ |
|
144 |
public String getPanelTitle() { |
|
145 |
return swingManager.getTranslation("thematic_map_information"); |
|
146 |
} |
|
147 |
|
|
148 |
/** {@inheridDoc} */ |
|
149 |
public void nextPanel() throws NotContinueWizardException { |
|
150 |
if (StringUtils.isBlank(questionTextField.getText())) { |
|
151 |
throw new NotContinueWizardException( |
|
152 |
swingManager.getTranslation("missing_id_value"), txtId, |
|
153 |
true); |
|
154 |
} |
|
155 |
|
|
156 |
ThematicMapCompilationInformation info = compilation.getInformation(); |
|
157 |
if (allowChangeId) { |
|
158 |
info.setId(StringUtils.trim(txtId.getText())); |
|
159 |
} |
|
160 |
|
|
161 |
// TODO Set columnNameString y questionString a algun lloc (manager del |
|
162 |
// joc?) |
|
163 |
} |
|
164 |
|
|
165 |
/** {@inheridDoc} */ |
|
166 |
public void lastPanel() { |
|
167 |
// TODO Auto-generated method stub |
|
168 |
|
|
169 |
} |
|
170 |
|
|
171 |
/** {@inheridDoc} */ |
|
172 |
public void updatePanel() { |
|
173 |
ThematicMapCompilationInformation info = compilation.getInformation(); |
|
174 |
// TODO: update els meus nous parametres |
|
175 |
txtId.setText(info.getId()); |
|
176 |
txtName.setText(info.getName()); |
|
177 |
txtVersion.setText(String.valueOf(info.getVersion())); |
|
178 |
txtDescription.setText(info.getDescription()); |
|
179 |
} |
|
180 |
|
|
181 |
/** {@inheridDoc} */ |
|
182 |
public JPanel getJPanel() { |
|
183 |
return this; |
|
184 |
} |
|
185 |
|
|
186 |
/** |
|
187 |
* Informs if all data of the panel is ok |
|
188 |
* |
|
189 |
* @return |
|
190 |
*/ |
|
191 |
public boolean isPanelDataOk() { |
|
192 |
try { |
|
193 |
nextPanel(); |
|
194 |
} catch (NotContinueWizardException ex) { |
|
195 |
return false; |
|
196 |
} |
|
197 |
return true; |
|
198 |
} |
|
199 |
|
|
200 |
public boolean isAllowChangeId() { |
|
201 |
return allowChangeId; |
|
202 |
} |
|
203 |
|
|
204 |
public void allowChangeId(boolean allow) { |
|
205 |
this.allowChangeId = allow; |
|
206 |
if (txtId != null) { |
|
207 |
txtId.setEnabled(allow); |
|
208 |
} |
|
209 |
|
|
210 |
} |
|
211 |
|
|
212 |
} |
|
0 | 213 |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/java/org/gvsig/educa/thematicmap/lib/prov/locateonthemap/LocateOnTheMapProvider.java | ||
---|---|---|
1 |
package org.gvsig.educa.thematicmap.lib.prov.locateonthemap; |
|
2 |
|
|
3 |
import javax.swing.JPanel; |
|
4 |
|
|
5 |
import org.gvsig.educa.thematicmap.spi.ThematicMapProvider; |
|
6 |
import org.gvsig.tools.dynobject.DynObject; |
|
7 |
import org.gvsig.tools.service.spi.AbstractProvider; |
|
8 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
9 |
|
|
10 |
public class LocateOnTheMapProvider extends AbstractProvider implements |
|
11 |
ThematicMapProvider { |
|
12 |
|
|
13 |
private DynObject parameters; |
|
14 |
|
|
15 |
/** |
|
16 |
* Creates a new {@link QRespThematicMapProvider} using the provided |
|
17 |
* {@link ProviderServices} reference. |
|
18 |
* |
|
19 |
* @param parameters |
|
20 |
* |
|
21 |
* @param providerServices |
|
22 |
* services of the ThematicMap library for providers. |
|
23 |
*/ |
|
24 |
public LocateOnTheMapProvider(DynObject parameters, |
|
25 |
ProviderServices providerServices) { |
|
26 |
super(providerServices); |
|
27 |
this.parameters = parameters; |
|
28 |
} |
|
29 |
|
|
30 |
public JPanel getPropertiesPanel() { |
|
31 |
// TODO: añadir a thematicmapprovider (done) |
|
32 |
return null; |
|
33 |
} |
|
34 |
|
|
35 |
} |
|
0 | 36 |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/java/org/gvsig/educa/thematicmap/lib/prov/locateonthemap/DefaultGeomSelectSwingManager.java | ||
---|---|---|
1 |
package org.gvsig.educa.thematicmap.lib.prov.locateonthemap; |
|
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
|
|
5 |
import javax.swing.JFrame; |
|
6 |
import javax.swing.JPanel; |
|
7 |
|
|
8 |
import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException; |
|
9 |
import org.gvsig.gui.beans.wizard.panel.OptionPanel; |
|
10 |
import org.gvsig.tools.ToolsLocator; |
|
11 |
import org.gvsig.tools.i18n.I18nManager; |
|
12 |
|
|
13 |
public class DefaultGeomSelectSwingManager extends JPanel implements |
|
14 |
OptionPanel { |
|
15 |
|
|
16 |
private static final long serialVersionUID = 7516346577746142454L; |
|
17 |
|
|
18 |
// private GametestManager manager; (game manager?) |
|
19 |
private I18nManager i18nmanager = null; |
|
20 |
|
|
21 |
private DefaultGameWindow gameWindow; |
|
22 |
|
|
23 |
private JFrame frame; |
|
24 |
|
|
25 |
public DefaultGeomSelectSwingManager() { |
|
26 |
this.i18nmanager = ToolsLocator.getI18nManager(); |
|
27 |
// this.manager = GametestLocator.getManager(); |
|
28 |
} |
|
29 |
|
|
30 |
// public GametestManager getGametestManager() { |
|
31 |
// return this.manager; |
|
32 |
// } |
|
33 |
|
|
34 |
public String getTranslation(String key) { |
|
35 |
return this.i18nmanager.getTranslation(key); |
|
36 |
} |
|
37 |
|
|
38 |
public void createGameWindow() { |
|
39 |
System.out.println("\ncreateGameWindow!\n"); |
|
40 |
|
|
41 |
this.gameWindow = new DefaultGameWindow(); |
|
42 |
|
|
43 |
// 1. Create the frame. |
|
44 |
frame = new JFrame("GameTest Window"); |
|
45 |
|
|
46 |
frame.getContentPane().add(gameWindow, BorderLayout.CENTER); |
|
47 |
|
|
48 |
// 4. Size the frame. |
|
49 |
frame.pack(); |
|
50 |
|
|
51 |
// 5. Show it. |
|
52 |
frame.setVisible(true); |
|
53 |
frame.setAlwaysOnTop(true); |
|
54 |
|
|
55 |
} |
|
56 |
|
|
57 |
public void closeWindow() { |
|
58 |
frame.dispose(); |
|
59 |
} |
|
60 |
|
|
61 |
// public GeomSelect getGametestManager() { |
|
62 |
// // TODO Auto-generated method stub |
|
63 |
// return null; |
|
64 |
// } |
|
65 |
|
|
66 |
public void loadSecondPanel() { |
|
67 |
// TODO Auto-generated method stub |
|
68 |
|
|
69 |
} |
|
70 |
|
|
71 |
public String getPanelTitle() { |
|
72 |
// TODO Auto-generated method stub |
|
73 |
return null; |
|
74 |
} |
|
75 |
|
|
76 |
public void nextPanel() throws NotContinueWizardException { |
|
77 |
// TODO Auto-generated method stub |
|
78 |
|
|
79 |
} |
|
80 |
|
|
81 |
public void lastPanel() { |
|
82 |
// TODO Auto-generated method stub |
|
83 |
|
|
84 |
} |
|
85 |
|
|
86 |
public void updatePanel() { |
|
87 |
// TODO Auto-generated method stub |
|
88 |
|
|
89 |
} |
|
90 |
|
|
91 |
public JPanel getJPanel() { |
|
92 |
// TODO Auto-generated method stub |
|
93 |
return null; |
|
94 |
} |
|
95 |
|
|
96 |
// public void loadSecondPanel() { |
|
97 |
// gametestPanel.loadSecondPanel(); |
|
98 |
// } |
|
99 |
|
|
100 |
} |
|
0 | 101 |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/src/main/java/org/gvsig/educa/thematicmap/lib/prov/locateonthemap/LocateOnTheMapProviderLibrary.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2010 {Prodevelop} {Task} |
|
26 |
*/ |
|
27 |
|
|
28 |
package org.gvsig.educa.thematicmap.lib.prov.locateonthemap; |
|
29 |
|
|
30 |
import org.gvsig.educa.thematicmap.ThematicMapLibrary; |
|
31 |
import org.gvsig.educa.thematicmap.spi.ThematicMapProviderLocator; |
|
32 |
import org.gvsig.tools.library.AbstractLibrary; |
|
33 |
import org.gvsig.tools.library.LibraryException; |
|
34 |
|
|
35 |
public class LocateOnTheMapProviderLibrary extends AbstractLibrary { |
|
36 |
|
|
37 |
@Override |
|
38 |
public void doRegistration() { |
|
39 |
registerAsServiceOf(ThematicMapLibrary.class); |
|
40 |
} |
|
41 |
|
|
42 |
@Override |
|
43 |
protected void doInitialize() throws LibraryException { |
|
44 |
} |
|
45 |
|
|
46 |
@Override |
|
47 |
protected void doPostInitialize() throws LibraryException { |
|
48 |
ThematicMapProviderLocator.getManager().addProviderFactory( |
|
49 |
new LocateOnTheMapProviderFactory()); |
|
50 |
} |
|
51 |
} |
|
0 | 52 |
org.gvsig.educa.thematicmap/trunk/org.gvsig.educa.thematicmap/org.gvsig.educa.thematicmap.lib/org.gvsig.educa.thematicmap.lib.prov.locateonthemap/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.educa.thematicmap.lib.prov.locateonthemap</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.educa.thematicmap.lib.prov.locateonthemap</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.educa.thematicmap.lib</artifactId> |
|
11 |
<version>1.0.0-SNAPSHOT</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.educa.thematicmap.lib.api</artifactId> |
|
17 |
<scope>compile</scope> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.educa.thematicmap.lib.spi</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.installer.lib.api</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.educa.thematicmap.lib.impl</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.ui</artifactId> |
|
37 |
<scope>compile</scope> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.installer.lib.spi</artifactId> |
|
42 |
<scope>compile</scope> |
|
43 |
</dependency> |
|
44 |
</dependencies> |
|
45 |
</project> |
|
0 | 46 |
Also available in: Unified diff