public class AdaptiveText<T> extends VText
font, fontSize, lcoef, mainFont, oldcoef, oldlcoef, paddingX, paddingY, pc, scaleFactor, text, text_anchor, TEXT_ANCHOR_END, TEXT_ANCHOR_MIDDLE, TEXT_ANCHOR_START, zoomSensitive
bColor, borderColor, cursorInsideFColor, HSVb
alphaC, coef, color, cursorInsideColor, ENTERED_GLYPH, EXITED_GLYPH, fColor, HSV, NO_CURSOR_EVENT, orient, sensit, size, stickedTo, stroke, visible, vx, vy, vz
acO
Constructor and Description |
---|
AdaptiveText(double x,
double y,
int z,
Color c,
String t,
double vsWidth,
double vsHeight) |
Modifier and Type | Method and Description |
---|---|
boolean |
containedInRegion(double wb,
double nb,
double eb,
double sb,
int i)
Method used internally to find out if it is necessary to project and draw the glyph through a lens for a given camera.
|
void |
draw(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Draw this glyph.
|
void |
drawForLens(Graphics2D g,
int vW,
int vH,
int i,
Stroke stdS,
AffineTransform stdT,
int dx,
int dy)
Draw this glyph through a lens.
|
void |
setScale(float ignored)
Ignored (setting the scale is not meaningful
in the case of AdaptiveText)
|
void |
setScaleIndependent(boolean ignored)
Ignored (AdaptiveText is zoom sensitive)
|
void |
setShortener(TextShortener shortener)
Sets the shortener for this AdaptiveText.
|
void |
setText(String text)
Set text that should be painted.
|
void |
setTextAnchor(short ignored)
Ignored.
|
boolean |
visibleInRegion(double wb,
double nb,
double eb,
double sb,
int i)
Since we specify a width and height, visibility rules
are easier than the VText ones.
|
addCamera, clone, coordInside, coordInsideP, coordInsideV, fillsView, getBorderColor, getBounds, getFont, getJava2DShape, getMainFont, getOrient, getPadding, getScale, getSize, getText, getTextAnchor, getTextDisplayedAsSegCoef, highlight, initCams, invalidate, isScaleIndependent, orientTo, project, projectForLens, removeCamera, reSize, setBorderColor, setFont, setMainFont, setPadding, setTextDisplayedAsSegCoef, sizeTo, usesSpecificFont, validBounds, visibleInDisc
addHSVbColor, getDefaultBorderColor, getHSVbColor, isBorderDrawn, isFilled, setCursorInsideFillColor, setDrawBorder, setFilled, setHSVbColor
addHSVColor, getBounds, getColor, getDefaultColor, getDefaultCursorInsideHighlightColor, getHSVColor, getLocation, getOwner, getStickedGlyphArray, getStroke, getTranslucencyValue, getType, getZindex, isSelected, isSensitive, isVisible, isVisibleThroughLens, move, moveTo, propagateMove, select, setColor, setCursorInsideHighlightColor, setDefaultCursorInsideHighlightColor, setHSVColor, setOwner, setSensitivity, setStroke, setTranslucencyValue, setType, setVisible, setZindex, stick, stickToGlyph, toString, unstick, unstickAllGlyphs, unstickAllGlyphs, unstickFromGlyph, visibleInViewport
public void setShortener(TextShortener shortener)
public void setText(String text)
public void setScale(float ignored)
public void setScaleIndependent(boolean ignored)
setScaleIndependent
in class VText
ignored
- false by default.VText.isScaleIndependent()
public void setTextAnchor(short ignored)
setTextAnchor
in class VText
ignored
- one of TEXT_ANCHOR_START, TEXT_ANCHOR_MIDDLE, TEXT_ANCHOR_ENDpublic boolean visibleInRegion(double wb, double nb, double eb, double sb, int i)
visibleInRegion
in class VText
wb
- west region boundary (virtual space coordinates)nb
- north region boundary (virtual space coordinates)eb
- east region boundary (virtual space coordinates)sb
- south region boundary (virtual space coordinates)i
- camera index (useuful only for some glyph classes redefining this method)public boolean containedInRegion(double wb, double nb, double eb, double sb, int i)
Glyph
containedInRegion
in class VText
wb
- west region boundary (virtual space coordinates)nb
- north region boundary (virtual space coordinates)eb
- east region boundary (virtual space coordinates)sb
- south region boundary (virtual space coordinates)i
- camera index (useuful only for some glyph classes redefining this method)public void draw(Graphics2D g, int vW, int vH, int i, Stroke stdS, AffineTransform stdT, int dx, int dy)
Glyph
draw
in class VText
g
- graphics context in which the glyph should be drawnvW
- associated View width (used by some closed shapes to determine if it is worth painting the glyph's border)vH
- associated View height (used by some closed shapes to determine if it is worth painting the glyph's border)i
- camera index in the virtual space containing the glyphstdS
- default strokestdT
- identity transformdx
- horizontal offsetdy
- vertical offsetpublic void drawForLens(Graphics2D g, int vW, int vH, int i, Stroke stdS, AffineTransform stdT, int dx, int dy)
Glyph
drawForLens
in class VText
g
- graphics context in which the glyph should be drawnvW
- associated View width (used by some closed shapes to determine if it is worth painting the glyph's border)vH
- associated View height (used by some closed shapes to determine if it is worth painting the glyph's border)i
- camera index in the virtual space containing the glyphstdS
- default strokestdT
- identity transformdx
- horizontal offsetdy
- vertical offsetCopyright © 2000-2002 Xerox Corporation. All Rights Reserved
Copyright © 2003 World Wide Web Consortium. All Rights Reserved
Copyright © 2004-2015 INRIA. All Rights Reserved
Licensed under the GNU LGPL. For full terms see the file COPYING.