uk.ac.starlink.ttools.plot
Class BarStyle.Form
java.lang.Object
uk.ac.starlink.ttools.plot.BarStyle.Form
- Enclosing class:
- BarStyle
public abstract static class BarStyle.Form
- extends Object
Describes the form of a bar style, that is what each bar looks like.
BarStyle.Form
protected BarStyle.Form(String name)
drawBar
public abstract void drawBar(Graphics g,
int x,
int y,
int width,
int height)
- Draws a bar. The whole region described by
x
, y
,
width
and height
is available for
drawing in.
- Parameters:
g
- graphics contextx
- left X coordinate of region (lowest X value permitted)y
- lower Y coordinate of region (lowest Y value permitted)width
- width of region
(x+width is highest X value permitted)height
- height of region
(y+height is highest Y value permitted)
drawEdge
public void drawEdge(Graphics g,
int x,
int y1,
int y2)
- Draws the edge of a bar. This can be invoked to draw the boundary
between one bar and its immediate neighbour; the edge described
by the call's parameters is not the edge of the block representing
the bar's data, but the edge between the current bar and its
neighbour on one side or the other, so it may go up or down from
the Y value.
The default implementation does nothing, which is correct for
many forms.
- Parameters:
g
- graphics contextx
- x position of the edgey1
- one y value of the edgey2
- other y value of the edge
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.