org.jgraph.graph.ConnectionSet Class Reference

List of all members.

Public Member Functions

 ConnectionSet ()
 ConnectionSet (Object edge, Object port, boolean source)
 ConnectionSet (Set connections)
 ConnectionSet (Object edge, Object source, Object target)
void addConnections (CellView[] views)
void connect (Object edge, Object source, Object target)
void connect (Object edge, Object port, boolean source)
void disconnect (Object edge)
void disconnect (Object edge, boolean source)
boolean isEmpty ()
int size ()
Iterator connections ()
Set getChangedEdges ()
Object getPort (Object edge, boolean source)
ConnectionSet clone (Map map)
Set getConnections ()
Set getEdges ()
void setConnections (Set set)
void setEdges (Set set)

Static Public Member Functions

static ConnectionSet create (GraphModel m, Object[] cells, boolean disconnect)

Static Protected Member Functions

static void connect (ConnectionSet cs, Object edge, Object port, boolean source, boolean disconnect)

Protected Attributes

Set connections = new HashSet()
Set edges = new HashSet()

Classes

class  Connection

Detailed Description

An object that represents a set of connections. Connections are equal, if equals returns true. Connections that are added later replace earlier connections.

Version:
1.0 1/1/02
Author:
Gaudenz Alder


Constructor & Destructor Documentation

org.jgraph.graph.ConnectionSet.ConnectionSet  ) 
 

Constructs an empty ConnectionSet.

org.jgraph.graph.ConnectionSet.ConnectionSet Object  edge,
Object  port,
boolean  source
 

Constructs a ConnectionSet with one Connection.

org.jgraph.graph.ConnectionSet.ConnectionSet Set  connections  ) 
 

Constructs a connection set containing the specified connections and updates the set of changed edges.

org.jgraph.graph.ConnectionSet.ConnectionSet Object  edge,
Object  source,
Object  target
 

Constructs a ConnectionSet with two Connections (to the source and target port of the edge).


Member Function Documentation

void org.jgraph.graph.ConnectionSet.addConnections CellView[]  views  ) 
 

Adds the connections in views to the connection set.

ConnectionSet org.jgraph.graph.ConnectionSet.clone Map  map  ) 
 

Creates a new connection set based on this connection set, where the edges, and ports are mapped using map. If a port is not found, the old port is used. If both, the edge and the port are not in map, the entry is ignored.

Note: Consequently, unselected edges are only reconnected at the first "paste" after a "cut", because in this case the ConnectionSet is not cloned.

void org.jgraph.graph.ConnectionSet.connect Object  edge,
Object  port,
boolean  source
 

Connect edge to port passed in. The source indicates if port is the source of edge object. The previous connections between edge and its source or target in the set is replaced.

void org.jgraph.graph.ConnectionSet.connect Object  edge,
Object  source,
Object  target
 

Connect edge to source and target in the connection set. The previous connections between edge and its source and target are replaced in the set.

static void org.jgraph.graph.ConnectionSet.connect ConnectionSet  cs,
Object  edge,
Object  port,
boolean  source,
boolean  disconnect
[static, protected]
 

Connect or disconnect edge from source and target in cs based on disconnect.

Iterator org.jgraph.graph.ConnectionSet.connections  ) 
 

Returns an Iterator for the connections in this set.

static ConnectionSet org.jgraph.graph.ConnectionSet.create GraphModel  m,
Object[]  cells,
boolean  disconnect
[static]
 

Returns a connection set that represents the connection or disconnection of cells in model based on disconnect.

void org.jgraph.graph.ConnectionSet.disconnect Object  edge,
boolean  source
 

Disconnect edge from port. source indicates if port is the source of edge. The previous connections between edge and its source or target in the set is replaced.

void org.jgraph.graph.ConnectionSet.disconnect Object  edge  ) 
 

Disconnect edge from source and target in the connection set. The previous connections between edge and its source and target are replaced in the set.

Set org.jgraph.graph.ConnectionSet.getChangedEdges  ) 
 

Returns a Set for the edges in this connection set.

Set org.jgraph.graph.ConnectionSet.getConnections  ) 
 

Returns:
the set of connections

Set org.jgraph.graph.ConnectionSet.getEdges  ) 
 

Returns:
the edges making us this connection set

Object org.jgraph.graph.ConnectionSet.getPort Object  edge,
boolean  source
 

Returns the source or target of the specified edge in this connection set or null if the connection set contains no corresponding entry for the edge.

boolean org.jgraph.graph.ConnectionSet.isEmpty  ) 
 

Returns true if the connection set is empty.

void org.jgraph.graph.ConnectionSet.setConnections Set  set  ) 
 

Parameters:
set 

void org.jgraph.graph.ConnectionSet.setEdges Set  set  ) 
 

Parameters:
set 

int org.jgraph.graph.ConnectionSet.size  ) 
 

Returns the number of (edge, port)-pairs.


Member Data Documentation

Set org.jgraph.graph.ConnectionSet.connections = new HashSet() [protected]
 

Contents of the connection set.

Set org.jgraph.graph.ConnectionSet.edges = new HashSet() [protected]
 

Set of changed edges for the connection set.


The documentation for this class was generated from the following file:
Generated on Sun May 28 19:13:13 2006 for Digimod by  doxygen 1.4.6-NO