public class TextFormat
extends java.lang.Object
implements java.lang.Cloneable
TextFormat
object can be assigned to boxes via their
ShapeNode.setTextFormat(com.mindfusion.diagramming.TextFormat)
method. Tables provide a TableNode.setCaptionFormat(com.mindfusion.diagramming.TextFormat)
method and their cells provide a Cell.setTextFormat(com.mindfusion.diagramming.TextFormat)
method
to let you set the format and alignment of text within a table.Constructor and Description |
---|
TextFormat(Align horizontalAlign,
Align verticalAlign)
Initializes a new TextFormat instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of this TextFormat.
|
void |
drawText(java.lang.String text,
android.graphics.Canvas graphics,
Font font,
android.graphics.RectF bounds,
Brush brush,
RenderOptions options) |
boolean |
equals(TextFormat other) |
Align |
getHorizontalAlign()
Gets the horizontal text alignment.
|
boolean |
getNoWrap()
Gets a value indicating whether automatic text wrapping is disabled.
|
boolean |
getRightToLeft() |
Align |
getVerticalAlign()
Gets the vertical text alignment.
|
boolean |
getWrapAtCharacter()
Gets a value indicating whether text can be wrapped to a new line at
an arbitrary character, or only after a whole word.
|
void |
setHorizontalAlign(Align value)
Sets the horizontal text alignment.
|
void |
setNoWrap(boolean wrap)
Enables or disables automatic text wrapping.
|
void |
setRightToLeft(boolean value) |
void |
setVerticalAlign(Align value)
Sets the vertical text alignment.
|
void |
setWrapAtCharacter(boolean value)
Sets a value indicating whether text can be wrapped to a new line at
an arbitrary character, or only after a whole word.
|
public java.lang.Object clone()
clone
in class java.lang.Object
TextFormat
object.public void setHorizontalAlign(Align value)
value
- A member of the Align
enumeration.public Align getHorizontalAlign()
Align
enumeration.public void setVerticalAlign(Align value)
value
- A member of the Align
enumeration.public Align getVerticalAlign()
Align
enumeration.public void setNoWrap(boolean wrap)
wrap
- true to disable text wrapping, otherwise false.public boolean getNoWrap()
public boolean getWrapAtCharacter()
public void setWrapAtCharacter(boolean value)
value
- true if text can be wrapped at an arbitrary character, otherwise false.public boolean equals(TextFormat other)
public void setRightToLeft(boolean value)
public boolean getRightToLeft()
public void drawText(java.lang.String text, android.graphics.Canvas graphics, Font font, android.graphics.RectF bounds, Brush brush, RenderOptions options)