org.openjump.core.ui.plugin.tools
Class PlanarGraphPlugIn
java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
com.vividsolutions.jump.workbench.plugin.ThreadedBasePlugIn
org.openjump.core.ui.plugin.tools.PlanarGraphPlugIn
- All Implemented Interfaces:
- PlugIn, ThreadedPlugIn
public class PlanarGraphPlugIn
- extends ThreadedBasePlugIn
PlanarGraphPlugIn computes a planar graph from a set of features.
The user can choose to produce the nodes, the edges and the faces, or only
some of those features.
The following relations are kept as edge attributes :
Initial node identifier
Final node identifier
Right face
Left face
- Author:
- Michael Michaud and Erwan Bocher (2005-06)
Comments added by Michael Michaud on 2006-05-01
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EDGE
public static final java.lang.String EDGE
FACE
public static final java.lang.String FACE
NODE
public static final java.lang.String NODE
CATEGORY
public static final java.lang.String CATEGORY
MAPPING
public static final java.lang.String MAPPING
TITLE
public static final java.lang.String TITLE
SELECT_LAYER
public static final java.lang.String SELECT_LAYER
CALCULATE_NODES
public static final java.lang.String CALCULATE_NODES
CALCULATE_FACES
public static final java.lang.String CALCULATE_FACES
CALCULATE_RELATIONS
public static final java.lang.String CALCULATE_RELATIONS
KEEP_ATTRIBUTES
public static final java.lang.String KEEP_ATTRIBUTES
MINUS_ONE
public static final java.lang.Integer MINUS_ONE
edges
public java.util.Collection edges
PlanarGraphPlugIn
public PlanarGraphPlugIn()
run
public void run(TaskMonitor monitor,
PlugInContext context)
throws java.lang.Exception
- Calculations take place here
- Parameters:
monitor - context to which this task can report its progress and
check whether a party has requested its cancellation
- Throws:
java.lang.Exception
initialize
public void initialize(PlugInContext context)
throws java.lang.Exception
- Description copied from interface:
PlugIn
- Called when Workbench starts up to allow plugins to initialize themselves.
- Specified by:
initialize in interface PlugIn- Overrides:
initialize in class AbstractPlugIn
- Parameters:
context -
- Throws:
java.lang.Exception
execute
public boolean execute(PlugInContext context)
throws java.lang.Exception
- Description copied from interface:
PlugIn
- Performs the action for this plugin.
For threaded plugins with dialogs, this method contains the code to
invoke the dialog. If the user cancels the dialog, this method
should return
false to prevent the run method
from being called.
- Specified by:
execute in interface PlugIn- Overrides:
execute in class AbstractPlugIn
- Returns:
- true if the action completed, false if it was aborted.
Used by ThreadedPlugIns to indicate that their #run method needn't be
called next.
- Throws:
java.lang.Exception - if a problem occurs during plug-in execution- See Also:
ThreadedPlugIn
getName
public java.lang.String getName()
- Description copied from interface:
PlugIn
- Returns a very brief description of this PlugIn e.g. for display as a menu item
- Specified by:
getName in interface PlugIn- Overrides:
getName in class AbstractPlugIn
- Returns:
- the class name, minus "PlugIn", with
spaces inserted at the appropriate point before each
uppercase+lowercase and lowercase+uppercase combination.
getLines
public java.util.List getLines(FeatureCollection fc)
createEdgeLayer
public FeatureCollection createEdgeLayer(FeatureCollection fc,
boolean nodeb,
boolean faceb,
boolean relations,
PlugInContext context)
createNodeLayer
public FeatureCollection createNodeLayer(FeatureCollection fcEdge,
PlugInContext context,
boolean relations)
createFaceLayer
public FeatureCollection createFaceLayer(FeatureCollection fcEdge,
PlugInContext context,
boolean relations)