net.refractions.udig.tools.edit.support
Enum SnapBehaviour

java.lang.Object
  extended by java.lang.Enum<SnapBehaviour>
      extended by net.refractions.udig.tools.edit.support.SnapBehaviour
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SnapBehaviour>

public enum SnapBehaviour
extends java.lang.Enum<SnapBehaviour>

Indicates the different ways that snapping can behave.

Since:
1.1.0
Author:
Jesse

Enum Constant Summary
ALL_LAYERS
          Search all layers
CURRENT_LAYER
          Search the current layer and the selected features
GRID
          Snap to a grid defined in the preferences
OFF
          No snapping
SELECTED
          Snap to features selected (on the edit blackboard)
 
Method Summary
static SnapBehaviour valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SnapBehaviour[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OFF

public static final SnapBehaviour OFF
No snapping


SELECTED

public static final SnapBehaviour SELECTED
Snap to features selected (on the edit blackboard)


CURRENT_LAYER

public static final SnapBehaviour CURRENT_LAYER
Search the current layer and the selected features


ALL_LAYERS

public static final SnapBehaviour ALL_LAYERS
Search all layers


GRID

public static final SnapBehaviour GRID
Snap to a grid defined in the preferences

Method Detail

values

public static final SnapBehaviour[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(SnapBehaviour c : SnapBehaviour.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static SnapBehaviour valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name