All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.graphics.TextAttachment
java.lang.Object
|
+----jp.kyasu.graphics.VWrapper
|
+----jp.kyasu.graphics.TextAttachment
- public class TextAttachment
- extends VWrapper
The 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.
- Version:
- 28 Sep 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- Text, TextLayout
-
BOTTOM
- The constant for the vertical bottom alignment.
-
MIDDLE
- The constant for the vertical middle alignment.
-
TOP
- The constant for the vertical top alignment.
-
TextAttachment(String, Visualizable)
- Constructs a text attachment with the specified name and visual object.
-
TextAttachment(String, Visualizable, float)
- Constructs a text attachment with the specified name, visual object
and ratio to the width.
-
TextAttachment(String, Visualizable, int)
- Constructs a text attachment with the specified name, visual object
and vertical alignment.
-
TextAttachment(String, Visualizable, int, float)
- Constructs a text attachment with the specified name, visual object,
vertical alignment and ratio to the width.
-
TextAttachment(Visualizable)
- Constructs a text attachment with the specified visual object.
-
TextAttachment(Visualizable, float)
- Constructs a text attachment with the specified visual object and
ratio to the width.
-
TextAttachment(Visualizable, int)
- Constructs a text attachment with the specified visual object and
vertical alignment.
-
TextAttachment(Visualizable, int, float)
- Constructs a text attachment with the specified visual object,
vertical alignment and ratio to the width.
-
clone()
- Returns a clone of this text attachment.
-
getAlignment()
- Returns the vertical alignment of this text attachment.
-
getName()
- Returns the name of this text attachment.
-
getRatioToWidth()
- Returns the ratio to the width of the layout of the rich text.
-
isVariableWidth()
- Checks if the width of the text attachment is variable.
-
setAlignment(int)
- Sets the vertical alignment of this text attachment to be the
specified alignment.
-
setRatioToWidth(float)
- Sets the ratio to the width of the layout of the rich text.
MIDDLE
public static final int MIDDLE
- The constant for the vertical middle alignment.
TOP
public static final int TOP
- The constant for the vertical top alignment.
BOTTOM
public static final int BOTTOM
- The constant for the vertical bottom alignment.
TextAttachment
public TextAttachment(Visualizable visualizable)
- Constructs a text attachment with the specified visual object.
- Parameters:
- visualizable - the visual object.
TextAttachment
public TextAttachment(Visualizable visualizable,
int alignment)
- Constructs a text attachment with the specified visual object and
vertical alignment.
- Parameters:
- visualizable - the visual object.
- alignment - the vertical alignment.
TextAttachment
public TextAttachment(Visualizable visualizable,
float f)
- Constructs a text attachment with the specified visual object and
ratio to the width.
- Parameters:
- visualizable - the visual object.
- f - the ratio to the width.
TextAttachment
public TextAttachment(Visualizable visualizable,
int alignment,
float f)
- Constructs a text attachment with the specified visual object,
vertical alignment and ratio to the width.
- Parameters:
- visualizable - the visual object.
- alignment - the vertical alignment.
- f - the ratio to the width.
TextAttachment
public TextAttachment(String name,
Visualizable visualizable)
- Constructs a text attachment with the specified name and visual object.
- Parameters:
- name - the name.
- visualizable - the visual object.
TextAttachment
public TextAttachment(String name,
Visualizable visualizable,
int alignment)
- Constructs a text attachment with the specified name, visual object
and vertical alignment.
- Parameters:
- name - the name.
- visualizable - the visual object.
- alignment - the vertical alignment.
TextAttachment
public TextAttachment(String name,
Visualizable visualizable,
float f)
- Constructs a text attachment with the specified name, visual object
and ratio to the width.
- Parameters:
- name - the name.
- visualizable - the visual object.
- f - the ratio to the width.
TextAttachment
public TextAttachment(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.
- Parameters:
- name - the name.
- visualizable - the visual object.
- alignment - the vertical alignment.
- f - the ratio to the width.
getName
public String getName()
- Returns the name of this text attachment.
getAlignment
public int getAlignment()
- Returns the vertical alignment of this text attachment.
- See Also:
- MIDDLE, TOP, BOTTOM
setAlignment
public void setAlignment(int alignment)
- Sets the vertical alignment of this text attachment to be the
specified alignment.
- Parameters:
- alignment - the vertical alignment.
- See Also:
- MIDDLE, TOP, BOTTOM
isVariableWidth
public boolean isVariableWidth()
- Checks if the width of the text attachment is variable.
getRatioToWidth
public float getRatioToWidth()
- Returns the ratio to the width of the layout of the rich text.
setRatioToWidth
public void setRatioToWidth(float f)
- Sets the ratio to the width of the layout of the rich text.
- Parameters:
- f - the ratio that should be smaller than 1.0f.
clone
public Object clone()
- Returns a clone of this text attachment.
- Overrides:
- clone in class VWrapper
All Packages Class Hierarchy This Package Previous Next Index