schmitzm.geotools.gui
Class JMapEditorPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by schmitzm.swing.JPanel
                      extended by skrueger.geotools.XMapPane
                          extended by schmitzm.geotools.gui.SelectableXMapPane
                              extended by schmitzm.geotools.gui.JMapEditorPane
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class JMapEditorPane
extends SelectableXMapPane

The JMapEditorPane extends the SelectableXMapPane with functionalities to create new vector layers by successively click points via mouse.

Version:
1.0
Author:
Martin Schmitz (University of Bonn/Germany)
See Also:
Serialized Form

Nested Class Summary
static class JMapEditorPane.EditorMode
          Modes, the editor can be perform.
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  SimpleFeatureType additionalAttr
          Contains the additional attributes for new FeatureCollections.
protected  FeatureInputOption attrInputOption
          Contains the InputOption to specify the additional attribute values.
static Style DEFAULT_LINE_STYLE
          Default-Style for line layers (blue lines).
static Style DEFAULT_POINT_STYLE
          Default-Style for point layers (blue dots).
static Style DEFAULT_POLYGON_STYLE
          Default-Style for polygon layers (orange with black borders).
protected  XMapPaneTool EDITING_TOOL
           
protected   editorFeatureCollection
          Holds the FeatureCollection of the edited layer.
protected  SimpleFeatureType editorFeatureType
          Holds the SimpleFeatureType of the edited layer.
protected  FeatureUtil.GeometryForm editorGeometryForm
          Holds the kind of geometry of the edited layer.
protected  MapLayer editorLayer
          Holds the edited layer.
protected  MapContext editorMapContext
          The map context where the edited layers are displayed.
protected  JMapEditorPane.EditorMode editorMode
          Holds the operation the editor currently performs.
protected  GTRenderer editorRenderer
          The renderer the edited layers are rendered with.
protected  Map<FeatureUtil.GeometryForm,Style> editorStyles
          Holds the styles to display edited layers.
static String GEOMETRY_ATTR
          Attribute name used for the geometry of new layers.
protected  Stack<SimpleFeature> globalRedoFeatures
          Holds the undone segments (complete Features) which can be redone.
protected  Stack<Stack<Coordinate>> globalRedoPoints
          Holds the undone points of former segments (complete Features) which can be redone.
protected  Stack<SimpleFeature> globalUndoFeatures
          Holds the former segments (complete Features) which can be undone.
protected  Stack<Stack<Coordinate>> globalUndoPoints
          Holds the points of former segments (complete Features) which can be undone.
protected  MapContext mapContext
          The map context of the displayed layer.
protected  DefaultFeatureCollection segmLineFeatureCollection
          Holds the FeatureCollection which holds the new segment (incomplete SimpleFeature) displayed as line.
protected  SimpleFeatureType segmLineFeatureType
          Holds the SimpleFeatureType of the new segment (incomplete SimpleFeature) displayed as line.
protected  MapLayer segmLineLayer
          Holds the layer, the new segment (incomplete SimpleFeature) is displayed in as line.
protected  DefaultFeatureCollection segmPointFeatureCollection
          Holds the FeatureCollection which holds the new segment (incomplete SimpleFeature) displayed as points.
protected  SimpleFeatureType segmPointFeatureType
          Holds the SimpleFeatureType of the new segment (incomplete SimpleFeature) displayed as points.
protected  MapLayer segmPointLayer
          Holds the layer, the new segment (incomplete SimpleFeature) is displayed in as points.
protected  Stack<Coordinate> segmRedoPoints
          Holds the undone points of the edited segment (incomplete SimpleFeature) which can be redone.
protected  Stack<Coordinate> segmUndoPoints
          Holds the points of the edited segment (incomplete SimpleFeature) which can be undone.
 
Fields inherited from class schmitzm.geotools.gui.SelectableXMapPane
LOGGER, NONE, SELECT_ALL, SELECT_ONE_FROM_TOP, SELECT_TOP
 
Fields inherited from class skrueger.geotools.XMapPane
bgExecuter, bgMapLayerListener, DEFAULT_RESIZING_PAINT_DELAY, INITIAL_REPAINT_DELAY, labelCache, localMapLayerListener, mapArea, mapImageInvalid, mapLayerSelectable, mapPaneListeners, oldMapArea, oldScreenToWorld, paneResized, renderingErrors, REPEATING_REPAINT_DELAY, screenToWorld
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JMapEditorPane()
          Creates a new JMapEditorPane.
JMapEditorPane(MapContext context)
          Creates a new JMapEditorPane.
 
