Basic Tool Tutorial
Basic Tool Tutorial
1 GOALS..........................................................................................................4
4. Accept the default values used to generate the plug-in and click the Finish
button.
At this point the feature editor plug-in is created. Configuring the plug-in is the
focus of the next section.
4. Click the Add… button in the Required plugins column and add the following
plugins:
a. net.refractions.udig.libs
b. net.refractions.udig.project.ui
5. At this point it is critical that you save your work as the dependencies need
to propagate into the project.
11. Add a constructor that will register the tool for mouse events:
public DistanceTool() {
// Register for mouse events
// Options are:
// MOUSE
// MOTION
// WHEEL
super(MOUSE);
}
});
}
1. At this point you may have red x's on the project. Press Ctrl+Shift+0 to
import any needed classes and save the file (this should refresh the project
and clear up any error markers left behind).
2. From the Project menu select Run and choose the configuration you set-up
in the previous chapter (see Section 5 Compiling the uDig Plug-ins).
3. When uDig launches make a new map (File->New Map) and your Distance
tool should now be in the tool bar ready for use. Import a map into the
Catalog (you can drag the DM Solutions WMS map from
http://udig.refractions.net/confluence/display/UDIG/Walkthrough+1 into
the Layers View).
4. Make select the Distance Tool and drag from one point to another in the
Map View and the distance should display in the bottom left corner.