org.jmol.shape
Class Text
java.lang.Object
org.jmol.shape.Object2d
org.jmol.shape.Text
public class Text
- extends Object2d
Fields inherited from class org.jmol.shape.Object2d |
adjustForWindow, align, ALIGN_CENTER, ALIGN_LEFT, ALIGN_NONE, ALIGN_RIGHT, bgcolix, boxHeight, boxWidth, boxX, boxXY, boxY, colix, g3d, hAlignNames, hidden, isLabelOrHover, modelIndex, movableX, movableXPercent, movableY, movableYPercent, movableZ, movableZPercent, offsetX, offsetY, pointer, POINTER_BACKGROUND, POINTER_NONE, POINTER_ON, scalePixelsPerMicron, script, target, valign, VALIGN_BOTTOM, VALIGN_MIDDLE, VALIGN_TOP, VALIGN_XY, VALIGN_XYZ, vAlignNames, viewer, visible, windowHeight, windowWidth, xyz, z, zSlab |
Constructor Summary |
Text(JmolRendererInterface g3d,
Font3D font,
java.lang.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,
java.lang.String target,
short colix,
int valign,
int align,
float scalePixelsPerMicron)
|
Method Summary |
(package private) java.lang.String |
fixText(java.lang.String text)
|
private void |
formatText()
|
private void |
getFontMetrics()
|
java.lang.String |
getState()
|
protected void |
recalc()
|
(package private) void |
render(JmolRendererInterface g3d,
float scalePixelsPerMicron,
float imageFontScaling,
boolean isExact,
float[] boxXY)
|
(package private) static void |
renderSimpleLabel(JmolRendererInterface g3d,
Font3D font,
java.lang.String strLabel,
short colix,
short bgcolix,
float[] boxXY,
int z,
int zSlab,
int xOffset,
int yOffset,
float ascent,
int descent,
boolean doPointer,
short pointerColix,
boolean isExact)
|
private static void |
setBoxXY(float boxWidth,
float boxHeight,
float xOffset,
float yOffset,
float[] boxXY,
boolean isExact)
|
(package private) void |
setFid(byte fid)
|
(package private) void |
setFont(Font3D f3d)
|
(package private) void |
setFontScale(float scale)
|
void |
setImage(java.lang.Object image)
|
private void |
setPosition(float scale)
|
void |
setScalePixelsPerMicron(float scalePixelsPerMicron)
|
(package private) void |
setText(java.lang.String text)
|
private static void |
showBox(JmolRendererInterface g3d,
short colix,
int x,
int y,
int z,
int zSlab,
int boxWidth,
int boxHeight,
float imageFontScaling,
boolean atomBased)
|
private int |
stringWidth(java.lang.String str)
|
Methods inherited from class org.jmol.shape.Object2d |
checkObjectClicked, drawPointer, getAlignment, getOffset, getPointer, getScalePixelsPerMicron, getScript, getXOffset, getYOffset, setAdjustForWindow, setAlignment, setAlignment, setBgColix, setBgColix, setBoxOffsetsInWindow, setColix, setColix, setModel, setMovableX, setMovableXPercent, setMovableY, setMovableYPercent, setMovableZ, setMovableZPercent, setOffset, setPointer, setProperty, setScript, setTranslucent, setVisibility, setWindow, setXY, setXYZ, setXYZs, setZs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fontScale
private float fontScale
text
private java.lang.String text
textUnformatted
private java.lang.String textUnformatted
doFormatText
private boolean doFormatText
lines
private java.lang.String[] lines
font
Font3D font
fid
private byte fid
ascent
private int ascent
descent
private int descent
lineHeight
private int lineHeight
textWidth
private int textWidth
textHeight
private int textHeight
widths
private int[] widths
image
java.lang.Object image
Text
Text(JmolRendererInterface g3d,
Font3D font,
java.lang.String text,
short colix,
short bgcolix,
int x,
int y,
int z,
int zSlab,
int textAlign,
float scalePixelsPerMicron)
Text
Text(Viewer viewer,
Graphics3D g3d,
Font3D font,
java.lang.String target,
short colix,
int valign,
int align,
float scalePixelsPerMicron)
setScalePixelsPerMicron
public void setScalePixelsPerMicron(float scalePixelsPerMicron)
- Overrides:
setScalePixelsPerMicron
in class Object2d
getFontMetrics
private void getFontMetrics()
setFid
void setFid(byte fid)
setText
void setText(java.lang.String text)
setImage
public void setImage(java.lang.Object image)
setFont
void setFont(Font3D f3d)
setFontScale
void setFontScale(float scale)
fixText
java.lang.String fixText(java.lang.String text)
recalc
protected void recalc()
- Specified by:
recalc
in class Object2d
formatText
private void formatText()
render
void render(JmolRendererInterface g3d,
float scalePixelsPerMicron,
float imageFontScaling,
boolean isExact,
float[] boxXY)
setPosition
private void setPosition(float scale)
setBoxXY
private static void setBoxXY(float boxWidth,
float boxHeight,
float xOffset,
float yOffset,
float[] boxXY,
boolean isExact)
showBox
private static void showBox(JmolRendererInterface g3d,
short colix,
int x,
int y,
int z,
int zSlab,
int boxWidth,
int boxHeight,
float imageFontScaling,
boolean atomBased)
renderSimpleLabel
static final void renderSimpleLabel(JmolRendererInterface g3d,
Font3D font,
java.lang.String strLabel,
short colix,
short bgcolix,
float[] boxXY,
int z,
int zSlab,
int xOffset,
int yOffset,
float ascent,
int descent,
boolean doPointer,
short pointerColix,
boolean isExact)
getState
public java.lang.String getState()
stringWidth
private int stringWidth(java.lang.String str)