org.tigris.gef.graph
Class ConnectionConstrainer

java.lang.Object
  extended by org.tigris.gef.graph.ConnectionConstrainer
Direct Known Subclasses:
XmlConnectionConstrainer

public abstract class ConnectionConstrainer
extends java.lang.Object

Since:
25-May-2004
Author:
Bob Tarling

Field Summary
protected  java.util.Map _validConnectionMap
          A map of valid connections keyed by the connection type.
 
Constructor Summary
ConnectionConstrainer()
           
 
Method Summary
protected  void addValidConnection(java.lang.Class edgeClass, java.lang.Class portClass)
           
protected  void addValidConnection(java.lang.Class edgeClass, java.lang.Class portClass1, java.lang.Class portClass2)
           
protected  void buildValidConnectionMap(java.lang.Object[][] validConnections)
           
 boolean isConnectionValid(java.lang.Object edgeType, java.lang.Object fromElement, java.lang.Object toElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_validConnectionMap

protected java.util.Map _validConnectionMap
A map of valid connections keyed by the connection type. The constructor builds this from the data in the VALID_CONNECTIONS array

Constructor Detail

ConnectionConstrainer

public ConnectionConstrainer()
Method Detail

isConnectionValid

public boolean isConnectionValid(java.lang.Object edgeType,
                                 java.lang.Object fromElement,
                                 java.lang.Object toElement)

buildValidConnectionMap

protected void buildValidConnectionMap(java.lang.Object[][] validConnections)

addValidConnection

protected void addValidConnection(java.lang.Class edgeClass,
                                  java.lang.Class portClass)

addValidConnection

protected void addValidConnection(java.lang.Class edgeClass,
                                  java.lang.Class portClass1,
                                  java.lang.Class portClass2)