|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot.DefaultStyle
uk.ac.starlink.ttools.plot.BarStyle
public class BarStyle
Defines a style for plotting a bar in a histogram.
Nested Class Summary | |
---|---|
static class |
BarStyle.Form
Describes the form of a bar style, that is what each bar looks like. |
static class |
BarStyle.Placement
Describes bar placement, that is how multiple bars covering the same data range are to be arranged. |
Field Summary | |
---|---|
static BarStyle.Form |
FORM_FILLED
Bar form using filled rectangles. |
static BarStyle.Form |
FORM_FILLED3D
Bar form using filled 3d rectangles. |
static BarStyle.Form |
FORM_OPEN
Bar form using open rectangles. |
static BarStyle.Form |
FORM_SPIKE
Bar form using 1-d spikes. |
static BarStyle.Form |
FORM_TOP
Bar form drawing only the tops of the bars. |
static BarStyle.Placement |
PLACE_ADJACENT
Placement which puts bars next to each other. |
static BarStyle.Placement |
PLACE_OVER
Placement which puts bars in the same X region. |
Constructor Summary | |
---|---|
BarStyle(Color color,
BarStyle.Form form,
BarStyle.Placement placement)
Constructor. |
Method Summary | |
---|---|
void |
drawBar(Graphics g,
int xlo,
int xhi,
int ylo,
int yhi,
int iseq,
int nseq)
Draws a bar for inclusion in a histogram. |
void |
drawEdge(Graphics g,
int x,
int y1,
int y2,
int iseq,
int nseq)
Draws the edge of a bar. |
BarStyle.Form |
getForm()
Returns the form of this style. |
int |
getIconHeight()
|
int |
getIconWidth()
|
Icon |
getLegendIcon()
Returns an icon suitable for displaying in a legend for this style. |
BarStyle.Placement |
getPlacement()
Returns the placement of this style. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
|
Methods inherited from class uk.ac.starlink.ttools.plot.DefaultStyle |
---|
equals, getColor, getDash, getLineWidth, getOtherAtts, getStroke, getStroke, hashCode, setColor, setDash, setLineWidth, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final BarStyle.Form FORM_OPEN
public static final BarStyle.Form FORM_FILLED
public static final BarStyle.Form FORM_FILLED3D
public static final BarStyle.Form FORM_TOP
public static final BarStyle.Form FORM_SPIKE
public static final BarStyle.Placement PLACE_ADJACENT
public static final BarStyle.Placement PLACE_OVER
Constructor Detail |
---|
public BarStyle(Color color, BarStyle.Form form, BarStyle.Placement placement)
color
- initial colourform
- bar formplacement
- bar placementMethod Detail |
---|
public void drawBar(Graphics g, int xlo, int xhi, int ylo, int yhi, int iseq, int nseq)
g
- graphics contextxlo
- lower bound in X directionxhi
- upper bound in X directionylo
- lower bound in Y directionyhi
- upper bound in Y directioniseq
- index of the set being plottednseq
- number of sets being plotted for this barpublic void drawEdge(Graphics g, int x, int y1, int y2, int iseq, int nseq)
g
- graphics contextx
- x position of the edgey1
- one y value for the edgey2
- other y value for the edgeiseq
- index of the set being plottednseq
- number of sets being plotted for this barpublic BarStyle.Form getForm()
public BarStyle.Placement getPlacement()
public Icon getLegendIcon()
Style
getLegendIcon
in interface Style
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
public void paintIcon(Component c, Graphics g, int x, int y)
paintIcon
in interface Icon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |