Home / Development / Documentation / 2.0.44 / ImageGenerator
TreeGraph 2
 


info.bioinfweb.treegraph.cmd
Class ImageGenerator

java.lang.Object
  extended by info.bioinfweb.treegraph.cmd.ImageGenerator

public class ImageGenerator
extends Object


Field Summary
static String CLADOGRAM_OPTION
           
static String HEIGHT_OPTION
           
static String PHYLOGRAM_OPTION
           
static String RESOLUTION_OPTION
           
static String UNIT_MM
           
static String UNIT_PPI
           
static String UNIT_PPM
           
static String UNIT_PT
           
static String UNIT_PX
           
static String WIDTH_OPTION
           
 
Constructor Summary
ImageGenerator()
           
 
Method Summary
static boolean generate(info.webinsel.util.CommandLineReader reader)
           
private static float readDistance(String content, GraphicWriterHints hints)
          Reads a distance value (width or height) from the specified parameter in millimeters or pixels.
private static float readRes(String content)
          Reads the resolution from the specified parameter and converts it to pixels per millimeter if necessary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLADOGRAM_OPTION

public static final String CLADOGRAM_OPTION
See Also:
Constant Field Values

PHYLOGRAM_OPTION

public static final String PHYLOGRAM_OPTION
See Also:
Constant Field Values

WIDTH_OPTION

public static final String WIDTH_OPTION
See Also:
Constant Field Values

HEIGHT_OPTION

public static final String HEIGHT_OPTION
See Also:
Constant Field Values

RESOLUTION_OPTION

public static final String RESOLUTION_OPTION
See Also:
Constant Field Values

UNIT_PPM

public static final String UNIT_PPM
See Also:
Constant Field Values

UNIT_PPI

public static final String UNIT_PPI
See Also:
Constant Field Values

UNIT_MM

public static final String UNIT_MM
See Also:
Constant Field Values

UNIT_PT

public static final String UNIT_PT
See Also:
Constant Field Values

UNIT_PX

public static final String UNIT_PX
See Also:
Constant Field Values
Constructor Detail

ImageGenerator

public ImageGenerator()
Method Detail

readRes

private static float readRes(String content)
Reads the resolution from the specified parameter and converts it to pixels per millimeter if necessary.

Parameters:
content - the string that contains value and unit
Returns:

readDistance

private static float readDistance(String content,
                                  GraphicWriterHints hints)
Reads a distance value (width or height) from the specified parameter in millimeters or pixels. Values in points are converted to millimeters. Additionally the GraphicWriter.KEY_DIMENSIONS_IN_PIXELS flag is added to the specified hints according to the units specified by content.

Parameters:
content - the string that contains value and unit
pixelsPerMillimeter - the resolution of the image to be created
hints -
Returns:

generate

public static boolean generate(info.webinsel.util.CommandLineReader reader)