net.refractions.udig.tools.edit
Class EditBlackboardUtil

java.lang.Object
  extended by net.refractions.udig.tools.edit.EditBlackboardUtil

public class EditBlackboardUtil
extends java.lang.Object

To delete soon EditManager will have an editblackboard.

Since:
1.1.0
Author:
jones

Field Summary
static java.lang.String EDIT_BLACKBOARD_KEY
           
static EditBlackboard EMPTY_BLACKBOARD
           
 
Constructor Summary
EditBlackboardUtil()
           
 
Method Summary
static void disableLayerEvents()
          Disables the listeners listening to layers for edit events.
static void doneListening()
          Disables listeners so that they will not get events.
static ILayer findEditLayer(IToolContext context)
          Returns the selectedLayer or if it is not editable or not visible then the edit layer will be
static EditBlackboard getEditBlackboard(IToolContext context, ILayer layer2)
           
static void openDataChangedDialog(ILayer layer, Envelope dirtyArea)
           
static void resetBlackboards(IMap map)
          clears edit blackboard for all layers in a given map...
static void updateFeatures(ILayer layer, IProgressMonitor monitor, Envelope dirtyArea)
          Updates the features in the "dirty Area" so that the EditGeoms reflect the actual state of the stored features.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_BLACKBOARD

public static final EditBlackboard EMPTY_BLACKBOARD

EDIT_BLACKBOARD_KEY

public static final java.lang.String EDIT_BLACKBOARD_KEY
See Also:
Constant Field Values
Constructor Detail

EditBlackboardUtil

public EditBlackboardUtil()
Method Detail

getEditBlackboard

public static EditBlackboard getEditBlackboard(IToolContext context,
                                               ILayer layer2)

openDataChangedDialog

public static void openDataChangedDialog(ILayer layer,
                                         Envelope dirtyArea)

updateFeatures

public static void updateFeatures(ILayer layer,
                                  IProgressMonitor monitor,
                                  Envelope dirtyArea)
Updates the features in the "dirty Area" so that the EditGeoms reflect the actual state of the stored features. Any changes to the EditGeom will be lost.

Parameters:
layer - that needs to be updated.
monitor - progress monitor
dirtyArea - area that needs to be updated.

doneListening

public static void doneListening()
Disables listeners so that they will not get events. Should be called when tool is disabled or when a blackboard is no longer required.

See Also:
(it enables listeners).

disableLayerEvents

public static void disableLayerEvents()
Disables the listeners listening to layers for edit events.

See Also:
enableLayerChangeEventListener(ILayer, EditBlackboard)

findEditLayer

public static ILayer findEditLayer(IToolContext context)
Returns the selectedLayer or if it is not editable or not visible then the edit layer will be

Returns:

resetBlackboards

public static void resetBlackboards(IMap map)
clears edit blackboard for all layers in a given map... Critical to prevent memory leaks