Revision 38765 branches/v2_0_0_prep/extensions/extEditing/src/org/gvsig/editing/gui/preferences/SnapConfigPage.java
SnapConfigPage.java | ||
---|---|---|
1 | 1 |
package org.gvsig.editing.gui.preferences; |
2 | 2 |
|
3 | 3 |
import java.awt.BorderLayout; |
4 |
import java.util.ArrayList;
|
|
5 |
import java.util.Iterator;
|
|
4 |
import java.awt.event.MouseEvent;
|
|
5 |
import java.awt.event.MouseListener;
|
|
6 | 6 |
import java.util.prefs.Preferences; |
7 | 7 |
|
8 | 8 |
import javax.swing.ImageIcon; |
... | ... | |
10 | 10 |
|
11 | 11 |
import org.gvsig.andami.IconThemeHelper; |
12 | 12 |
import org.gvsig.andami.PluginServices; |
13 |
import org.gvsig.andami.messages.NotificationManager; |
|
14 | 13 |
import org.gvsig.andami.preferences.AbstractPreferencePage; |
15 | 14 |
import org.gvsig.andami.preferences.StoreException; |
16 | 15 |
import org.gvsig.andami.ui.mdiManager.IWindow; |
... | ... | |
20 | 19 |
import org.gvsig.fmap.mapcontrol.MapControlLocator; |
21 | 20 |
import org.gvsig.fmap.mapcontrol.MapControlManager; |
22 | 21 |
import org.gvsig.fmap.mapcontrol.tools.snapping.snappers.ISnapper; |
23 |
import org.gvsig.tools.ToolsLocator; |
|
24 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
|
25 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
|
26 |
import org.gvsig.tools.extensionpoint.ExtensionPoint.Extension; |
|
27 | 22 |
|
28 | 23 |
|
29 | 24 |
|
... | ... | |
45 | 40 |
super(); |
46 | 41 |
this.setLayout(new BorderLayout()); |
47 | 42 |
IWindow window=PluginServices.getMDIManager().getActiveWindow(); |
48 |
if (window instanceof DefaultViewPanel){ |
|
49 |
mc=((DefaultViewPanel)window).getMapControl(); |
|
50 |
snapConfig = new SnapConfig(mc); |
|
51 |
snapConfig.setSnappers(); |
|
52 |
add(snapConfig, BorderLayout.CENTER); |
|
43 |
if (window instanceof DefaultViewPanel) { |
|
44 |
|
|
45 |
mc = ((DefaultViewPanel)window).getMapControl(); |
|
46 |
snapConfig = new SnapConfig(mc, new MouseListener() { |
|
47 |
/* |
|
48 |
* Any mouse event in the relevant components |
|
49 |
* of SnapConfig will cause changed = true |
|
50 |
*/ |
|
51 |
public void mousePressed(MouseEvent e) { |
|
52 |
setChanged(true); |
|
53 |
} |
|
54 |
public void mouseReleased(MouseEvent e) { } |
|
55 |
public void mouseExited(MouseEvent e) { } |
|
56 |
public void mouseEntered(MouseEvent e) { } |
|
57 |
public void mouseClicked(MouseEvent e) { } |
|
58 |
}); |
|
59 |
|
|
60 |
snapConfig.setSnappers(); |
|
61 |
add(snapConfig, BorderLayout.CENTER); |
|
53 | 62 |
} |
54 | 63 |
|
55 | 64 |
} |
... | ... | |
178 | 187 |
public boolean isResizeable() { |
179 | 188 |
return true; |
180 | 189 |
} |
190 |
|
|
181 | 191 |
|
182 | 192 |
|
183 | 193 |
} |
Also available in: Unified diff