org.jmol.shape
Class Text
public
class
Text
extends Object2d
Constructor Summary |
| Text(JmolRendererInterface g3d, Font3D font, String text, short colix, short bgcolix, int x, int y, int z, int zSlab, int textAlign, float scalePixelsPerMicron) |
| Text(Viewer viewer, Graphics3D g3d, Font3D font, String target, short colix, int valign, int align, float scalePixelsPerMicron) |
Method Summary |
String | fixText(String text) |
void | formatText() |
void | getFontMetrics() |
String | getState() |
protected void | recalc() |
void | render(JmolRendererInterface g3d, float scalePixelsPerMicron, float imageFontScaling) |
static void | renderSimpleLabel(JmolRendererInterface g3d, Font3D font, String strLabel, short colix, short bgcolix, float[] boxXY, int z, int zSlab, int xOffset, int yOffset, float ascent, int descent, boolean doPointer, short pointerColix) |
void | setFid(byte fid) |
void | setFont(Font3D f3d) |
void | setFontScale(float scale) |
void | setImage(Image image) |
void | setPosition(float scale) |
static void | setPosition(float boxWidth, float boxHeight, float xOffset, float yOffset, float[] boxXY) |
void | setScalePixelsPerMicron(float scalePixelsPerMicron) |
void | setText(String text) |
static void | showBox(JmolRendererInterface g3d, short colix, short bgcolix, int x, int y, int z, int zSlab, int boxWidth, int boxHeight, float imageFontScaling, boolean atomBased) |
int | stringWidth(String str) |
private int ascent
private int descent
private boolean doFormatText
private byte fid
private FontMetrics fm
private float fontScale
Image image
private int lineHeight
private String[] lines
private String text
private int textHeight
private String textUnformatted
private int textWidth
private int[] widths
Text(
JmolRendererInterface g3d,
Font3D font, String text, short colix, short bgcolix, int x, int y, int z, int zSlab, int textAlign, float scalePixelsPerMicron)
Text(
Viewer viewer,
Graphics3D g3d,
Font3D font, String target, short colix, int valign, int align, float scalePixelsPerMicron)
String fixText(String text)
private void formatText()
private void getFontMetrics()
public String getState()
protected void recalc()
static final void renderSimpleLabel(
JmolRendererInterface g3d,
Font3D font, String strLabel, short colix, short bgcolix, float[] boxXY, int z, int zSlab, int xOffset, int yOffset, float ascent, int descent, boolean doPointer, short pointerColix)
void setFid(byte fid)
void setFontScale(float scale)
public void setImage(Image image)
private void setPosition(float scale)
private static void setPosition(float boxWidth, float boxHeight, float xOffset, float yOffset, float[] boxXY)
public void setScalePixelsPerMicron(float scalePixelsPerMicron)
void setText(String text)
private static void showBox(
JmolRendererInterface g3d, short colix, short bgcolix, int x, int y, int z, int zSlab, int boxWidth, int boxHeight, float imageFontScaling, boolean atomBased)
private int stringWidth(String str)