Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

iiuf.util.graph
Class DefaultGraphPort  view DefaultGraphPort download DefaultGraphPort.java

java.lang.Object
  extended byjava.util.Observable
      extended byiiuf.util.DefaultAttributable
          extended byiiuf.util.graph.DefaultGraphPort
All Implemented Interfaces:
iiuf.util.Attributable, GraphPort

public class DefaultGraphPort
extends iiuf.util.DefaultAttributable
implements GraphPort

Default graph port implementation. (c) 2000, 2001, IIUF, DIUF

Version:
$Name: $ $Revision: 1.1 $

Nested Class Summary
 
Nested classes inherited from class iiuf.util.DefaultAttributable
 
Field Summary
protected  int capacity
           
private  int index
           
private  iiuf.util.EventListenerList listeners
           
protected  int maxCapacity
           
protected  GraphNode node
           
 
Fields inherited from class iiuf.util.DefaultAttributable
 
Fields inherited from class java.util.Observable
 
Fields inherited from interface iiuf.util.graph.GraphPort
INFINITE
 
Constructor Summary
DefaultGraphPort(int capacity_)
           
 
Method Summary
 void addGraphPortListener(GraphPortListener l)
           
 void addGraphPortListener(GraphPortListener l, boolean weak)
           
 boolean compatible(GraphPort port)
           
 GraphEdge createEdge(GraphPort toPort)
           
 void fireConnected(GraphPort port, GraphEdge edge)
           
 void fireDisconnected(GraphPort port, GraphEdge edge)
           
private  int getCount(GraphEdge[] edges)
           
 int getEdgeCount()
           
 GraphEdge[] getEdges()
           
private  GraphEdge[] getEdges(GraphEdge[] edges)
           
 GraphEdge[] getIn()
           
 int getInCount()
           
 int getIndex()
           
 GraphNode getNode()
           
 GraphEdge[] getOut()
           
 int getOutCount()
           
 boolean isFull()
           
 void removeGraphPortListener(GraphPortListener l)
           
 void setNode(GraphNode node_, int index_)
           
 
Methods inherited from class iiuf.util.DefaultAttributable
addObserver, commit, get, getAttributes, has, removeObserver, set, toString
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface iiuf.util.Attributable
addObserver, commit, get, getAttributes, has, removeObserver, set
 

Field Detail

maxCapacity

protected int maxCapacity

capacity

protected int capacity

node

protected GraphNode node

index

private int index

listeners

private iiuf.util.EventListenerList listeners
Constructor Detail

DefaultGraphPort

public DefaultGraphPort(int capacity_)
Method Detail

addGraphPortListener

public void addGraphPortListener(GraphPortListener l)
Specified by:
addGraphPortListener in interface GraphPort

addGraphPortListener

public void addGraphPortListener(GraphPortListener l,
                                 boolean weak)

removeGraphPortListener

public void removeGraphPortListener(GraphPortListener l)
Specified by:
removeGraphPortListener in interface GraphPort

fireConnected

public void fireConnected(GraphPort port,
                          GraphEdge edge)

fireDisconnected

public void fireDisconnected(GraphPort port,
                             GraphEdge edge)

getIndex

public int getIndex()
Specified by:
getIndex in interface GraphPort

getNode

public GraphNode getNode()
Specified by:
getNode in interface GraphPort

setNode

public void setNode(GraphNode node_,
                    int index_)
Specified by:
setNode in interface GraphPort

compatible

public boolean compatible(GraphPort port)
Specified by:
compatible in interface GraphPort

isFull

public boolean isFull()
Specified by:
isFull in interface GraphPort

createEdge

public GraphEdge createEdge(GraphPort toPort)
Specified by:
createEdge in interface GraphPort

getCount

private int getCount(GraphEdge[] edges)

getEdges

private GraphEdge[] getEdges(GraphEdge[] edges)

getEdgeCount

public int getEdgeCount()
Specified by:
getEdgeCount in interface GraphPort

getEdges

public GraphEdge[] getEdges()
Specified by:
getEdges in interface GraphPort

getInCount

public int getInCount()
Specified by:
getInCount in interface GraphPort

getIn

public GraphEdge[] getIn()
Specified by:
getIn in interface GraphPort

getOutCount

public int getOutCount()
Specified by:
getOutCount in interface GraphPort

getOut

public GraphEdge[] getOut()
Specified by:
getOut in interface GraphPort