Method Summary
protected  void addSegment(Coordinate coord)
          Called when the mouse is clicked on map during creating a new layer.
protected  void addSegment(Coordinate coord, boolean refresh, boolean clearRedo)
          Called when the mouse is clicked on map during creating a new layer.
 void cancelEditing()
          Cancels the current edititing operation.
protected  SimpleFeature createSegmentLineFeature()
          Creates a new Line-SimpleFeature from the currently selected segment points.
protected  SimpleFeature createSegmentPointFeature()
          Creates a new MultiPoint-SimpleFeature from the currently selected segment points.
 void finishEditing()
          Finishes the current editing operation.
 void finishFeature()
          Finishes the editing of the current segment (SimpleFeature).
protected  void finishFeature(boolean refresh, boolean clearRedo)
          Finishes the editing of the current segment (SimpleFeature).
protected  void generateSegmentFeatureCollection()
          Creates a new segment SimpleFeature from the currently selected points.
 SimpleFeatureType getAdditionalAttributes()
          Returns the additional attributes for new FeatureCollections (besides the geometric attribute, which is added automatically).
  getEditorFeatureCollection()
          Returns the FeatureCollection of the edited layer.
 MapLayer getEditorLayer()
          Returns the edited layer.
 JMapEditorPane.EditorMode getEditorMode()
          Returns the current editor mode.
 Style getEditorStyle()
          Returns the style for the current edited layer.
 Style getEditorStyle(FeatureUtil.GeometryForm geomForm)
          Returns the style for edited layers.
protected  void initEditorFeatureCollection(String title)
          Sets editorFeatureCollection and editorLayer to completely new instances.
protected  void initSegmentFeatureCollection()
          Clears the FeatureCollection used to handle the current edited segment.
protected  void initUndoRedo()
          Sets editorFeatureCollection and editorLayer to completely new instances.
 boolean isEditorEnabled()
          Checks, whether a layer is edited.
 boolean isRedoPossible()
          Checks wheater a redo operation can be performed.
 boolean isUndoPossible()
          Checks wheater a undo operation can be performed.
protected  void paintComponent(Graphics g)
          After the actions of the super method, this method paints the special editor layers in editorMapContext.
 void redoEditing()
          Restores the last undone editing action.
 void redoEditing(int count)
          Restores previous undone editing actions.
 void setAdditionalAttributes(SimpleFeatureType fType)
          Sets the additional attributes for new FeatureCollections (besides the geometric attribute, which is added automatically).
 void setEditorStyle(FeatureUtil.GeometryForm geomForm, Style style)
          Sets the style for edited layers.
 void startEditing(JMapEditorPane.EditorMode mode, String layerTitle)
          Starts a new layer.
 void undoAll()
          Makes all made editing action undone.
 void undoEditing()
          Makes the last made editing action undone.
 void undoEditing(int count)
          Makes previously made editing actions undone.
 
Methods inherited from class schmitzm.geotools.gui.SelectableXMapPane
featureLayerIntersectsEnvelope, findFeatures, findFeaturesAndFireEvents, findGridCoverageSubsets, findGridCoverageSubsetsAndFireEvents, findGridCoverageValues, findGridCoverageValuesAndFireEvents, findVisibleFeatures, fireMapPaneEvent, getBottomLayer, getScale, getTopLayer, getTopVisibleGridCoverageLayer, getTopVisibleLayer, getTopVisibleNonGridCoverageLayer, isGridCoverageLayer, layerIntersectsCoord, layerIntersectsEnvelope, performSelectionEvent, setMapArea, zoomTo
 
Methods inherited from class skrueger.geotools.XMapPane
addMapPaneListener, bestAllowedMapArea, blink, configureMouse, dispose, drawRectangle, drawRectangle, drawScaledPreviewImage_Zoom, getBgContext, getDefaultMaxMapExtendMode, getImageOrigin, getLocalRenderer, getMapArea, getMapBackgroundColor, getMapContext, getMapCoordinatesFromEvent, getMapImage, getMaxExtend, getMaxZoomScale, getMinZoomScale, getRendererHints, getScreenToWorld, getTool, getWorldToScreenTransform, isMapLayerSelectable, isShowExceptions, isWellDefined, onRenderingCancelled, onRenderingCompleted, onRenderingFailed, pan, refresh, removeMapPaneListener, setAntiAliasing, setBgContext, setBorder, setDefaultMaxMapExtendMode, setJava2dHints, setLocalContext, setMapBackgroundColor, setMapImage, setMapLayerSelectable, setMaxExtend, setMaxZoomScale, setMinZoomScale, setPainting, setShowExceptions, setTool, tranformGeoToWindow, tranformGeoToWindow, tranformWindowToGeo, updateCursor, updateFinalImage, zoomTo, zoomToLayer, zoomToLayerIdxReverse
 
