public class TextAttachment extends VWrapper
TextAttachment class implements the visual item that
can be stored in the text. The text attachment can wrap any visual object.
The text attachment has the ratio to the width of layout of the rich text.
If the ratio is set (the ratio is greater than 0.0f), the width of the
text attachment becomes variable and it is resized in the ratio to the
width of the layout of the rich text.Text,
TextLayout,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected int |
alignment
The vertical alignment of the attachment.
|
static int |
BOTTOM
The constant for the vertical bottom alignment.
|
static int |
MIDDLE
The constant for the vertical middle alignment.
|
protected java.lang.String |
name
The name of the attachment.
|
protected float |
ratioToWidth
The ratio to the width of the attachment.
|
static int |
TOP
The constant for the vertical top alignment.
|
visualizable| コンストラクタと説明 |
|---|
TextAttachment(java.lang.String name,
Visualizable visualizable)
Constructs a text attachment with the specified name and visual object.
|
TextAttachment(java.lang.String name,
Visualizable visualizable,
float f)
Constructs a text attachment with the specified name, visual object
and ratio to the width.
|
TextAttachment(java.lang.String name,
Visualizable visualizable,
int alignment)
Constructs a text attachment with the specified name, visual object
and vertical alignment.
|
TextAttachment(java.lang.String name,
Visualizable visualizable,
int alignment,
float f)
Constructs a text attachment with the specified name, visual object,
vertical alignment and ratio to the width.
|
TextAttachment(Visualizable visualizable)
Constructs a text attachment with the specified visual object.
|
TextAttachment(Visualizable visualizable,
float f)
Constructs a text attachment with the specified visual object and
ratio to the width.
|
TextAttachment(Visualizable visualizable,
int alignment)
Constructs a text attachment with the specified visual object and
vertical alignment.
|
TextAttachment(Visualizable visualizable,
int alignment,
float f)
Constructs a text attachment with the specified visual object,
vertical alignment and ratio to the width.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this text attachment.
|
int |
getAlignment()
Returns the vertical alignment of this text attachment.
|
java.lang.String |
getName()
Returns the name of this text attachment.
|
float |
getRatioToWidth()
Returns the ratio to the width of the layout of the rich text.
|
boolean |
isVariableWidth()
Checks if the width of the text attachment is variable.
|
void |
setAlignment(int alignment)
Sets the vertical alignment of this text attachment to be the
specified alignment.
|
void |
setRatioToWidth(float f)
Sets the ratio to the width of the layout of the rich text.
|
getSize, getVisualizable, isResizable, paint, setSize, setVisualizableprotected java.lang.String name
protected int alignment
protected float ratioToWidth
public static final int MIDDLE
public static final int TOP
public static final int BOTTOM
public TextAttachment(Visualizable visualizable)
visualizable - the visual object.public TextAttachment(Visualizable visualizable, int alignment)
visualizable - the visual object.alignment - the vertical alignment.public TextAttachment(Visualizable visualizable, float f)
visualizable - the visual object.f - the ratio to the width.public TextAttachment(Visualizable visualizable, int alignment, float f)
visualizable - the visual object.alignment - the vertical alignment.f - the ratio to the width.public TextAttachment(java.lang.String name,
Visualizable visualizable)
name - the name.visualizable - the visual object.public TextAttachment(java.lang.String name,
Visualizable visualizable,
int alignment)
name - the name.visualizable - the visual object.alignment - the vertical alignment.public TextAttachment(java.lang.String name,
Visualizable visualizable,
float f)
name - the name.visualizable - the visual object.f - the ratio to the width.public TextAttachment(java.lang.String name,
Visualizable visualizable,
int alignment,
float f)
name - the name.visualizable - the visual object.alignment - the vertical alignment.f - the ratio to the width.public java.lang.String getName()
public int getAlignment()
public void setAlignment(int alignment)
public boolean isVariableWidth()
public float getRatioToWidth()
public void setRatioToWidth(float f)
f - the ratio that should be smaller than 1.0f.public java.lang.Object clone()
clone インタフェース内 Visualizableclone クラス内 VWrapper