net.refractions.udig.mapgraphic
Class AbstractToggleMapGraphicAction
java.lang.Object
ActionDelegate
net.refractions.udig.mapgraphic.AbstractToggleMapGraphicAction
- Direct Known Subclasses:
- AddGridAction, ScalebarAction
public abstract class AbstractToggleMapGraphicAction
- extends ActionDelegate
This is a helper class for MapGraphics that should be toggled on and off. Some good candidates
are: Scalebar and legend.
This Example is the adding a Toggle action for LegendGraphic.
The following xml snippet must be added to the plugin.xml
<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="net.refractions.udig.project.ui.mapGraphic.action"
label="MapGraphics"
visible="true">
<action
class="net.refractions.udig.legend.ui.actions.LegendAction"
id="net.refractions.udig.project.ui.action.addlegend"
label="Legend"
menubarPath="layer/mapGraphic.ext"
style="push"/>
</actionSet>
</extension>
The following class must be refered to by the xml snippet above(the class attribute)
public class LegendAction extends ActionDelegate implements IWorkbenchWindowActionDelegate {
protected Class getMapGraphicClass() {
return LegendGraphic.class;
}
protected String getExtensionID() {
return "legend"; //$NON-NLS-1$
}
public void init( IWorkbenchWindow window ) {
}
}
- Since:
- 1.1.0
- Author:
- Jesse
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractToggleMapGraphicAction
public AbstractToggleMapGraphicAction()
run
public void run(IAction action)
getMapGraphicClass
protected abstract java.lang.Class<? extends MapGraphic> getMapGraphicClass()
getExtensionID
protected abstract java.lang.String getExtensionID()
init
public void init(IWorkbenchWindow window)