org.severe.jripples.eig
Class JRipplesEIGEvent

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.JRipplesEIGEvent
All Implemented Interfaces:
java.io.Serializable

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

JRipplesEIGEvent represent an JRipplesEIG event that encapsulates various events of nodes and edges lifecyle, and content. Event may contain any number of JRipplesEIGNodeEvent and JRipplesEIGEdgeEvent events of any particular type, that happened in the same time (i.e. between calls of JRipplesEIG.doLock(Object) and JRipplesEIG.doUnLock(Object) methods).

Author:
Maksym Petrenko
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.swt.events.TypedEvent
data, display, time, widget
 
Method Summary
 JRipplesEIGEdgeEvent[] getEdgeEvents()
          Returns all edge events.
 JRipplesEIGEdgeEvent[] getEdgeTypedEvents(int type)
          Returns specific edge events.
 JRipplesEIGEdgeEvent[] getEdgeTypedEvents(int[] types)
          Returns specific edge events.
 JRipplesEIGNodeEvent[] getNodeEvents()
          Returns the array of all node events related to this event.
 JRipplesEIGNodeEvent[] getNodeTypedEvents(int type)
          Returns specific node events.
 JRipplesEIGNodeEvent[] getNodeTypedEvents(int[] types)
          Returns specific node events.
 boolean hasEdgeEvents()
          Tells whether the event has any edge events.
 boolean hasNodeEvents()
          Tells whether the event has any node events.
 
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
 

Method Detail

hasNodeEvents

public boolean hasNodeEvents()
Tells whether the event has any node events.

Returns:
true if this event has any node events, false otherwise

hasEdgeEvents

public boolean hasEdgeEvents()
Tells whether the event has any edge events.

Returns:
true if this event has any edge events, false otherwise

getNodeEvents

public JRipplesEIGNodeEvent[] getNodeEvents()
Returns the array of all node events related to this event.

Returns:
Array of all node events related to this event. If there is no node events registered with this event, empty array will be returned.

getNodeTypedEvents

public JRipplesEIGNodeEvent[] getNodeTypedEvents(int[] types)
Returns specific node events.

Parameters:
types - desired types of event, where types are one or more of constants defined in JRipplesEIGNodeEvent
Returns:
Array of node events of the requested types related to this event. If there is no node events of requested types registered with this event, empty array will be returned.

getNodeTypedEvents

public JRipplesEIGNodeEvent[] getNodeTypedEvents(int type)
Returns specific node events.

Parameters:
type - desired type of event, where type is one of a constants defined in JRipplesEIGNodeEvent
Returns:
Array of node events of the requested type related to this event. If there is no node events of requested type registered with this event, empty array will be returned.

getEdgeEvents

public JRipplesEIGEdgeEvent[] getEdgeEvents()
Returns all edge events.

Returns:
Array of all edge events related to this event. If there is no edge events registered with this event, empty array will be returned.

getEdgeTypedEvents

public JRipplesEIGEdgeEvent[] getEdgeTypedEvents(int[] types)
Returns specific edge events.

Parameters:
types - desired types of event, where types are one or more of constants defined in JRipplesEIGEdgeEvent
Returns:
Array of edge events of the requested types related to this event. If there is no edge events of requested types registered with this event, empty array will be returned.

getEdgeTypedEvents

public JRipplesEIGEdgeEvent[] getEdgeTypedEvents(int type)
Returns specific edge events.

Parameters:
type - desired type of event, where type is one of a constants defined in JRipplesEIGEdgeEvent
Returns:
Array of edge events of the requested type related to this event. If there is no edge events of requested types registered with this event, empty array will be returned.