Captioner
public class LatexCaptioner extends java.lang.Object implements Captioner
Modifier and Type | Field | 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 | 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 | Description |
---|---|---|
void |
drawCaption(java.lang.String label,
java.awt.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(java.lang.Object o) |
|
java.awt.Rectangle |
getCaptionBounds(java.lang.String label) |
Returns a bounding box for the caption drawn by a corresponding call
to
Captioner.drawCaption(java.lang.String, 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(java.lang.String label, java.awt.Graphics g)
Captioner
drawCaption
in interface Captioner
label
- caption textg
- graphics contextpublic java.awt.Rectangle getCaptionBounds(java.lang.String label)
Captioner
Captioner.drawCaption(java.lang.String, java.awt.Graphics)
.getCaptionBounds
in interface Captioner
label
- caption textpublic int getPad()
Captioner
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.