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

Quick Search    Search Deep

com.port80.graph.impl
Class DirectedEdgeFactory  view DirectedEdgeFactory download DirectedEdgeFactory.java

java.lang.Object
  extended bycom.port80.util.attr.AttrTable
      extended bycom.port80.graph.impl.DirectedEdgeFactory
All Implemented Interfaces:
com.port80.util.attr.IAttrTable, com.port80.graph.IEdgeFactory, com.port80.graph.IGraphElementFactory

public class DirectedEdgeFactory
extends com.port80.util.attr.AttrTable
implements com.port80.graph.IEdgeFactory

Factory class that produce edges for directed graph.The factory also provide an IAttrTable interface for accessing default attributes and method to get the IAttrRegistry interface for client to check for unqiue attribute names. 'weight' and 'xpenalty' are supposed to be initialized from the graph description. If they are not specified, default values are used by DotEdge and VirutalEdge ... etc. (The attribute values stay undefined). DotEdge should use "weight_default" and "weight_critical" in the EdgeFactory table. VirtualEdge use "position_weight_default", "position_weight_stub", "position_weight_critical" ... etc.


Nested Class Summary
static class DirectedEdgeFactory.EdgeRenderingComparator
           
 
Field Summary
private static java.lang.String NAME
           
 
Fields inherited from class com.port80.util.attr.AttrTable
parentAttrTable
 
Constructor Summary
DirectedEdgeFactory()
           
 
Method Summary
 void clearAttrs()
          Remove all local attributes.
 com.port80.graph.IEdge newEdge(com.port80.graph.IVertex tail, com.port80.graph.IVertex head, java.lang.String name, java.lang.Object data, com.port80.graph.IGraph parent)
           
 java.lang.Object removeAttr(java.lang.String name)
          Remove a local attribute.
 void removeUnregistered()
           
 java.lang.Object setAttr(java.lang.String name, boolean value)
           
 java.lang.Object setAttr(java.lang.String name, double value)
           
 java.lang.Object setAttr(java.lang.String name, float value)
           
 java.lang.Object setAttr(java.lang.String name, int value)
           
 java.lang.Object setAttr(java.lang.String name, long value)
           
 java.lang.Object setAttr(java.lang.String name, java.lang.Object value)
          Set local attribute.
 java.lang.Object setAttrFromString(java.lang.String name, double value)
           
 java.lang.Object setAttrFromString(java.lang.String name, java.lang.String value)
          Factory tables are read only.
 
Methods inherited from class com.port80.util.attr.AttrTable
attrKeySet, getAttr, getAttrAsString, getAttrBool, getAttrBool, getAttrCached, getAttrDouble, getAttrDouble, getAttrFloat, getAttrFloat, getAttrInt, getAttrInt, getAttrLong, getAttrLong, getAttrRegistry, getAttrString, hasAttr, initAttr, initAttr, initAttr, initAttr, initAttr, initAttr, initAttr, initAttr, removeUnregisteredAttrs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.port80.graph.IGraphElementFactory
getAttrRegistry
 
Methods inherited from interface com.port80.util.attr.IAttrTable
attrKeySet, getAttr, getAttrAsString, getAttrBool, getAttrBool, getAttrCached, getAttrDouble, getAttrDouble, getAttrFloat, getAttrFloat, getAttrInt, getAttrInt, getAttrLong, getAttrLong, getAttrString, hasAttr, removeUnregisteredAttrs
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

DirectedEdgeFactory

public DirectedEdgeFactory()
Method Detail

setAttrFromString

public java.lang.Object setAttrFromString(java.lang.String name,
                                          java.lang.String value)
Factory tables are read only. Override setAttr methods to warn user.

Specified by:
setAttrFromString in interface com.port80.util.attr.IAttrTable

setAttr

public java.lang.Object setAttr(java.lang.String name,
                                java.lang.Object value)
Description copied from interface: com.port80.util.attr.IAttrTable
Set local attribute.

Specified by:
setAttr in interface com.port80.util.attr.IAttrTable

setAttr

public java.lang.Object setAttr(java.lang.String name,
                                boolean value)
Specified by:
setAttr in interface com.port80.util.attr.IAttrTable

setAttr

public java.lang.Object setAttr(java.lang.String name,
                                int value)
Specified by:
setAttr in interface com.port80.util.attr.IAttrTable

setAttr

public java.lang.Object setAttr(java.lang.String name,
                                long value)
Specified by:
setAttr in interface com.port80.util.attr.IAttrTable

setAttr

public java.lang.Object setAttr(java.lang.String name,
                                float value)
Specified by:
setAttr in interface com.port80.util.attr.IAttrTable

setAttr

public java.lang.Object setAttr(java.lang.String name,
                                double value)
Specified by:
setAttr in interface com.port80.util.attr.IAttrTable

setAttrFromString

public java.lang.Object setAttrFromString(java.lang.String name,
                                          double value)

removeAttr

public java.lang.Object removeAttr(java.lang.String name)
Description copied from interface: com.port80.util.attr.IAttrTable
Remove a local attribute. @return attribute removed.

Specified by:
removeAttr in interface com.port80.util.attr.IAttrTable

removeUnregistered

public void removeUnregistered()

clearAttrs

public void clearAttrs()
Description copied from interface: com.port80.util.attr.IAttrTable
Remove all local attributes.

Specified by:
clearAttrs in interface com.port80.util.attr.IAttrTable

newEdge

public com.port80.graph.IEdge newEdge(com.port80.graph.IVertex tail,
                                      com.port80.graph.IVertex head,
                                      java.lang.String name,
                                      java.lang.Object data,
                                      com.port80.graph.IGraph parent)
                               throws com.port80.graph.GraphException
Specified by:
newEdge in interface com.port80.graph.IEdgeFactory