com.mindfusion.diagramming
Class ValidationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.mindfusion.diagramming.ValidationEvent
All Implemented Interfaces:
java.io.Serializable

public class ValidationEvent
extends java.util.EventObject

Contains information passed to the validation events defined in DiagramListener.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ValidationEvent(java.lang.Object source)
          Initializes a new ValidationEvent instance.
 
Method Summary
 void cancelDrag()
          Immediately cancels the item's creation or modification.
 boolean getCancel()
          Gets a value indicating whether to prevrent the user from completing the operation.
 void setCancel(boolean cancel)
          Sets a value indicating whether to prevrent the user from completing the operation
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidationEvent

public ValidationEvent(java.lang.Object source)
Initializes a new ValidationEvent instance.

Method Detail

cancelDrag

public void cancelDrag()
Immediately cancels the item's creation or modification. This differs from calling setValid(false), which would only change the cursor to indicate to users that they cannot complete the modification at the current mouse position.


getCancel

public boolean getCancel()
Gets a value indicating whether to prevrent the user from completing the operation.

Returns:
true to cancel the operation; false to approve it.

setCancel

public void setCancel(boolean cancel)
Sets a value indicating whether to prevrent the user from completing the operation

Parameters:
cancel - true to cancel the operation; false to approve it.