Personal tools
You are here: Home gvSIG Projects gvSIG Desktop Documentation Developers documentation org.gvsig.fmap.geom 2.0.0 Create a new manager
gvSIG Desktop
gvSIG Desktop
Description
Features
Characteristics
Tour
Downloads official vers.
Upgrade language
Documentation
User documentation
Developers documentation
Previous versions
How to contribute in gvSIG?
How to document guide
Developers Quick Start Guide
gvSIG devel guide
Guía para "commiters" de gvSIG
Revision de codigo
org.gvsig.tools
org.gvsig.fmap.geom
org.gvsig.fmap.dal
org.gvsig.app.daltransform
org.gvsig.sensors
org.gvsig.raster
Downloads development vers.
Distribution lists
Other distributions
FAQs

Cached time 11/21/13 11:24:39 Clear cache and reload

 

First of all, before using a new manager on gvSIG, it's necessary to create it. For that, we must create a class that inherits from GeometryManager (in the example is called MyGeometryManager), and later we must register it executing the line:

GeometryLocator.registerGeometryManager (MyGeometryManager.class);

The explanation of the manager methods is on the JavaDoc. Besides, this document is an example of the using of this methods and it must resolve any doubt about any method.

The registration of the new manager must be done at the beginning of the application in a class that inherits from the GeometryLibrary- In the method Initialize we must do the registration, in the same way we do on the example, where we have created the class MyGeometryLibrary:

public class MyGeometryLibrary extends GeometryLibrary  {
  
  public void initialize() throws ReferenceNotRegisteredException {
    super.initialize();
  
    //Register the default GeometryManager
    GeometryLocator.registerGeometryManager(MyGeometryManager.class);
  }

  public void postInitialize() {
    super.postInitialize();
 }
}

When it's done, if we access to the locator from another part of the application to recuperate the instance of the GeometryManager, we will obtain an instance of the manager that we have registered.


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: