net.refractions.udig.tools.edit.enablement
Class WithinLegalLayerBoundsBehaviour

java.lang.Object
  extended by net.refractions.udig.tools.edit.enablement.WithinLegalLayerBoundsBehaviour
All Implemented Interfaces:
EnablementBehaviour

public class WithinLegalLayerBoundsBehaviour
extends java.lang.Object
implements EnablementBehaviour

Sets the EditState to illegal if the Mouse moves into an area of the map where the layer is no longer valid as according to its CRS. In addition puts a warning on the StatusLine.

Since:
1.1.0
Author:
Jesse

Constructor Summary
WithinLegalLayerBoundsBehaviour()
           
 
Method Summary
 java.lang.String isEnabled(EditToolHandler handler, MapMouseEvent e, EventType eventType)
          If method returns a String then no other behaviours will be executed and the string will be used as the status bar's Error message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WithinLegalLayerBoundsBehaviour

public WithinLegalLayerBoundsBehaviour()
Method Detail

isEnabled

public java.lang.String isEnabled(EditToolHandler handler,
                                  MapMouseEvent e,
                                  EventType eventType)
Description copied from interface: EnablementBehaviour
If method returns a String then no other behaviours will be executed and the string will be used as the status bar's Error message. If null is returned then the te rest of the behaviours can be ran and the error tate will be cleared.

Specified by:
isEnabled in interface EnablementBehaviour
Parameters:
handler - EditToolHandler for the current tool
e - the event that just occurred
eventType - the type of event
Returns:
If String then no other behaviours will be executed and the string will be used as the status bar's Error message. If null is returned then the the rest of the behaviours can be ran and the error tate will be cleared.