Class TLcdPartitionedGraphChangedEvent<N,E>
java.lang.Object
java.util.EventObject
com.luciad.network.graph.partition.TLcdPartitionedGraphChangedEvent<N,E>
- All Implemented Interfaces:
Serializable
TLcdPartitionedGraphChangedEvent
implements change events that
occurred in an ILcdPartitionedGraph
. It does only describe events
on the partitioning level, like partitions that have been added or removed.
Basic graph events (e.g., nodes added) are implemented in TLcdGraphChangedEvent
and are handled by a separate handler.
A TLcdPartitionedGraphChangedEvent
has an integer code property specifying
the global changes. Its value is a any logical OR operation of PARTITIONS_ADDED,
PARTITONS_REMOVED, BOUNDARY_EDGES_ADDED, BOUNDARY_EDGES_REMOVED, BOUNDARY_EDGES_CHANGED,
BOUNDARY_GRAPH_CLEARED and CLEARED.
A TLcdPartitionedGraphChangedEvent
also has information specifying the
partition changes in more detail, i.e. per object in a ILcdGraph. The partitions() and
boundaryEdges() methods return an Enumeration of respectively all the partitions and boundary edges
that have been added, removed or changed with respect to the ILcdGraph.
The Change value returned by retrieveChange( Object ) specifies the type of change
of any Object in this enumerations. This value is one of: ADDED, REMOVED or
CHANGED.
Note 1: if BOUNDARY_GRAPH_CLEARED is set in the getCode() method, only the changes
in the boundary graph, after the clearance of the boundary graph are detailed.
Partition changes are detailed as if nothing has happened.
Note 2: if CLEARED is set in the getCode() method, only the changes (partitions
as well as boundary edges) after the clearance are detailed.- Since:
- 5.1
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Type-safe enumeration containing all possible changes for boundary edges and partitions. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that boundary boundaryEdges have been added to the graph.static final int
Indicates that at least some boundary boundaryEdges in the graph have changed.static final int
Indicates that some boundary boundaryEdges have been removed from the graph.static final int
Indicates that the boundary graph of this partitioned graph has been cleared.static final int
Indicates that the graph has been cleared (all partitions are removed and the boundary graph is cleared).static final int
Indicates that partitions have been added to the graph.static final int
Indicates that some partitions have been removed from the graph.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionTLcdPartitionedGraphChangedEvent
(ILcdPartitionedGraph aGraph, int aCode, Vector<ILcdGraph<N, E>> aChangedPartitions, Vector aIndividualPartitionChanges, Vector<E> aChangedBoundaryEdges, Vector aIndividualBoundaryEdgeChanges) Constructs a newTLcdPartitionedGraphChangedEvent
with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of boundary edge Objects associated to this TLcdGraphChangedEvent.Returns an Enumeration of all the boundary edges that have been added, removed or changed with respect to the ILcdPartitionedGraph.boolean
containsBoundaryEdge
(E aObject) Returns whetheraObject
is an boundary edge associated to this TLcdPartitionedGraphChangedEvent.boolean
containsPartition
(ILcdGraph<N, E> aObject) Returns whetheraObject
is a partition associated to this TLcdPartitionedGraphChangedEvent.int
getCode()
Returns the global graph change of thisTLcdPartitionedGraphChangedEvent
.getGraph()
Returns theILcdPartitionedGraph
that is the source of thisTLcdPartitionedGraphChangedEvent
.int
Returns the number of partition Objects associated to this TLcdGraphChangedEvent.Returns an Enumeration of all the partitions that have been added, removed or changed with respect to the ILcdPartitionedGraph.retrieveBoundaryEdgeChange
(E aBoundaryEdge) Returns the details concerning aObject in thisTLcdGraphChangedEvent
.retrievePartitionChange
(ILcdGraph<N, E> aPartition) Returns the details concerning aObject in thisTLcdPartitionedGraphChangedEvent
.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
PARTITIONS_ADDED
public static final int PARTITIONS_ADDEDIndicates that partitions have been added to the graph.- See Also:
-
PARTITIONS_REMOVED
public static final int PARTITIONS_REMOVEDIndicates that some partitions have been removed from the graph.- See Also:
-
BOUNDARY_EDGES_ADDED
public static final int BOUNDARY_EDGES_ADDEDIndicates that boundary boundaryEdges have been added to the graph.- See Also:
-
BOUNDARY_EDGES_REMOVED
public static final int BOUNDARY_EDGES_REMOVEDIndicates that some boundary boundaryEdges have been removed from the graph.- See Also:
-
BOUNDARY_EDGES_CHANGED
public static final int BOUNDARY_EDGES_CHANGEDIndicates that at least some boundary boundaryEdges in the graph have changed.- See Also:
-
BOUNDARY_GRAPH_CLEARED
public static final int BOUNDARY_GRAPH_CLEAREDIndicates that the boundary graph of this partitioned graph has been cleared.- See Also:
-
CLEARED
public static final int CLEAREDIndicates that the graph has been cleared (all partitions are removed and the boundary graph is cleared).- See Also:
-
-
Constructor Details
-
TLcdPartitionedGraphChangedEvent
public TLcdPartitionedGraphChangedEvent(ILcdPartitionedGraph aGraph, int aCode, Vector<ILcdGraph<N, E>> aChangedPartitions, Vector aIndividualPartitionChanges, Vector<E> aChangedBoundaryEdges, Vector aIndividualBoundaryEdgeChanges) Constructs a newTLcdPartitionedGraphChangedEvent
with the given parameters.- Parameters:
aGraph
- the graph that is firing this event.aCode
- the code indicating the global graph changes.aChangedPartitions
- the vector containing all changed partitionsaIndividualPartitionChanges
- the vector containing the changes for each individual partition, in the same order as the aChangedPartitions vector.aChangedBoundaryEdges
- the vector containing all changed boundary edgesaIndividualBoundaryEdgeChanges
- the vector containing the changes for each individual boundary edge, in the same order as the aChangedBoundaryEdges vector.
-
-
Method Details
-
getGraph
Returns theILcdPartitionedGraph
that is the source of thisTLcdPartitionedGraphChangedEvent
.- Returns:
- the
ILcdPartitionedGraph
that is the source of thisTLcdPartitionedGraphChangedEvent
.
-
getCode
public int getCode()Returns the global graph change of thisTLcdPartitionedGraphChangedEvent
.- Returns:
- the global graph change of this
TLcdPartitionedGraphChangedEvent
. This can be NODES_ADDED, NODES_REMOVED, NODES_CHANGED, EDGES_ADDED,EDGES_REMOVED,EDGES_CHANGED, ALL_EDGES_REMOVED or CLEARED. or a binary or of these values.
-
partitions
Returns an Enumeration of all the partitions that have been added, removed or changed with respect to the ILcdPartitionedGraph.- Returns:
- an Enumeration of all the partitions that have been added, removed or changed with respect to the ILcdPartitionedGraph.
- See Also:
-
boundaryEdges
Returns an Enumeration of all the boundary edges that have been added, removed or changed with respect to the ILcdPartitionedGraph.- Returns:
- an Enumeration of all the boundary edges that have been added, removed or changed with respect to the ILcdPartitionedGraph.
- See Also:
-
partitionCount
public int partitionCount()Returns the number of partition Objects associated to this TLcdGraphChangedEvent.- Returns:
- the number of partition Objects associated to this TLcdPartitionedGraphChangedEvent
-
boundaryEdgeCount
public int boundaryEdgeCount()Returns the number of boundary edge Objects associated to this TLcdGraphChangedEvent.- Returns:
- the number of boundary edge Objects associated to this TLcdPartitionedGraphChangedEvent
-
containsPartition
Returns whetheraObject
is a partition associated to this TLcdPartitionedGraphChangedEvent.- Parameters:
aObject
- the object to check for.- Returns:
- whether
aObject
is a partition associated to this TLcdPartitionedGraphChangedEvent
-
containsBoundaryEdge
Returns whetheraObject
is an boundary edge associated to this TLcdPartitionedGraphChangedEvent.- Parameters:
aObject
- the object to check for.- Returns:
- whether
aObject
is an boundary edge associated to this TLcdPartitionedGraphChangedEvent
-
retrievePartitionChange
Returns the details concerning aObject in thisTLcdPartitionedGraphChangedEvent
. One of ADDED or REMOVED.- Parameters:
aPartition
- the object to retrieve the type of change for.- Returns:
- the details concerning aObject in this
TLcdPartitionedGraphChangedEvent
. One of ADDED or REMOVED.
-
retrieveBoundaryEdgeChange
Returns the details concerning aObject in thisTLcdGraphChangedEvent
. One of ADDED, REMOVED or CHANGED.- Parameters:
aBoundaryEdge
- the object to retrieve the type of change for.- Returns:
- the details concerning aObject in this
TLcdGraphChangedEvent
. One of ADDED, REMOVED, CHANGED.
-