Methods inherited from class schmitzm.swing.JPanel
print, setBackground, setEnabled
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GEOMETRY_ATTR

public static final String GEOMETRY_ATTR
Attribute name used for the geometry of new layers.

See Also:
Constant Field Values

DEFAULT_POINT_STYLE

public static final Style DEFAULT_POINT_STYLE
Default-Style for point layers (blue dots).


DEFAULT_LINE_STYLE

public static final Style DEFAULT_LINE_STYLE
Default-Style for line layers (blue lines).


DEFAULT_POLYGON_STYLE

public static final Style DEFAULT_POLYGON_STYLE
Default-Style for polygon layers (orange with black borders).


mapContext

protected MapContext mapContext
The map context of the displayed layer.


additionalAttr

protected SimpleFeatureType additionalAttr
Contains the additional attributes for new FeatureCollections.


attrInputOption

protected FeatureInputOption attrInputOption
Contains the InputOption to specify the additional attribute values.


editorMapContext

protected MapContext editorMapContext
The map context where the edited layers are displayed. This context is displayed on top of the other layers.


editorRenderer

protected GTRenderer editorRenderer
The renderer the edited layers are rendered with.


editorStyles

protected Map<FeatureUtil.GeometryForm,Style> editorStyles
Holds the styles to display edited layers.


editorMode

protected JMapEditorPane.EditorMode editorMode
Holds the operation the editor currently performs.


editorFeatureType

protected SimpleFeatureType editorFeatureType
Holds the SimpleFeatureType of the edited layer.


editorGeometryForm

protected FeatureUtil.GeometryForm editorGeometryForm
Holds the kind of geometry of the edited layer.


editorFeatureCollection

protected  editorFeatureCollection
Holds the FeatureCollection of the edited layer.


editorLayer

protected MapLayer editorLayer
Holds the edited layer.


segmLineFeatureType

protected SimpleFeatureType segmLineFeatureType
Holds the SimpleFeatureType of the new segment (incomplete SimpleFeature) displayed as line.


segmLineFeatureCollection

protected DefaultFeatureCollection segmLineFeatureCollection
Holds the FeatureCollection which holds the new segment (incomplete SimpleFeature) displayed as line.


segmLineLayer

protected MapLayer segmLineLayer
Holds the layer, the new segment (incomplete SimpleFeature) is displayed in as line.


segmPointFeatureType

protected SimpleFeatureType segmPointFeatureType
Holds the SimpleFeatureType of the new segment (incomplete SimpleFeature) displayed as points.


segmPointFeatureCollection

protected DefaultFeatureCollection segmPointFeatureCollection
Holds the FeatureCollection which holds the new segment (incomplete SimpleFeature) displayed as points.


segmPointLayer

protected MapLayer segmPointLayer
Holds the layer, the new segment (incomplete SimpleFeature) is displayed in as points.


segmUndoPoints

protected Stack<Coordinate> segmUndoPoints
Holds the points of the edited segment (incomplete SimpleFeature) which can be undone.


segmRedoPoints

protected Stack<Coordinate> segmRedoPoints
Holds the undone points of the edited segment (incomplete SimpleFeature) which can be redone.


globalUndoPoints

protected Stack<Stack<Coordinate>> globalUndoPoints
Holds the points of former segments (complete Features) which can be undone.


globalRedoPoints

protected Stack<Stack<Coordinate>> globalRedoPoints
Holds the undone points of former segments (complete Features) which can be redone.


globalUndoFeatures

protected Stack<SimpleFeature> globalUndoFeatures
Holds the former segments (complete Features) which can be undone.


globalRedoFeatures

protected Stack<SimpleFeature> globalRedoFeatures
Holds the undone segments (complete Features) which can be redone.


EDITING_TOOL

protected XMapPaneTool EDITING_TOOL
Constructor Detail

JMapEditorPane

public JMapEditorPane()
Creates a new JMapEditorPane.


JMapEditorPane

public JMapEditorPane(MapContext context)
Creates a new JMapEditorPane. This constructor provides the possibility to use alternative implementations of the internal components. The specified parameter all can be null! In this case the respective default component is used.

Method Detail

paintComponent

protected void paintComponent(Graphics g)
After the actions of the super method, this method paints the special editor layers in editorMapContext.

Overrides:
paintComponent in class XMapPane

isEditorEnabled

public boolean isEditorEnabled()
Checks, whether a layer is edited.


