Revision 42508
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.snapping.app/org.gvsig.snapping.app.mainplugin/src/main/java/org/gvsig/app/extension/SnappingExtension.java | ||
---|---|---|
25 | 25 |
import org.gvsig.andami.IconThemeHelper; |
26 | 26 |
import org.gvsig.andami.PluginServices; |
27 | 27 |
import org.gvsig.andami.plugins.Extension; |
28 |
import org.gvsig.andami.preferences.IPreference; |
|
29 |
import org.gvsig.andami.preferences.IPreferenceExtension; |
|
28 | 30 |
import org.gvsig.app.gui.preferencespage.GridPage; |
29 | 31 |
import org.gvsig.app.gui.preferencespage.SnapConfigPage; |
30 | 32 |
import org.gvsig.app.project.documents.view.ViewDocument; |
... | ... | |
40 | 42 |
import org.gvsig.fmap.mapcontrol.MapControlManager; |
41 | 43 |
import org.gvsig.fmap.mapcontrol.tools.snapping.snappers.ISnapper; |
42 | 44 |
import org.gvsig.propertypage.PropertiesPageManager; |
43 |
import org.gvsig.tools.ToolsLocator; |
|
44 |
import org.gvsig.tools.extensionpoint.ExtensionPoint; |
|
45 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
|
46 | 45 |
|
47 | 46 |
/** |
48 | 47 |
* Extension for config the snapping |
... | ... | |
50 | 49 |
* @author fdiaz |
51 | 50 |
* |
52 | 51 |
*/ |
53 |
public class SnappingExtension extends Extension { |
|
52 |
public class SnappingExtension extends Extension implements IPreferenceExtension {
|
|
54 | 53 |
|
55 |
private static MapControlManager mapControlManager = MapControlLocator.getMapControlManager();
|
|
56 |
|
|
54 |
private IPreference[] preferencePages = null;
|
|
55 |
|
|
57 | 56 |
public void initialize() { |
58 | 57 |
Snapping.register(); |
59 | 58 |
|
60 | 59 |
registerIcons(); |
61 | 60 |
|
61 |
MapControlManager mapControlManager = MapControlLocator.getMapControlManager(); |
|
62 | 62 |
for (int n = 0; n < mapControlManager.getSnapperCount(); n++) { |
63 | 63 |
ISnapper snp = (ISnapper) mapControlManager.getSnapperAt(n); |
64 | 64 |
String nameClass = snp.getClass().getName(); |
... | ... | |
83 | 83 |
|
84 | 84 |
@Override |
85 | 85 |
public void postInitialize() { |
86 |
ExtensionPointManager extensionPoints |
|
87 |
= ToolsLocator.getExtensionPointManager(); |
|
88 |
ExtensionPoint ep = extensionPoints.add("AplicationPreferences", ""); |
|
89 |
ep.append("Snapping", "", new SnapConfigPage()); |
|
90 |
ep.append("Grid", "", new GridPage()); |
|
86 |
|
|
91 | 87 |
} |
92 | 88 |
|
93 | 89 |
private void registerIcons() { |
... | ... | |
141 | 137 |
return false; |
142 | 138 |
} |
143 | 139 |
|
140 |
@Override |
|
141 |
public IPreference[] getPreferencesPages() { |
|
142 |
if( this.preferencePages == null ) { |
|
143 |
this.preferencePages = new IPreference[] { |
|
144 |
new SnapConfigPage(), |
|
145 |
new GridPage() |
|
146 |
}; |
|
147 |
} |
|
148 |
return this.preferencePages; |
|
149 |
} |
|
144 | 150 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.snapping.app/org.gvsig.snapping.app.mainplugin/src/main/java/org/gvsig/app/gui/preferencespage/GridPage.java | ||
---|---|---|
21 | 21 |
* For any additional information, do not hesitate to contact us |
22 | 22 |
* at info AT gvsig.com, or visit our website www.gvsig.com. |
23 | 23 |
*/ |
24 |
/* CVS MESSAGES: |
|
25 |
* |
|
26 |
* $Id: GridPage.java 21668 2008-06-19 09:05:14Z vcaballero $ |
|
27 |
* $Log$ |
|
28 |
* Revision 1.4 2006-08-22 12:27:53 jaume |
|
29 |
* improved performances when saving |
|
30 |
* |
|
31 |
* Revision 1.3 2006/08/22 07:37:32 jaume |
|
32 |
* *** empty log message *** |
|
33 |
* |
|
34 |
* Revision 1.2 2006/08/10 11:13:02 caballero |
|
35 |
* mostrar unidades |
|
36 |
* |
|
37 |
* Revision 1.1 2006/08/10 08:18:35 caballero |
|
38 |
* configurar grid |
|
39 |
* |
|
40 |
* Revision 1.1 2006/08/04 11:41:05 caballero |
|
41 |
* poder especificar el zoom a aplicar en las vistas |
|
42 |
* |
|
43 |
* Revision 1.3 2006/07/31 10:02:31 jaume |
|
44 |
* *** empty log message *** |
|
45 |
* |
|
46 |
* Revision 1.2 2006/06/13 07:43:08 fjp |
|
47 |
* Ajustes sobre los cuadros de dialogos de preferencias |
|
48 |
* |
|
49 |
* Revision 1.1 2006/06/12 16:04:28 caballero |
|
50 |
* Preferencias |
|
51 |
* |
|
52 |
* Revision 1.11 2006/06/06 10:26:31 jaume |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.10 2006/06/05 17:07:17 jaume |
|
56 |
* *** empty log message *** |
|
57 |
* |
|
58 |
* Revision 1.9 2006/06/05 17:00:44 jaume |
|
59 |
* *** empty log message *** |
|
60 |
* |
|
61 |
* Revision 1.8 2006/06/05 16:57:59 jaume |
|
62 |
* *** empty log message *** |
|
63 |
* |
|
64 |
* Revision 1.7 2006/06/05 14:45:06 jaume |
|
65 |
* *** empty log message *** |
|
66 |
* |
|
67 |
* Revision 1.6 2006/06/05 11:00:09 jaume |
|
68 |
* *** empty log message *** |
|
69 |
* |
|
70 |
* Revision 1.5 2006/06/05 10:39:02 jaume |
|
71 |
* *** empty log message *** |
|
72 |
* |
|
73 |
* Revision 1.4 2006/06/05 10:13:40 jaume |
|
74 |
* *** empty log message *** |
|
75 |
* |
|
76 |
* Revision 1.3 2006/06/05 10:06:08 jaume |
|
77 |
* *** empty log message *** |
|
78 |
* |
|
79 |
* Revision 1.2 2006/06/05 09:51:56 jaume |
|
80 |
* *** empty log message *** |
|
81 |
* |
|
82 |
* Revision 1.1 2006/06/02 10:50:18 jaume |
|
83 |
* *** empty log message *** |
|
84 |
* |
|
85 |
* |
|
86 |
*/ |
|
87 | 24 |
package org.gvsig.app.gui.preferencespage; |
88 | 25 |
|
89 | 26 |
import javax.swing.ImageIcon; |
... | ... | |
221 | 158 |
} |
222 | 159 |
|
223 | 160 |
public ImageIcon getIcon() { |
224 |
return icon;
|
|
225 |
}
|
|
161 |
return icon;
|
|
162 |
}
|
|
226 | 163 |
|
227 | 164 |
public boolean isValueChanged() { |
228 | 165 |
return super.hasChanged(); |
Also available in: Unified diff