public class FlatString extends Object
| Modifier and Type | Field and Description |
|---|---|
protected double |
ascent |
protected double |
descent |
protected Font |
font |
protected double |
height |
protected double |
leading |
protected double |
lineHeight |
protected String |
text
Отображаемый текст
|
protected FlatBlock |
textBlock |
protected double |
width |
protected double |
x |
protected double |
y |
| Constructor and Description |
|---|
FlatString() |
| Modifier and Type | Method and Description |
|---|---|
double |
getAscent() |
double |
getDescent() |
Font |
getFont() |
double |
getHeight() |
double |
getLeading() |
double |
getLineHeight() |
double |
getMaxX() |
double |
getMaxY() |
double |
getMinX() |
double |
getMinY() |
String |
getText()
Указывает отображаемый текст
|
FlatBlock |
getTextBlock() |
double |
getWidth() |
double |
getX() |
double |
getY() |
void |
init(String text,
Font font,
FontRenderContext ctx)
Инициализация своств text, font, width, height, ascent, descent, lineHeight, leading
|
protected void |
nextscn() |
void |
render(Graphics2D gs) |
void |
render(Graphics2D gs,
double x,
double y) |
void |
setAscent(double ascent) |
void |
setDescent(double descent) |
void |
setFont(Font font) |
void |
setHeight(double height) |
void |
setLeading(double leading) |
void |
setLineHeight(double lineHeight) |
void |
setText(String text)
Указывает отображаемый текст
|
void |
setTextBlock(FlatBlock textBlock) |
void |
setWidth(double width) |
void |
setX(double x) |
void |
setY(double y) |
protected FlatBlock textBlock
protected String text
protected Font font
protected double x
protected double y
protected double width
protected double height
protected double ascent
protected double descent
protected double lineHeight
protected double leading
public void init(String text, Font font, FontRenderContext ctx)
text - текстfont - шрифтctx - контекстpublic FlatBlock getTextBlock()
public void setTextBlock(FlatBlock textBlock)
protected void nextscn()
public String getText()
public void setText(String text)
text - отображаемый текстpublic Font getFont()
public void setFont(Font font)
public double getX()
public void setX(double x)
public double getY()
public void setY(double y)
public double getWidth()
public void setWidth(double width)
public double getHeight()
public void setHeight(double height)
public double getMinX()
public double getMinY()
public double getMaxX()
public double getMaxY()
public double getAscent()
public void setAscent(double ascent)
public double getDescent()
public void setDescent(double descent)
public double getLineHeight()
public void setLineHeight(double lineHeight)
public double getLeading()
public void setLeading(double leading)
public void render(Graphics2D gs)
public void render(Graphics2D gs, double x, double y)
Copyright © 2018. All rights reserved.