public class VText extends java.lang.Object implements Visualizable
VText class implements the visual text. This class
provides the interface of the visual object to the Text
class.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected int |
baseline
The baseline of the text.
|
protected static RichTextStyle |
DEFAULT_STYLE
The rich text style for the visual text.
|
protected int |
lineHeight
The height of the text.
|
protected Text |
text
The text.
|
protected int |
width
The width of the text.
|
| コンストラクタと説明 |
|---|
VText(java.lang.String str)
Constructs a visual text width the specified string.
|
VText(Text text)
Constructs a visual text width the specified text.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this visual text.
|
protected TextScanner |
getScanner()
Returns the text scanner for the visual text.
|
java.awt.Dimension |
getSize()
Returns the size of this visual text.
|
Text |
getText()
Returns the text in this visual text.
|
boolean |
isResizable()
Checks if the visual text is resizable.
|
void |
paint(java.awt.Graphics g,
java.awt.Point p)
Paints the visual text at the specified location.
|
void |
setSize(java.awt.Dimension d)
Resizes the visual text to the specified dimension.
|
void |
setText(Text text)
Sets the text of this visual text to be the specified text.
|
protected Text text
protected int width
protected int lineHeight
protected int baseline
protected static final RichTextStyle DEFAULT_STYLE
public VText(java.lang.String str)
str - the string.public VText(Text text)
text - the text.public Text getText()
public void setText(Text text)
text - the specified text.public java.awt.Dimension getSize()
getSize インタフェース内 VisualizableVisualizable.getSize()public void setSize(java.awt.Dimension d)
setSize インタフェース内 Visualizabled - the visual object dimension.Visualizable.setSize(java.awt.Dimension)public boolean isResizable()
isResizable インタフェース内 Visualizablefalse.Visualizable.isResizable()public void paint(java.awt.Graphics g,
java.awt.Point p)
paint インタフェース内 Visualizableg - the specified graphics.p - the location in the graphics to be painted.Visualizable.paint(java.awt.Graphics, java.awt.Point)public java.lang.Object clone()
clone インタフェース内 Visualizableclone クラス内 java.lang.Objectprotected TextScanner getScanner()