Class GraphPack.Edge
All Packages    This Package    Previous    Next

Class GraphPack.Edge

java.lang.Object
   |
   +----GraphPack.QNode
           |
           +----GraphPack.Edge

public class Edge
extends QNode
implements EdgeList
Edge stores its two vertices, attributes, and information on how to draw itself.

Edge(UndoMan)
Edge(Vertex, Vertex, UndoMan)
create a new edge between vertex _v1 and _v2

addProp(Prop)
add property p to this vertex
copy()
return new copy of this Edge.
deleteProp(String)
delete property s from this vertex
drawing()
return EdgeDrawingInterface object with methods to draw this edge
equals(Edge)
two edges are equal if the two vertices are equal
getEdge()
return this object
getLabel()
return value of property to be displayed
getPropString()
get the property string
getProps()
return this vertex's properties
getV1()
return first vertex of this edge.
getV2()
return second vertex of this edge.
hasNextEdge()
return true if there is another edge in list
hasNextHEdge()
return true if there is another highlighted edge in list.
isH()
return true if this edge is highlighted
midx()
return x-value of midpoint
midy()
return y-value of midpoint
nextEdge()
return next edge in list
nextHEdge()
return next highlighted edge in list, null if this edge is not highlighted or no more highlighted edges
selectProp(String)
choose property s to be displayed
setProp(String, String)
set property n to contain value v
setPropString(String)
sets the property with string s
showProps()
show this vertex's properties
toString()
return a string representation of the node
update()
recalculate drawing information
writeE()
write out this edge's attributes
writeE(boolean)
write out this edge's attributes: E ( , ) where s are the tempnums of it's vertices

Edge
  public Edge(UndoMan um)
Edge
  public Edge(Vertex _v1,
              Vertex _v2,
              UndoMan um)
create a new edge between vertex _v1 and _v2

copy
  public Edge copy()
return new copy of this Edge. Note attributes are also copied

update

  public void update()
recalculate drawing information

drawing

  public EdgeDrawingInterface drawing()
return EdgeDrawingInterface object with methods to draw this edge

midx

  public double midx()
return x-value of midpoint

midy

  public double midy()
return y-value of midpoint

toString

  public String toString()
return a string representation of the node
Overrides:
toString in class Object

writeE

  public String writeE()
write out this edge's attributes

writeE

  public String writeE(boolean highlight)
write out this edge's attributes: E ( , ) where s are the tempnums of it's vertices

nextEdge

  public EdgeList nextEdge()
return next edge in list

nextHEdge

  public EdgeList nextHEdge()
return next highlighted edge in list, null if this edge is not highlighted or no more highlighted edges

hasNextEdge

  public boolean hasNextEdge()
return true if there is another edge in list

hasNextHEdge

  public boolean hasNextHEdge()
return true if there is another highlighted edge in list.

getV1

  public Vertex getV1()
return first vertex of this edge. Is source for a directed edge, otherwise order is unimportant

getV2

  public Vertex getV2()
return second vertex of this edge. Is destination for a directed edge, otherwise order is unimportant

getEdge

  public Edge getEdge()
return this object

isH

  public boolean isH()
return true if this edge is highlighted

equals

  public boolean equals(Edge e)
two edges are equal if the two vertices are equal

getLabel

  public String getLabel()
return value of property to be displayed

getProps

  public PropVector getProps()
return this vertex's properties

addProp

  public void addProp(Prop p)
add property p to this vertex

selectProp

  public void selectProp(String s)
choose property s to be displayed

deleteProp

  public void deleteProp(String s)
delete property s from this vertex

setProp

  public void setProp(String n,
                      String v)
set property n to contain value v

showProps

  public void showProps()
show this vertex's properties

getPropString

  public String getPropString()
get the property string

setPropString

  public void setPropString(String s)
sets the property with string s


All Packages    This Package    Previous    Next