Search this API

y.layout.planar
Class Face

java.lang.Object
  extended by y.layout.planar.Face

public class Face
extends Object

This class represents a face (region) in a planar graph. A face is determined by the cyclic order of its adjacent edges.


Method Summary
 boolean contains(Node node)
          Returns whether a given node is adjacent to the face.
 EdgeCursor edges()
          Returns a cursor over the edges in the face.
 void insertEdges(Edge e1, Edge e2)
          Inserts two edges,which are reverse to each other, into the edge list of the face.
 EdgePairCursor pairs()
          Returns a cursor over the edge-pairs in the face.
 String toString()
          Returns the edges in the face as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

contains

public boolean contains(Node node)
Returns whether a given node is adjacent to the face.


edges

public EdgeCursor edges()
Returns a cursor over the edges in the face.

Returns:
An EdgeCursor over the edges in the face.

pairs

public EdgePairCursor pairs()
Returns a cursor over the edge-pairs in the face.

Returns:
an Edge{airCursor over the edge-pairs in the face.

insertEdges

public void insertEdges(Edge e1,
                        Edge e2)
Inserts two edges,which are reverse to each other, into the edge list of the face. This is needed to insert degree 1 nodes into a face

Parameters:
e1 - the first edge to be inserted.
e2 - the second edge to be inserted. Precondition: source(e1) == target(e2) source(e2) == target(e1)

toString

public String toString()
Returns the edges in the face as string.

Overrides:
toString in class Object
Returns:
A String containing the names of the edges in the face.

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.