|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.LatexCaptioner
public class LatexCaptioner
Captioner implementation based on LaTeX text rendering. The hard work is done by the rather wonderful jLaTeXMath.
Field Summary | |
---|---|
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 Summary | |
---|---|
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 |
Method Summary | |
---|---|
void |
drawCaption(String 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(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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public LatexCaptioner()
public LatexCaptioner(float size)
size
- font sizepublic LatexCaptioner(float size, int type)
jlatexmath.TeXFormula
constants
size
- 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_*
constantsMethod Detail |
---|
public void drawCaption(String label, Graphics g)
Captioner
drawCaption
in interface Captioner
label
- caption textg
- graphics contextpublic Rectangle getCaptionBounds(String label)
Captioner
Captioner.drawCaption(java.lang.String, java.awt.Graphics)
.
getCaptionBounds
in interface Captioner
label
- caption text
public int getPad()
Captioner
getPad
in interface Captioner
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |