net.refractions.udig.tools.edit.activator
Class DrawGeomsActivator

java.lang.Object
  extended by net.refractions.udig.tools.edit.activator.DrawGeomsActivator
All Implemented Interfaces:
Activator

public class DrawGeomsActivator
extends java.lang.Object
implements Activator

Adds a DrawGeomsCommand to the draw commands and invalidates it at the end.

Since:
1.1.0
Author:
jones

Nested Class Summary
static class DrawGeomsActivator.DrawType
           
 
Constructor Summary
DrawGeomsActivator(DrawGeomsActivator.DrawType type)
           
 
Method Summary
 void activate(EditToolHandler handler)
          The action to be performed by this activator when activating.
 void deactivate(EditToolHandler handler)
          The action to be performed by this activator when deactivating.
 void handleActivateError(EditToolHandler handler, java.lang.Throwable error)
          This method is called if an exception occurs during the execution of the activate method.
 void handleDeactivateError(EditToolHandler handler, java.lang.Throwable error)
          This method is called if an exception occurs during the execution of the deactivate method.
 boolean isShowMouseLocation()
          Returns true if the mouse position will be shown.
 void setShowMouseLocation(boolean showMouseLocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawGeomsActivator

public DrawGeomsActivator(DrawGeomsActivator.DrawType type)
Method Detail

isShowMouseLocation

public boolean isShowMouseLocation()
Returns true if the mouse position will be shown. Default is true.

Returns:
Returns true if the mouse position will be shown. Default is true.

setShowMouseLocation

public void setShowMouseLocation(boolean showMouseLocation)
Parameters:
showMouseLocation - The showMouseLocation to set.

activate

public void activate(EditToolHandler handler)
Description copied from interface: Activator
The action to be performed by this activator when activating.

Specified by:
activate in interface Activator

deactivate

public void deactivate(EditToolHandler handler)
Description copied from interface: Activator
The action to be performed by this activator when deactivating.

Specified by:
deactivate in interface Activator

handleActivateError

public void handleActivateError(EditToolHandler handler,
                                java.lang.Throwable error)
Description copied from interface: Activator
This method is called if an exception occurs during the execution of the activate method.

This method should

  1. Rollback the changes made during the run method
  2. Log the error in the plugin's log

Specified by:
handleActivateError in interface Activator
error - Error that occurred

handleDeactivateError

public void handleDeactivateError(EditToolHandler handler,
                                  java.lang.Throwable error)
Description copied from interface: Activator
This method is called if an exception occurs during the execution of the deactivate method.

This method should

  1. Rollback the changes made during the run method
  2. Log the error in the plugin's log

Specified by:
handleDeactivateError in interface Activator
error - Error that occurred