public class TimeIntervalGraphics extends Object
The result graphics are like: |{background color}|time-interval{fill color}|{background color}|
| Modifier and Type | Field and Description |
|---|---|
static Color |
DEFAULT_BORDER |
static Color |
DEFAULT_FILL |
private double |
max |
private double |
min |
private double |
range |
| Constructor and Description |
|---|
TimeIntervalGraphics(double min,
double max)
Create a new TimeIntervalGraphics with the given minimum and maximum
times to render intervals later.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
calculateRange() |
BufferedImage |
createTimeIntervalImage(double[] starts,
double[] ends,
int width,
int height,
Color fill,
Color border,
Color background)
Creates a time interval graphic representation with the indicated fill,
border and background colors (or null to use default colors).
|
BufferedImage |
createTimeIntervalImage(double start,
double end,
int width,
int height)
Creates a time interval graphic representation with default colors.
|
BufferedImage |
createTimeIntervalImage(double start,
double end,
int width,
int height,
Color fill,
Color border)
Creates a time interval graphic representation with the indicated fill
and border colors (or null to use default colors).
|
BufferedImage |
createTimeIntervalImage(double start,
double end,
int width,
int height,
Color fill,
Color border,
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() |
private double |
normalize(double d) |
private double |
normalizeToRange(double d) |
void |
setMax(double max) |
void |
setMin(double min) |
void |
setMinMax(double min,
double max) |
public static final Color DEFAULT_FILL
public static final Color DEFAULT_BORDER
private double min
private double max
private double range
public TimeIntervalGraphics(double min,
double max)
min - Minimum time of all intervalsmax - Maximum time of all intervalsprivate void calculateRange()
public BufferedImage createTimeIntervalImage(double start, double end, int width, int height)
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 widthheight - Image heightpublic BufferedImage createTimeIntervalImage(double start, double end, int width, int height, Color fill, Color border)
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 widthheight - Image heightfill - Fill color for the intervalborder - Border color for the intervalpublic BufferedImage createTimeIntervalImage(double start, double end, int width, int height, Color fill, Color border, Color background)
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 widthheight - Image heightfill - Fill color for the intervalborder - Border color for the intervalbackground - Background colorpublic BufferedImage createTimeIntervalImage(double[] starts, double[] ends, int width, int height, Color fill, Color border, Color background)
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 widthheight - Image heightfill - Fill color for the intervalborder - Border color for the intervalbackground - Background colorpublic double getMax()
public void setMax(double max)
public double getMin()
public void setMin(double min)
private double normalize(double d)
private double normalizeToRange(double d)
public void setMinMax(double min,
double max)
Copyright © 2007–2017 Gephi Consortium. All rights reserved.