svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extEditing / src / org / gvsig / editing / CADExtension.java @ 39580
History | View | Annotate | Download (16.8 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2004 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 |
package org.gvsig.editing; |
42 |
|
43 |
import java.awt.KeyEventPostProcessor; |
44 |
import java.awt.KeyboardFocusManager; |
45 |
import java.awt.event.ActionEvent; |
46 |
import java.awt.event.ActionListener; |
47 |
import java.awt.event.KeyEvent; |
48 |
import java.awt.event.MouseEvent; |
49 |
import java.util.HashMap; |
50 |
|
51 |
import javax.swing.AbstractAction; |
52 |
import javax.swing.JMenuItem; |
53 |
import javax.swing.JPopupMenu; |
54 |
import javax.swing.JTable; |
55 |
import javax.swing.KeyStroke; |
56 |
import javax.swing.text.JTextComponent; |
57 |
|
58 |
import org.gvsig.andami.IconThemeHelper; |
59 |
import org.gvsig.andami.PluginServices; |
60 |
import org.gvsig.andami.PluginsLocator; |
61 |
import org.gvsig.andami.PluginsManager; |
62 |
import org.gvsig.andami.plugins.Extension; |
63 |
import org.gvsig.andami.preferences.IPreference; |
64 |
import org.gvsig.andami.preferences.IPreferenceExtension; |
65 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
66 |
import org.gvsig.app.project.documents.view.gui.DefaultViewPanel; |
67 |
import org.gvsig.editing.gui.accelerators.ForceCursorAccelerator; |
68 |
import org.gvsig.editing.gui.accelerators.GridAccelerator; |
69 |
import org.gvsig.editing.gui.accelerators.OrtoAccelerator; |
70 |
import org.gvsig.editing.gui.accelerators.RefentAccelerator; |
71 |
import org.gvsig.editing.gui.cad.CADTool; |
72 |
import org.gvsig.editing.gui.cad.CADToolAdapter; |
73 |
import org.gvsig.editing.gui.cad.tools.CopyCADTool; |
74 |
import org.gvsig.editing.gui.cad.tools.RotateCADTool; |
75 |
import org.gvsig.editing.gui.cad.tools.ScaleCADTool; |
76 |
import org.gvsig.editing.gui.cad.tools.SymmetryCADTool; |
77 |
import org.gvsig.editing.gui.preferences.EditingPage; |
78 |
import org.gvsig.editing.project.documents.view.toc.MenuEntry; |
79 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
80 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
81 |
import org.gvsig.fmap.mapcontrol.MapControl; |
82 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
83 |
import org.gvsig.fmap.mapcontrol.MapControlManager; |
84 |
import org.gvsig.tools.dynobject.DynObject; |
85 |
import org.gvsig.utils.console.JConsole; |
86 |
import org.gvsig.utils.console.ResponseListener; |
87 |
import org.gvsig.utils.console.jedit.JEditTextArea; |
88 |
import org.slf4j.Logger; |
89 |
import org.slf4j.LoggerFactory; |
90 |
|
91 |
|
92 |
/**
|
93 |
* Extensi?n dedicada a controlar las diferentes operaciones sobre el editado de
|
94 |
* una capa.
|
95 |
*
|
96 |
* @author Vicente Caballero Navarro
|
97 |
*/
|
98 |
public class CADExtension extends Extension implements IPreferenceExtension{ |
99 |
private static Logger logger = LoggerFactory.getLogger(CADExtension.class); |
100 |
|
101 |
private static HashMap adapters=new HashMap(); |
102 |
|
103 |
private static DefaultViewPanel view; |
104 |
|
105 |
private MapControl mapControl;
|
106 |
private static CADToolAdapter adapter=null; |
107 |
private EditingPage editingPage=new EditingPage(); |
108 |
|
109 |
|
110 |
/**
|
111 |
* Gets the CADToolAdapter of the view where the layer is
|
112 |
* contained or null if the layer is not found
|
113 |
* in any view
|
114 |
*
|
115 |
* @param layer
|
116 |
* @return
|
117 |
*
|
118 |
* @deprecated Use same method in {@link EditionLocator}
|
119 |
*/
|
120 |
public static CADToolAdapter getCADToolAdapter(FLayer layer) { |
121 |
|
122 |
return EditionLocator.getCADToolAdapter(layer);
|
123 |
} |
124 |
|
125 |
/**
|
126 |
* Gets the CADToolAdapter of the current active view
|
127 |
* or the CADToolAdapter of the view that was active more
|
128 |
* recently (if there is not an active view)
|
129 |
* or null if there never was an active view
|
130 |
*
|
131 |
* @return
|
132 |
*
|
133 |
* @deprecated Use same method in {@link EditionLocator}
|
134 |
*/
|
135 |
public static CADToolAdapter getCADToolAdapter() { |
136 |
|
137 |
return EditionLocator.getCADToolAdapter();
|
138 |
} |
139 |
|
140 |
/**
|
141 |
* @see org.gvsig.andami.plugins.IExtension#initialize()
|
142 |
*/
|
143 |
public void initialize() { |
144 |
|
145 |
// Registramos los Popup menus:
|
146 |
MenuEntry.register(); |
147 |
|
148 |
CopyCADTool copy = new CopyCADTool();
|
149 |
RotateCADTool rotate = new RotateCADTool();
|
150 |
ScaleCADTool scale = new ScaleCADTool();
|
151 |
SymmetryCADTool symmetry=new SymmetryCADTool();
|
152 |
addCADTool("_copy", copy);
|
153 |
addCADTool("_rotate", rotate);
|
154 |
addCADTool("_scale", scale);
|
155 |
addCADTool("_symmetry", symmetry);
|
156 |
|
157 |
KeyboardFocusManager kfm = KeyboardFocusManager |
158 |
.getCurrentKeyboardFocusManager(); |
159 |
kfm.addKeyEventPostProcessor(new myKeyEventPostProcessor());
|
160 |
|
161 |
registerIcons(); |
162 |
} |
163 |
|
164 |
@Override
|
165 |
public void postInitialize() { |
166 |
//Register the edition symbology
|
167 |
registerEditionSymbology(); |
168 |
} |
169 |
|
170 |
/**
|
171 |
* It registers the default symbology used in edition
|
172 |
*/
|
173 |
private void registerEditionSymbology() { |
174 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
175 |
DynObject dynObject = pluginsManager.getPlugin(getClass()).getPluginProperties(); |
176 |
|
177 |
MapControlManager mapControlManager = MapControlLocator.getMapControlManager(); |
178 |
|
179 |
if (dynObject.hasDynValue(EditingPage.DEFAULT_AXIS_REFERENCES_SYMBOL)){
|
180 |
mapControlManager.setAxisReferenceSymbol( |
181 |
(ISymbol)dynObject.getDynValue(EditingPage.DEFAULT_AXIS_REFERENCES_SYMBOL)); |
182 |
} |
183 |
|
184 |
if (dynObject.hasDynValue(EditingPage.DEFAULT_RECTANGLE_SELECTION_SYMBOL)) {
|
185 |
mapControlManager.setGeometrySelectionSymbol( |
186 |
(ISymbol)dynObject.getDynValue(EditingPage.DEFAULT_RECTANGLE_SELECTION_SYMBOL)); |
187 |
} |
188 |
|
189 |
if (dynObject.hasDynValue(EditingPage.DEFAULT_HANDLER_SYMBOL)) {
|
190 |
mapControlManager.setHandlerSymbol( |
191 |
(ISymbol)dynObject.getDynValue(EditingPage.DEFAULT_HANDLER_SYMBOL)); |
192 |
} |
193 |
} |
194 |
|
195 |
private void registerIcons(){ |
196 |
IconThemeHelper.registerIcon("action", "layer-modify-copy", this); |
197 |
IconThemeHelper.registerIcon("action", "layer-modify-symmetry", this); |
198 |
IconThemeHelper.registerIcon("action", "layer-modify-rotate", this); |
199 |
IconThemeHelper.registerIcon("action", "layer-modify-scale", this); |
200 |
IconThemeHelper.registerIcon("action", "layer-modify-edit-vertex", this); |
201 |
IconThemeHelper.registerIcon("action", "layer-modify-join", this); |
202 |
IconThemeHelper.registerIcon("action", "layer-modify-matrix", this); |
203 |
IconThemeHelper.registerIcon("action", "layer-modify-move", this); |
204 |
IconThemeHelper.registerIcon("action", "layer-modify-rotate", this); |
205 |
IconThemeHelper.registerIcon("action", "layer-modify-stretch", this); |
206 |
|
207 |
|
208 |
IconThemeHelper.registerIcon("preferences", "preferences-layer-modify-flatness", this); |
209 |
IconThemeHelper.registerIcon("preferences", "preferences-snapper", this); |
210 |
} |
211 |
|
212 |
/**
|
213 |
* @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String)
|
214 |
*/
|
215 |
public void execute(String s) { |
216 |
initFocus(); |
217 |
if( "layer-modify-copy".equalsIgnoreCase(s) ) { |
218 |
setCADTool("_copy", true); |
219 |
} else if( "layer-modify-symmetry".equalsIgnoreCase(s) ) { |
220 |
setCADTool("_symmetry", true); |
221 |
} else if( "layer-modify-rotate".equalsIgnoreCase(s) ) { |
222 |
setCADTool("_rotate", true); |
223 |
} else if( "layer-modify-scale".equalsIgnoreCase(s) ) { |
224 |
setCADTool("_scale", true); |
225 |
|
226 |
// -------------------------------
|
227 |
// The following action commands are not declared
|
228 |
// in the section of config.xml dedicated to CADExtension.
|
229 |
// They are used in other extensions of this plugin.
|
230 |
// -------------------------------
|
231 |
/*
|
232 |
} else if( "layer-modify-edit-vertex".equalsIgnoreCase(s) ) {
|
233 |
setCADTool("_editvertex", true);
|
234 |
} else if( "layer-modify-join".equalsIgnoreCase(s) ) {
|
235 |
setCADTool("_join", true);
|
236 |
} else if( "layer-modify-matrix".equalsIgnoreCase(s) ) {
|
237 |
setCADTool("_matriz", true);
|
238 |
} else if( "layer-modify-move".equalsIgnoreCase(s) ) {
|
239 |
setCADTool("_move", true);
|
240 |
} else if( "layer-modify-stretch".equalsIgnoreCase(s) ) {
|
241 |
setCADTool("_stretch", true);
|
242 |
*/
|
243 |
|
244 |
} else {
|
245 |
logger.info("Action command '"+s+"' not supportted in "+this.getClass().getName()); |
246 |
} |
247 |
CADToolAdapter cta=getCADToolAdapter(); |
248 |
cta.configureMenu(); |
249 |
} |
250 |
|
251 |
public static void addCADTool(String name, CADTool c) { |
252 |
CADToolAdapter.addCADTool(name, c); |
253 |
} |
254 |
|
255 |
public static void setCADTool(String text, boolean showCommand) { |
256 |
CADToolAdapter cta=getCADToolAdapter(); |
257 |
CADTool ct=cta.getCADTool(text); |
258 |
|
259 |
if (ct == null) |
260 |
throw new RuntimeException("No such cad tool"); |
261 |
cta.initializeFlatness(); |
262 |
cta.setCadTool(ct); |
263 |
ct.init(); |
264 |
if (showCommand) {
|
265 |
if (PluginServices.getMDIManager().getActiveWindow() instanceof DefaultViewPanel) { |
266 |
DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow(); |
267 |
vista.getConsolePanel().addText("\n" + ct.getName(),
|
268 |
JConsole.COMMAND); |
269 |
cta.askQuestion(); |
270 |
} |
271 |
} |
272 |
// PluginServices.getMainFrame().setSelectedTool("SELECT");
|
273 |
// PluginServices.getMainFrame().enableControls();
|
274 |
} |
275 |
|
276 |
public static CADTool getCADTool() { |
277 |
CADToolAdapter cta=getCADToolAdapter(); |
278 |
return cta.getCadTool();
|
279 |
} |
280 |
|
281 |
/**
|
282 |
* @see org.gvsig.andami.plugins.IExtension#isEnabled()
|
283 |
*/
|
284 |
public boolean isEnabled() { |
285 |
// initFocus();
|
286 |
return true; |
287 |
} |
288 |
|
289 |
/**
|
290 |
* @see org.gvsig.andami.plugins.IExtension#isVisible()
|
291 |
*/
|
292 |
public boolean isVisible() { |
293 |
if (EditionUtilities.getEditionStatus() == EditionUtilities.EDITION_STATUS_ONE_VECTORIAL_LAYER_ACTIVE_AND_EDITABLE) {
|
294 |
view = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow(); |
295 |
mapControl = view.getMapControl(); |
296 |
FLayer[] layers = mapControl.getMapContext().getLayers()
|
297 |
.getActives(); |
298 |
// if (!(layers[0] instanceof FLyrAnnotation)) {
|
299 |
// return true;
|
300 |
// }
|
301 |
return true; |
302 |
} |
303 |
return false; |
304 |
} |
305 |
|
306 |
public MapControl getMapControl() {
|
307 |
return getEditionManager().getMapControl();
|
308 |
} |
309 |
|
310 |
class KeyAction extends AbstractAction { |
311 |
|
312 |
private String key; |
313 |
|
314 |
public KeyAction(String key) { |
315 |
this.key = key;
|
316 |
} |
317 |
|
318 |
/*
|
319 |
* (non-Javadoc)
|
320 |
*
|
321 |
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
322 |
*/
|
323 |
public void actionPerformed(ActionEvent e) { |
324 |
view.focusConsole(key); |
325 |
} |
326 |
|
327 |
} |
328 |
|
329 |
class MyAction extends AbstractAction { |
330 |
private String actionCommand; |
331 |
|
332 |
public MyAction(String command) { |
333 |
actionCommand = command; |
334 |
} |
335 |
|
336 |
/**
|
337 |
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
|
338 |
*/
|
339 |
public void actionPerformed(ActionEvent e) { |
340 |
CADToolAdapter cta=getCADToolAdapter(); |
341 |
cta.keyPressed(actionCommand); |
342 |
} |
343 |
|
344 |
} |
345 |
|
346 |
/**
|
347 |
* @author fjp
|
348 |
*
|
349 |
* La idea es usar esto para recibir lo que el usuario escribe y enviarlo a
|
350 |
* la consola de la vista para que salga por all?.
|
351 |
*/
|
352 |
private class myKeyEventPostProcessor implements KeyEventPostProcessor { |
353 |
|
354 |
public boolean postProcessKeyEvent(KeyEvent e) { |
355 |
// System.out.println("KeyEvent e = " + e);
|
356 |
CADToolAdapter cta=getCADToolAdapter(); |
357 |
if ((cta == null) || (view == null)) |
358 |
return false; |
359 |
|
360 |
if (cta.getMapControl() == null){ |
361 |
return false; |
362 |
} |
363 |
|
364 |
if (e.getID() != KeyEvent.KEY_RELEASED) |
365 |
return false; |
366 |
if (!(e.getComponent() instanceof JTextComponent)) { |
367 |
if (e.getKeyCode() == KeyEvent.VK_DELETE) |
368 |
cta.keyPressed("eliminar");
|
369 |
else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) |
370 |
cta.keyPressed("escape");
|
371 |
else if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
372 |
// TODO: REVISAR ESTO CUANDO VIENE UN INTRO DESDE UN
|
373 |
// JTEXTAREA
|
374 |
// QUE NO ES EL DE CONSOLA
|
375 |
if (!(e.getSource() instanceof JTable)) |
376 |
view.focusConsole("");
|
377 |
} |
378 |
else if ((!e.isActionKey() && e.getKeyCode()!=KeyEvent.VK_TAB)) { |
379 |
//if (Character.isLetterOrDigit(e.getKeyChar())) {
|
380 |
Character keyChar = new Character(e.getKeyChar()); |
381 |
if (e.getComponent().getName() != null) { |
382 |
/*
|
383 |
System.out
|
384 |
.println("Evento de teclado desde el componente "
|
385 |
+ e.getComponent().getName());
|
386 |
*/
|
387 |
if (!e.getComponent().getName().equals(
|
388 |
"CADConsole")) {
|
389 |
view.focusConsole(keyChar + "");
|
390 |
} |
391 |
} else {
|
392 |
if (!(e.getComponent() instanceof JTextComponent)) { |
393 |
view.focusConsole(keyChar + "");
|
394 |
} |
395 |
} |
396 |
//}
|
397 |
} |
398 |
} |
399 |
return false; |
400 |
} |
401 |
|
402 |
} |
403 |
|
404 |
/*
|
405 |
* private void registerKeyStrokes(){ for (char key = '0'; key <= '9';
|
406 |
* key++){ Character keyChar = new Character(key);
|
407 |
* mapControl.getInputMap(MapControl.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(key),
|
408 |
* keyChar); mapControl.getActionMap().put(keyChar, new
|
409 |
* KeyAction(keyChar+"")); } for (char key = 'a'; key <= 'z'; key++){
|
410 |
* Character keyChar = new Character(key);
|
411 |
* mapControl.getInputMap(MapControl.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(key),
|
412 |
* keyChar); mapControl.getActionMap().put(keyChar, new
|
413 |
* KeyAction(keyChar+"")); } for (char key = 'A'; key <= 'Z'; key++){
|
414 |
* Character keyChar = new Character(key);
|
415 |
* mapControl.getInputMap(MapControl.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(key),
|
416 |
* keyChar); mapControl.getActionMap().put(keyChar, new
|
417 |
* KeyAction(keyChar+"")); }
|
418 |
* //this.getInputMap(WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
|
419 |
* 0), "enter"); //this.getActionMap().put("enter", new MyAction("enter"));
|
420 |
* Character keyChar = new
|
421 |
* Character(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0).getKeyChar());
|
422 |
* mapControl.getInputMap(MapControl.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,
|
423 |
* 0),keyChar); mapControl.getActionMap().put(keyChar, new KeyAction(""));
|
424 |
* // El espacio como si fuera INTRO Character keyCharSpace = new
|
425 |
* Character(' ');
|
426 |
* mapControl.getInputMap(MapControl.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke('
|
427 |
* '), keyCharSpace); mapControl.getActionMap().put(keyCharSpace, new
|
428 |
* KeyAction(""));
|
429 |
*
|
430 |
* }
|
431 |
*/
|
432 |
private static JPopupMenu popup = new JPopupMenu(); |
433 |
|
434 |
public static void clearMenu() { |
435 |
popup.removeAll(); |
436 |
} |
437 |
|
438 |
public static void addMenuEntry(String text) { |
439 |
JMenuItem menu = new JMenuItem(text); |
440 |
menu.setActionCommand(text); |
441 |
menu.setEnabled(true);
|
442 |
menu.setVisible(true);
|
443 |
menu.addActionListener(new ActionListener() { |
444 |
public void actionPerformed(ActionEvent e) { |
445 |
CADToolAdapter cta=getCADToolAdapter(); |
446 |
cta.transition(e.getActionCommand()); |
447 |
} |
448 |
}); |
449 |
|
450 |
popup.add(menu); |
451 |
} |
452 |
|
453 |
public static void showPopup(MouseEvent e) { |
454 |
popup.show(e.getComponent(), e.getX(), e.getY()); |
455 |
} |
456 |
|
457 |
public static DefaultViewPanel getView() { |
458 |
return view;
|
459 |
} |
460 |
|
461 |
public static void clearView() { |
462 |
view = null;
|
463 |
} |
464 |
|
465 |
/**
|
466 |
*
|
467 |
* Gets the edition manager of the currently active view
|
468 |
* or the edition manager of the view that was active more
|
469 |
* recently (if there is not an active view)
|
470 |
* or null if there never was an active view
|
471 |
*
|
472 |
* @return Returns the editionManager.
|
473 |
*
|
474 |
* @deprecated Use same method in {@link EditionLocator}
|
475 |
*/
|
476 |
public static EditionManager getEditionManager() { |
477 |
return EditionLocator.getEditionManager();
|
478 |
} |
479 |
|
480 |
public static CADTool[] getCADTools() { |
481 |
return CADToolAdapter.getCADTools();
|
482 |
} |
483 |
|
484 |
public static void initFocus() { |
485 |
view = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow(); |
486 |
MapControl mapControl = view.getMapControl(); |
487 |
CADToolAdapter cta=getCADToolAdapter(); |
488 |
if (!mapControl.getNamesMapTools().containsKey("cadtooladapter")){ |
489 |
// StatusBarListener sbl=new StatusBarListener(view.getMapControl());
|
490 |
// mapControl.addMapTool("cadtooladapter", new Behavior[]{adapter,new MouseMovementBehavior(sbl)});
|
491 |
mapControl.addBehavior("cadtooladapter", cta);
|
492 |
} |
493 |
// view.getMapControl().setTool("cadtooladapter");
|
494 |
JEditTextArea jeta=view.getConsolePanel().getTxt(); |
495 |
jeta.requestFocusInWindow(); |
496 |
jeta.setCaretPosition(jeta.getText().length()); |
497 |
|
498 |
view.addConsoleListener("cad", new ResponseListener() { |
499 |
public void acceptResponse(String response) { |
500 |
CADToolAdapter cta=getCADToolAdapter(); |
501 |
cta.textEntered(response); |
502 |
// TODO:
|
503 |
// FocusManager fm=FocusManager.getCurrentManager();
|
504 |
// fm.focusPreviousComponent(mapControl);
|
505 |
/*
|
506 |
* if (popup.isShowing()){ popup.setVisible(false); }
|
507 |
*/
|
508 |
|
509 |
} |
510 |
}); |
511 |
cta.getEditionManager().setMapControl(mapControl); |
512 |
view.getMapControl().setTool("cadtooladapter");
|
513 |
} |
514 |
|
515 |
public IPreference[] getPreferencesPages() { |
516 |
IPreference[] preferences=new IPreference[1]; |
517 |
preferences[0]=editingPage;
|
518 |
return preferences;
|
519 |
} |
520 |
} |