public class BarStyle extends DefaultStyle implements Icon
Modifier and Type | Class and Description |
---|---|
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.
|
Modifier and Type | Field and Description |
---|---|
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_SEMIFILLED
Bar form with an outline and a transparent inside.
|
static BarStyle.Form |
FORM_SEMITOP
Bar form with steps and a transparent inside.
|
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 and Description |
---|
BarStyle(Color color,
BarStyle.Form form,
BarStyle.Placement placement)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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) |
equals, getColor, getDash, getLineWidth, getOtherAtts, getStroke, getStroke, hashCode, setColor, setDash, setLineWidth, toString
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.Form FORM_SEMIFILLED
public static final BarStyle.Form FORM_SEMITOP
public static final BarStyle.Placement PLACE_ADJACENT
public static final BarStyle.Placement PLACE_OVER
public BarStyle(Color color, BarStyle.Form form, BarStyle.Placement placement)
color
- initial colourform
- bar formplacement
- bar placementpublic 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
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.