org.severe.jripples.eig
Class JRipplesEIGEdgeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.eclipse.swt.internal.SWTEventObject
          extended by org.eclipse.swt.events.TypedEvent
              extended by org.severe.jripples.eig.JRipplesEIGEdgeEvent
All Implemented Interfaces:
java.io.Serializable

public class JRipplesEIGEdgeEvent
extends org.eclipse.swt.events.TypedEvent

JRipplesEIGEdgeEvent class represents lifecycle and content events that happen with a particular JRipplesEIGEdge. That is, creation, changes in From and To nodes this edge connects, mark and probability, and edge removal.

Author:
Maksym Petrenko
See Also:
JRipplesEIGEdge, Serialized Form

Field Summary
static int EDGE_ADDED
          Event constant for JRipplesEIGEdge creation.
static int EDGE_COUNT_CHANGED
          Event constant for edge's count changes.
static int EDGE_FROM_NODE_CHANGED
          Event constant for JRipplesEIGEdge From Node changes.
static int EDGE_MARK_CHANGED
          Event constant for edge's mark changes.
static int EDGE_PROBABILITY_CHANGED
          Event constant for edge's probability changes.
static int EDGE_REMOVED
          Event constant for JRipplesEIGEdge removal.
static int EDGE_TO_NODE_CHANGED
          Event constant for JRipplesEIGEdge To Node changes.
 
Fields inherited from class org.eclipse.swt.events.TypedEvent
data, display, time, widget
 
Constructor Summary
JRipplesEIGEdgeEvent(JRipplesEIGEdge edge, int type)
           
 
Method Summary
 JRipplesEIGEdge getEdge()
          Returns the edge this event occured on.
 int getEventType()
          Returns the type of the edge event, where type is one of the constants defined in JRipplesEIGEdgeEvent.
 
Methods inherited from class org.eclipse.swt.events.TypedEvent
toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EDGE_MARK_CHANGED

public static final int EDGE_MARK_CHANGED
Event constant for edge's mark changes. Will occur if JRipplesEIGEdge.setMark(String) was called.

See Also:
Constant Field Values

EDGE_PROBABILITY_CHANGED

public static final int EDGE_PROBABILITY_CHANGED
Event constant for edge's probability changes. Will occur if JRipplesEIGEdge.setProbability(String) was called.

See Also:
Constant Field Values

EDGE_FROM_NODE_CHANGED

public static final int EDGE_FROM_NODE_CHANGED
Event constant for JRipplesEIGEdge From Node changes. Will occured if JRipplesEIGEdge.JRipplesEIGEdge(JRipplesEIGNode, JRipplesEIGNode) constructor was called.

See Also:
Constant Field Values

EDGE_TO_NODE_CHANGED

public static final int EDGE_TO_NODE_CHANGED
Event constant for JRipplesEIGEdge To Node changes. Will occured if JRipplesEIGEdge.JRipplesEIGEdge(JRipplesEIGNode, JRipplesEIGNode) constructor was called.

See Also:
Constant Field Values

EDGE_ADDED

public static final int EDGE_ADDED
Event constant for JRipplesEIGEdge creation. Will occured if JRipplesEIG.addEdge(JRipplesEIGNode, JRipplesEIGNode) was called.

See Also:
Constant Field Values

EDGE_REMOVED

public static final int EDGE_REMOVED
Event constant for JRipplesEIGEdge removal. Will occured if JRipplesEIG.removeEdge(JRipplesEIGEdge) was called or either Form Node or To Node was removed fromt the EIG (or their respective declaring class Nodes).

See Also:
Constant Field Values

EDGE_COUNT_CHANGED

public static final int EDGE_COUNT_CHANGED
Event constant for edge's count changes. Will occur if JRipplesEIGEdge.setCount(Integer) was called.

See Also:
Constant Field Values
Constructor Detail

JRipplesEIGEdgeEvent

public JRipplesEIGEdgeEvent(JRipplesEIGEdge edge,
                            int type)
Parameters:
edge - The edge this event occured on
type - Type of the edge event, where type is one of the constants defined in JRipplesEIGEdgeEvent
Method Detail

getEdge

public JRipplesEIGEdge getEdge()
Returns the edge this event occured on.

Returns:
The edge this event occured on

getEventType

public int getEventType()
Returns the type of the edge event, where type is one of the constants defined in JRipplesEIGEdgeEvent.

Returns:
Type of the edge event, where type is one of the constants defined in JRipplesEIGEdgeEvent