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

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

public class ValidToolDetectionActivator
extends java.lang.Object
implements EnablementBehaviour

This class detects and warns the user if the current tool can or can't edit the current layer.

Since:
1.0.0
Author:
Jesse

Constructor Summary
ValidToolDetectionActivator(java.lang.Class[] classes)
           
 
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

ValidToolDetectionActivator

public ValidToolDetectionActivator(java.lang.Class[] classes)
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.