setEditorStyle

public void setEditorStyle(FeatureUtil.GeometryForm geomForm,
                           Style style)
Sets the style for edited layers.

Parameters:
geomForm - kind of layers the style is set for
style - a Style (if null a default style is set, so #getEditorStyle(GeometryForm) never returns null)

getEditorStyle

public Style getEditorStyle(FeatureUtil.GeometryForm geomForm)
Returns the style for edited layers.

Parameters:
geomForm - type of layers the style is returned for

getEditorStyle

public Style getEditorStyle()
Returns the style for the current edited layer.


setAdditionalAttributes

public void setAdditionalAttributes(SimpleFeatureType fType)
Sets the additional attributes for new FeatureCollections (besides the geometric attribute, which is added automatically).

Parameters:
fType - defines the attributes (If null, new FeatureCollections only contain the geometric attribute)

getAdditionalAttributes

public SimpleFeatureType getAdditionalAttributes()
Returns the additional attributes for new FeatureCollections (besides the geometric attribute, which is added automatically).


getEditorMode

public JMapEditorPane.EditorMode getEditorMode()
Returns the current editor mode.


getEditorLayer

public MapLayer getEditorLayer()
Returns the edited layer.


getEditorFeatureCollection

public  getEditorFeatureCollection()
Returns the FeatureCollection of the edited layer.


startEditing

public void startEditing(JMapEditorPane.EditorMode mode,
                         String layerTitle)
Starts a new layer.

Parameters:
mode - type of layer
layerTitle - Title for the new layer
Throws:
UnsupportedOperationException - if no map area is defined yet

addSegment

protected void addSegment(Coordinate coord,
                          boolean refresh,
                          boolean clearRedo)
Called when the mouse is clicked on map during creating a new layer.

Parameters:
coord - World coordinates of click position
refresh - indicates whether the visualization will be refreshed
aClearRedo - indicates whether the REDO-Stack is cleared (normally true, but false during REDO operation!)

addSegment

protected void addSegment(Coordinate coord)
Called when the mouse is clicked on map during creating a new layer.

Parameters:
coord - World coordinates of click position

finishFeature

protected void finishFeature(boolean refresh,
                             boolean clearRedo)
Finishes the editing of the current segment (SimpleFeature). If no editing operation is currently in progress, this method does nothing.

Parameters:
refresh - indicates whether the visualization will be refreshed
aClearRedo - indicates whether the REDO-Stack is cleared (normally true, but false during REDO operation!)
Throws:
UnsupportedOperationException - if a line or polygon feature can not be finished because of less specified points

finishFeature

public void finishFeature()
Finishes the editing of the current segment (SimpleFeature). If no editing operation is currently in progress, this method does nothing.


finishEditing

public void finishEditing()
Finishes the current editing operation. After that no more operations on this layer can be performed. As long as no other editing operation is started, the edited (new) layer is available by getEditorLayer() and getEditorFeatureCollection(). If no editing operation is currently in progress, this method does nothing.


cancelEditing

public void cancelEditing()
Cancels the current edititing operation. The edited layer is removed.


undoEditing

public void undoEditing(int count)
Makes previously made editing actions undone.

Parameters:
count - count of operations made undone

undoEditing

public void undoEditing()
Makes the last made editing action undone.


undoAll

public void undoAll()
Makes all made editing action undone.


isUndoPossible

public boolean isUndoPossible()
Checks wheater a undo operation can be performed.


redoEditing

public void redoEditing(int count)
Restores previous undone editing actions.

Parameters:
count - count of redo operations

redoEditing

public void redoEditing()
Restores the last undone editing action.


isRedoPossible

public boolean isRedoPossible()
Checks wheater a redo operation can be performed.


initUndoRedo

protected void initUndoRedo()
Sets editorFeatureCollection and editorLayer to completely new instances.

Parameters:
title - title for the new layer

initEditorFeatureCollection

protected void initEditorFeatureCollection(String title)
Sets editorFeatureCollection and editorLayer to completely new instances.

Parameters:
title - title for the new layer

initSegmentFeatureCollection

protected void initSegmentFeatureCollection()
Clears the FeatureCollection used to handle the current edited segment.


generateSegmentFeatureCollection

protected void generateSegmentFeatureCollection()
Creates a new segment SimpleFeature from the currently selected points.


createSegmentLineFeature

protected SimpleFeature createSegmentLineFeature()
Creates a new Line-SimpleFeature from the currently selected segment points.


createSegmentPointFeature

protected SimpleFeature createSegmentPointFeature()
Creates a new MultiPoint-SimpleFeature from the currently selected segment points.