net.refractions.udig.tools.edit
Class EditToolConfigurationHelper

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

public class EditToolConfigurationHelper
extends java.lang.Object

This class provides methods so that initializing an Edit tool is done declaratively.

Since:
1.1.0
Author:
jones

Constructor Summary
EditToolConfigurationHelper(java.util.List<EventBehaviour> behaviours)
           
 
Method Summary
 void add(EventBehaviour behaviour)
          Add a behaviours to the current list
 void done()
          Signals that the configuration is complete.
 boolean isDone()
          Returns true if the done() was called;
 void startAdvancedFeatures()
          Behaviours that are added after this method is called will only be active when the advanced editing is active.
 void startElseFeatures()
          Starts the Else Behaviours of the Advanced configuration.
 void startMutualExclusiveList()
          Starts building a list of behaviours that will be mutually exclusive.
 void startOrderedList(boolean processAsCommand)
          Starts building a list of behaviours that are ordered but all behaviours are run.
 void stopAdvancedFeatures()
          Ends Advanced behaviour section
 void stopElseFeatures()
          Ends the declaration of the Else Behaviours
 void stopMutualExclusiveList()
          Signals the end of a Mutually Exclusive list of behaviours
 void stopOrderedList()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditToolConfigurationHelper

public EditToolConfigurationHelper(java.util.List<EventBehaviour> behaviours)
Method Detail

startMutualExclusiveList

public void startMutualExclusiveList()
Starts building a list of behaviours that will be mutually exclusive. IE only the first behviour that is valid will run.


stopMutualExclusiveList

public void stopMutualExclusiveList()
Signals the end of a Mutually Exclusive list of behaviours


startOrderedList

public void startOrderedList(boolean processAsCommand)
Starts building a list of behaviours that are ordered but all behaviours are run.

Parameters:
processAsCommand - If true then the behaviours will be processed in the command execution thread instead of the Display thread. This is sometimes necessary if a command from a previous behaviour may change the state that a later command depends on. However it depends on the implementation of the behaviour, many behaviours pre-execute their commands in the display thread so do some research before using this as is can cause a slower response to the user.

stopOrderedList

public void stopOrderedList()

add

public void add(EventBehaviour behaviour)
Add a behaviours to the current list

Parameters:
behaviour - the behaviour to add

done

public void done()
Signals that the configuration is complete. It checks that all lists where correctly signalled as done. An exception will be thrown if done is not called


isDone

public boolean isDone()
Returns true if the done() was called;

Returns:

startAdvancedFeatures

public void startAdvancedFeatures()
Behaviours that are added after this method is called will only be active when the advanced editing is active.

The normal behaviour must either be outside of the Advanced list or in the Else List

See Also:
startElseFeatures()

stopAdvancedFeatures

public void stopAdvancedFeatures()
Ends Advanced behaviour section


startElseFeatures

public void startElseFeatures()
Starts the Else Behaviours of the Advanced configuration. The Else Behaviours are the behaviours that only run when Not in advanced mode. The Advanced System has the "Advanced Behaviours", which are ran only when in advanced mode and the "Else Behaviours", which run only when not in Advanced Mode.

StartElseFeatures() must be called after startAdvancedFeatures() has been called but before stopAdvancedFeatures() is called


stopElseFeatures

public void stopElseFeatures()
Ends the declaration of the Else Behaviours