public class VRichText extends java.lang.Object implements Visualizable
VRichText class implements the visual rich text.
This class provides the interface of the visual object to the
RichText class.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected TextPositionInfo |
begin
The beginning poosition of the layout.
|
static RichTextStyle |
DEFAULT_CENTER_STYLE
The default rich text style for the visual rich text with
center justification.
|
static RichTextStyle |
DEFAULT_LEFT_STYLE
The default rich text style for the visual rich text with
left justification.
|
static RichTextStyle |
DEFAULT_RIGHT_STYLE
The default rich text style for the visual rich text with
right justification.
|
protected TextPositionInfo |
end
The ending poosition of the layout.
|
protected TextLayout |
layout
The layout for the rich text.
|
protected int |
layoutWidth
The width of the layout.
|
protected RichText |
richText
The rich text.
|
| コンストラクタと説明 |
|---|
VRichText(RichText richText)
Constructs a visual rich text with the specified rich text.
|
VRichText(java.lang.String str)
Constructs a visual rich text with the specified string.
|
VRichText(java.lang.String str,
int alignment)
Constructs a visual rich text with the specified string and
the specified alignment.
|
VRichText(Text text)
Constructs a visual rich text with the specified text.
|
VRichText(TextBuffer textBuffer)
Constructs a visual rich text with the specified text buffer.
|
VRichText(TextBuffer textBuffer,
int alignment)
Constructs a visual rich text with the specified text buffer and
the specified alignment.
|
VRichText(Text text,
int alignment)
Constructs a visual rich text with the specified text and
the specified alignment.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this visual rich text.
|
protected TextPositionInfo |
getBeginPosition()
Returns the beginning position of the rich text.
|
static RichTextStyle |
getDefaultRichTextStyle(int alignment)
Returns the default rich text style with the specified alignment.
|
protected TextPositionInfo |
getEndPosition()
Returns the ending position of the rich text.
|
RichText |
getRichText()
Returns the rich text in this visual rich text.
|
java.awt.Dimension |
getSize()
Returns the size of this visual rich text.
|
protected TextLayout |
getTextLayout()
Returns the layout for the rich text.
|
boolean |
isResizable()
Checks if the visual rich text is resizable.
|
void |
paint(java.awt.Graphics g,
java.awt.Point p)
Paints the visual rich text at the specified location.
|
void |
setSize(java.awt.Dimension d)
Resizes the visual rich text to the specified dimension.
|
protected RichText richText
protected int layoutWidth
protected transient TextLayout layout
protected transient TextPositionInfo begin
protected transient TextPositionInfo end
public static final RichTextStyle DEFAULT_LEFT_STYLE
public static final RichTextStyle DEFAULT_RIGHT_STYLE
public static final RichTextStyle DEFAULT_CENTER_STYLE
public VRichText(java.lang.String str)
str - the string.public VRichText(java.lang.String str,
int alignment)
str - the string.alignment - the alignment of the rich text.ParagraphStyle.LEFT,
ParagraphStyle.CENTER,
ParagraphStyle.RIGHTpublic VRichText(Text text)
text - the text.public VRichText(Text text, int alignment)
text - the text.alignment - the alignment of the rich text.ParagraphStyle.LEFT,
ParagraphStyle.RIGHT,
ParagraphStyle.CENTERpublic VRichText(TextBuffer textBuffer)
textBuffer - the text buffer.public VRichText(TextBuffer textBuffer, int alignment)
textBuffer - the text buffer.alignment - the alignment of the rich text.ParagraphStyle.LEFT,
ParagraphStyle.RIGHT,
ParagraphStyle.CENTERpublic VRichText(RichText richText)
richText - the rich text.public static RichTextStyle getDefaultRichTextStyle(int alignment)
ParagraphStyle.LEFT,
ParagraphStyle.RIGHT,
ParagraphStyle.CENTERpublic RichText getRichText()
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 TextLayout getTextLayout()
protected TextPositionInfo getBeginPosition()
protected TextPositionInfo getEndPosition()