Gephi Toolkit Javadoc

org.gephi.utils
Class TimeIntervalGraphics

java.lang.Object
  extended by org.gephi.utils.TimeIntervalGraphics

public class TimeIntervalGraphics
extends java.lang.Object

Class to draw time intervals as graphics, being able to indicate the colors to use (or default colors). The result graphics are like:

|{background color}|time-interval{fill color}|{background color}|

Author:
Eduardo Ramos

Field Summary
static java.awt.Color DEFAULT_BORDER
           
static java.awt.Color DEFAULT_FILL
           
 
Constructor Summary
TimeIntervalGraphics(double min, double max)
          Create a new TimeIntervalGraphics with the given minimum and maximum times to render intervals later.
 
Method Summary
 java.awt.image.BufferedImage createTimeIntervalImage(double[] starts, double[] ends, int width, int height, java.awt.Color fill, java.awt.Color border, java.awt.Color background)
          Creates a time interval graphic representation with the indicated fill, border and background colors (or null to use default colors).
 java.awt.image.BufferedImage createTimeIntervalImage(double start, double end, int width, int height)
          Creates a time interval graphic representation with default colors.
 java.awt.image.BufferedImage createTimeIntervalImage(double start, double end, int width, int height, java.awt.Color fill, java.awt.Color border)
          Creates a time interval graphic representation with the indicated fill and border colors (or null to use default colors).
 java.awt.image.BufferedImage createTimeIntervalImage(double start, double end, int width, int height, java.awt.Color fill, java.awt.Color border, java.awt.Color background)
          Creates a time interval graphic representation with the indicated fill and border colors (or null to use default colors).
 double getMax()
           
 double getMin()
           
 void setMax(double max)
           
 void setMin(double min)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILL

public static final java.awt.Color DEFAULT_FILL

DEFAULT_BORDER

public static final java.awt.Color DEFAULT_BORDER
Constructor Detail

TimeIntervalGraphics

public TimeIntervalGraphics(double min,
                            double max)
Create a new TimeIntervalGraphics with the given minimum and maximum times to render intervals later.

Parameters:
min - Minimum time of all intervals
max - Maximum time of all intervals
Method Detail

createTimeIntervalImage

public java.awt.image.BufferedImage createTimeIntervalImage(double start,
                                                            double end,
                                                            int width,
                                                            int height)
Creates a time interval graphic representation with default colors. If starts or ends are infinite, they will be normalized to the min or max values range.

Parameters:
start - Start of the interval (must be greater or equal than minimum time)
end - End of the interval (must be lesser or equal than maximum time)
width - Image width
height - Image height
Returns:
Generated image for the interval

createTimeIntervalImage

public java.awt.image.BufferedImage createTimeIntervalImage(double start,
                                                            double end,
                                                            int width,
                                                            int height,
                                                            java.awt.Color fill,
                                                            java.awt.Color border)
Creates a time interval graphic representation with the indicated fill and border colors (or null to use default colors). If starts or ends are infinite, they will be normalized to the min or max values range.

Parameters:
start - Start of the interval (must be greater or equal than minimum time)
end - End of the interval (must be lesser or equal than maximum time)
width - Image width
height - Image height
fill - Fill color for the interval
border - Border color for the interval
Returns:
Generated image for the interval

createTimeIntervalImage

public java.awt.image.BufferedImage createTimeIntervalImage(double start,
                                                            double end,
                                                            int width,
                                                            int height,
                                                            java.awt.Color fill,
                                                            java.awt.Color border,
                                                            java.awt.Color background)
Creates a time interval graphic representation with the indicated fill and border colors (or null to use default colors). If starts or ends are infinite, they will be normalized to the min or max values range.

Parameters:
start - Start of the interval (must be greater or equal than minimum time)
end - End of the interval (must be lesser or equal than maximum time)
width - Image width
height - Image height
fill - Fill color for the interval
border - Border color for the interval
background - Background color
Returns:
Generated image for the interval

createTimeIntervalImage

public java.awt.image.BufferedImage createTimeIntervalImage(double[] starts,
                                                            double[] ends,
                                                            int width,
                                                            int height,
                                                            java.awt.Color fill,
                                                            java.awt.Color border,
                                                            java.awt.Color background)
Creates a time interval graphic representation with the indicated fill, border and background colors (or null to use default colors). If starts or ends are infinite, they will be normalized to the min or max values range.

Parameters:
starts - Starts of the intervals (must be greater or equal than minimum time)
ends - Ends of the intervals (must be lesser or equal than maximum time)
width - Image width
height - Image height
fill - Fill color for the interval
border - Border color for the interval
background - Background color
Returns:
Generated image for the interval

getMax

public double getMax()

setMax

public void setMax(double max)

getMin

public double getMin()

setMin

public void setMin(double min)

Gephi Toolkit Javadoc