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

Quick Search    Search Deep

com.port80.graph.dot.impl
Class TestUtil  view TestUtil download TestUtil.java

java.lang.Object
  extended bycom.port80.graph.dot.impl.TestUtil

public class TestUtil
extends java.lang.Object

Utilities for tests.


Field Summary
private static java.lang.String NAME
           
private static boolean VERBOSE
           
 
Constructor Summary
TestUtil()
           
 
Method Summary
static boolean checkMonotonic(int[] a, java.lang.String message)
          Check that values are monotonic increasing.
static com.port80.graph.IGraph createGraph(java.io.File file)
           
static com.port80.graph.IGraph createGraph(java.lang.String text)
          Create an IGraph from the given text description and initialized vertex dimensions and ranking.
static void saveImage(java.awt.image.BufferedImage buf, java.lang.String fname)
           
static void saveImage(java.lang.String fname, float scale, com.port80.graph.IGraph graph)
           
static void updateShape(com.port80.graph.IGraph graph)
          Annotate vertex and edge shapes with dimension information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

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

VERBOSE

private static boolean VERBOSE
Constructor Detail

TestUtil

public TestUtil()
Method Detail

createGraph

public static com.port80.graph.IGraph createGraph(java.lang.String text)
Create an IGraph from the given text description and initialized vertex dimensions and ranking.


createGraph

public static com.port80.graph.IGraph createGraph(java.io.File file)

updateShape

public static void updateShape(com.port80.graph.IGraph graph)
Annotate vertex and edge shapes with dimension information. updateShape() need to be called before creating VirtualGraph to annotate the vertex dimensions. updateShape() need to be called before Route() to annotate the vertex positions information.


saveImage

public static void saveImage(java.lang.String fname,
                             float scale,
                             com.port80.graph.IGraph graph)

saveImage

public static void saveImage(java.awt.image.BufferedImage buf,
                             java.lang.String fname)

checkMonotonic

public static boolean checkMonotonic(int[] a,
                                     java.lang.String message)
Check that values are monotonic increasing.