net.refractions.udig.tools.edit.behaviour
Class RefreshLayersBehaviour

java.lang.Object
  extended by net.refractions.udig.tools.edit.behaviour.RefreshLayersBehaviour
All Implemented Interfaces:
Behaviour

public class RefreshLayersBehaviour
extends java.lang.Object
implements Behaviour

searches the current map and makes sure that

Since:
1.1.0
Author:
Jesse

Constructor Summary
RefreshLayersBehaviour()
           
 
Method Summary
 UndoableMapCommand getCommand(EditToolHandler handler)
          The action to be performed by this Behaviour.
 void handleError(EditToolHandler handler, java.lang.Throwable error, UndoableMapCommand command)
          This method is called if an exception occurs during the execution of the run method.
 boolean isValid(EditToolHandler handler)
          Called to determine whether this Behaviour is applicable and should be run.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RefreshLayersBehaviour

public RefreshLayersBehaviour()
Method Detail

getCommand

public UndoableMapCommand getCommand(EditToolHandler handler)
Description copied from interface: Behaviour
The action to be performed by this Behaviour. This action takes place in the event thread so it must perform quickly.

Specified by:
getCommand in interface Behaviour
Parameters:
handler - handler that calls this Behaviour
Returns:
Command that will be executed in order to perform the behaviour

handleError

public void handleError(EditToolHandler handler,
                        java.lang.Throwable error,
                        UndoableMapCommand command)
Description copied from interface: Behaviour
This method is called if an exception occurs during the execution of the run method.

This method should:

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

Specified by:
handleError in interface Behaviour
error - Error that occurred
command - Command retrieved from getCommandMethod. May be null if exception occurred while executing getCommand();

isValid

public boolean isValid(EditToolHandler handler)
Description copied from interface: Behaviour
Called to determine whether this Behaviour is applicable and should be run.

Specified by:
isValid in interface Behaviour
Parameters:
handler - handler that calls this Behaviour
Returns:
true if this mode is applicable and should be run.