public class MultilineText<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, zoomSensitivebColor, borderColor, cursorInsideFColor, HSVbalphaC, coef, color, cursorInsideColor, ENTERED_GLYPH, EXITED_GLYPH, fColor, HSV, NO_CURSOR_EVENT, orient, sensit, size, stickedTo, stroke, visible, vx, vy, vzacO| Constructor and Description |
|---|
MultilineText(double x,
double y,
int z,
Color c,
String t,
short ta,
float scale,
float alpha) |
MultilineText(String text) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
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.
|
boolean |
coordInside(int jpx,
int jpy,
Camera c,
double cvx,
double cvy)
Detect whether the given point is inside this glyph or not.
|
boolean |
coordInsideP(int jpx,
int jpy,
Camera c)
not implemented for VText.
|
boolean |
coordInsideV(double cvx,
double cvy,
Camera c)
Detect whether the given point is inside this glyph or not.
|
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.
|
double |
getHeightConstraint() |
int |
getLineCount()
Get number of lines in this MultilineText.
|
double |
getWidthConstraint()
Gets the width constraint for this MultilineText.
|
void |
setFont(Font f)
Change the Font used to display this specific text object.
|
void |
setHeightConstraint(double constraint)
Height constraint, in virtual space units.
|
void |
setText(String text)
Set text that should be painted.
|
void |
setWidthConstraint(double constraint)
Width constraint, in virtual space units.
|
boolean |
visibleInRegion(double wb,
double nb,
double eb,
double sb,
int i)
Method used internally to find out if it is necessary to project and draw this glyph for a given camera.
|
addCamera, fillsView, getBorderColor, getBounds, getFont, getJava2DShape, getMainFont, getOrient, getPadding, getScale, getSize, getText, getTextAnchor, getTextDisplayedAsSegCoef, highlight, initCams, invalidate, isScaleIndependent, orientTo, project, projectForLens, removeCamera, reSize, setBorderColor, setMainFont, setPadding, setScale, setScaleIndependent, setTextAnchor, setTextDisplayedAsSegCoef, sizeTo, usesSpecificFont, validBounds, visibleInDiscaddHSVbColor, getDefaultBorderColor, getHSVbColor, isBorderDrawn, isFilled, setCursorInsideFillColor, setDrawBorder, setFilled, setHSVbColoraddHSVColor, 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, visibleInViewportpublic MultilineText(String text)
public MultilineText(double x,
double y,
int z,
Color c,
String t,
short ta,
float scale,
float alpha)
x - coordinate in virtual spacey - coordinate in virtual spacez - z-index (pass 0 if you do not use z-ordering)c - fill colort - text stringta - text-anchor (for alignment: one of TEXT_ANCHOR_*)scale - scaleFactor w.r.t original image sizealpha - in [0;1.0]. 0 is fully transparent, 1 is opaquepublic void setWidthConstraint(double constraint)
public void setHeightConstraint(double constraint)
public double getWidthConstraint()
public double getHeightConstraint()
public void setText(String text)
VTextpublic void setFont(Font f)
VTextsetFont in class VTextf - set to null to use the default fontVText.usesSpecificFont(),
VText.getFont()public boolean visibleInRegion(double wb,
double nb,
double eb,
double sb,
int i)
GlyphvisibleInRegion in class VTextwb - 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)
GlyphcontainedInRegion in class VTextwb - 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 coordInside(int jpx,
int jpy,
Camera c,
double cvx,
double cvy)
GlyphcoordInside in class VTextjpx - provide projected JPanel coordinates of the associated view, not virtual space coordinatesjpy - provide projected JPanel coordinates of the associated view, not virtual space coordinatesc - camera through which the glyph is observed (only a few types of Glyph actually require this information: SICircle, SIRectangle, VText)cvx - virtual space coordinatescvy - virtual space coordinatesGlyph.coordInsideV(double cvx, double cvy, Camera c),
Glyph.coordInsideP(int jpx, int jpy, Camera c)public boolean coordInsideV(double cvx,
double cvy,
Camera c)
GlyphcoordInsideV in class VTextcvx - virtual space coordinatescvy - virtual space coordinatesc - camera through which the glyph is observed (only a few types of Glyph actually require this information: SICircle, SIRectangle, VText)Glyph.coordInside(int jpx, int jpy, Camera c, double cvx, double cvy),
Glyph.coordInsideP(int jpx, int jpy, Camera c)public boolean coordInsideP(int jpx,
int jpy,
Camera c)
VTextcoordInsideP in class VTextjpx - provide projected JPanel coordinates of the associated view, not virtual space coordinatesjpy - provide projected JPanel coordinates of the associated view, not virtual space coordinatesc - camera through which the glyph is observedGlyph.coordInsideV(double cvx, double cvy, Camera c),
Glyph.coordInside(int jpx, int jpy, Camera c, double cvx, double cvy)public int getLineCount()
public void draw(Graphics2D g, int vW, int vH, int i, Stroke stdS, AffineTransform stdT, int dx, int dy)
Glyphdraw in class VTextg - 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)
GlyphdrawForLens in class VTextg - 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.