public class LatexCaptioner extends Object implements Captioner
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_SIZE |
static int |
STYLE_DISPLAY |
static int |
STYLE_SCRIPT |
static int |
STYLE_SCRIPT_SCRIPT |
static int |
STYLE_TEXT |
static int |
TYPE_BOLD |
static int |
TYPE_ITALIC |
static int |
TYPE_ROMAN |
static int |
TYPE_SANSSERIF |
static int |
TYPE_SERIF |
static int |
TYPE_TYPEWRITER |
Constructor and Description |
---|
LatexCaptioner()
Constructs a captioner with a default font.
|
LatexCaptioner(float size)
Constructs a captioner with the default font in a given size.
|
LatexCaptioner(float size,
int type)
Constructs a captioner with a given font size and type.
|
LatexCaptioner(float size,
int type,
int style)
Constructs a captioner with a given font size, type and style
|
Modifier and Type | Method and Description |
---|---|
void |
drawCaption(Caption label,
Graphics g)
Draws a caption such that the left end of the text baseline is at
the origin of the supplied graphics context.
|
boolean |
equals(Object o) |
Rectangle |
getCaptionBounds(Caption label)
Returns a bounding box for the caption drawn by a corresponding call
to
Captioner.drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics) . |
int |
getPad()
Returns a suitable padding value for separating captions from
the reference position or other graphical elements.
|
int |
hashCode() |
public static final float DEFAULT_SIZE
public static final int STYLE_TEXT
public static final int STYLE_DISPLAY
public static final int STYLE_SCRIPT
public static final int STYLE_SCRIPT_SCRIPT
public static final int TYPE_SERIF
public static final int TYPE_SANSSERIF
public static final int TYPE_BOLD
public static final int TYPE_ITALIC
public static final int TYPE_ROMAN
public static final int TYPE_TYPEWRITER
public LatexCaptioner()
public LatexCaptioner(float size)
size
- font sizepublic LatexCaptioner(float size, int type)
jlatexmath.TeXFormula
constantssize
- font sizetype
- font type; to some extent these can be ORed togetherpublic LatexCaptioner(float size, int type, int style)
size
- font sizetype
- font type, one of the TYPE_*
constants;
to some extent these can be ORed togetherstyle
- TeX presentation style,
one of the STYLE_*
constantspublic void drawCaption(Caption label, Graphics g)
Captioner
drawCaption
in interface Captioner
label
- caption textg
- graphics contextpublic Rectangle getCaptionBounds(Caption label)
Captioner
Captioner.drawCaption(uk.ac.starlink.ttools.plot2.Caption, java.awt.Graphics)
.getCaptionBounds
in interface Captioner
label
- caption textpublic int getPad()
Captioner
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.