Constructor and Description |
---|
LabelStyle(Captioner captioner,
Anchor anchor,
Color color,
int spacing,
byte crowdLimit,
Point offset)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
drawLabel(Graphics g,
Caption label)
Draws the label at the origin without colouring it.
|
boolean |
equals(Object o) |
Anchor |
getAnchor()
Returns the positioning anchor used by this style.
|
Rectangle |
getCaptionBounds(Caption label)
Returns a rectangle within which all of the given label will fall.
|
Captioner |
getCaptioner()
Returns the captioner used by this style.
|
Color |
getColor()
Returns the colour used by this style.
|
byte |
getCrowdLimit()
Returns the number of labels allowed within spacing pixels.
|
Icon |
getLegendIcon()
Returns an icon suitable for displaying in a legend for this style.
|
int |
getSpacing()
Returns the minimum pixel spacing permitted between labels.
|
int |
hashCode() |
public LabelStyle(Captioner captioner, Anchor anchor, Color color, int spacing, byte crowdLimit, Point offset)
captioner
- renders text to graphicsanchor
- positions text relative to plot pointcolor
- text colourspacing
- minimum pixel distance between labelscrowdLimit
- number of labels allowed within spacingoffset
- pixel offset for label positioningpublic Icon getLegendIcon()
Style
getLegendIcon
in interface Style
public Captioner getCaptioner()
public Anchor getAnchor()
public Color getColor()
public int getSpacing()
public byte getCrowdLimit()
public void drawLabel(Graphics g, Caption label)
g
- graphics contextlabel
- text contentpublic Rectangle getCaptionBounds(Caption label)
label
- text contentCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.