com.mindfusion.diagramming
Class TextFormat

java.lang.Object
  extended by com.mindfusion.diagramming.TextFormat
All Implemented Interfaces:
java.lang.Cloneable

public class TextFormat
extends java.lang.Object
implements java.lang.Cloneable

Specifies the format and alignment of text within a diagram item. A 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 Summary
TextFormat(int horizontalAlign, int verticalAlign)
          Initializes a new TextFormat instance.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this TextFormat.
 boolean equals(TextFormat other)
           
 int getHorizontalAlign()
          Gets the horizontal text alignment.
 boolean getNoWrap()
          Gets a value indicating whether automatic text wrapping is disabled.
 boolean getRightToLeft()
           
 int 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(int value)
          Sets the horizontal text alignment.
 void setNoWrap(boolean wrap)
          Enables or disables automatic text wrapping.
 void setRightToLeft(boolean value)
           
 void setVerticalAlign(int 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFormat

public TextFormat(int horizontalAlign,
                  int verticalAlign)
Initializes a new TextFormat instance.

Parameters:
horizontalAlign - One of the Align constants.
verticalAlign - One of the Align constants.
Method Detail

clone

public java.lang.Object clone()
Creates a copy of this TextFormat.

Overrides:
clone in class java.lang.Object
Returns:
The new TextFormat object.

setHorizontalAlign

public void setHorizontalAlign(int value)
Sets the horizontal text alignment.

Parameters:
value - One of the Align constants.

getHorizontalAlign

public int getHorizontalAlign()
Gets the horizontal text alignment.

Returns:
One of the Align constants.

setVerticalAlign

public void setVerticalAlign(int value)
Sets the vertical text alignment.

Parameters:
value - One of the Align constants.

getVerticalAlign

public int getVerticalAlign()
Gets the vertical text alignment.

Returns:
One of the Align constants.

setNoWrap

public void setNoWrap(boolean wrap)
Enables or disables automatic text wrapping. If wrapping is enabled, the control automatically wraps the text to a new line when there is not enough space to fit it in one line. If automatic wrapping is disabled, the control wraps text only at new-line characters.

Parameters:
wrap - true to disable text wrapping, otherwise false.

getNoWrap

public boolean getNoWrap()
Gets a value indicating whether automatic text wrapping is disabled. If wrapping is enabled, the control automatically wraps the text to a new line when there is not enough space to fit it in one line. If automatic wrapping is disabled, the control wraps text only at new-line characters.

Returns:
true if text wrapping is disabled, otherwise false.

getWrapAtCharacter

public 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.

Returns:
true if text can be wrapped at an arbitrary character, otherwise false.

setWrapAtCharacter

public 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.

Parameters:
value - true if text can be wrapped at an arbitrary character, otherwise false.

equals

public boolean equals(TextFormat other)

setRightToLeft

public void setRightToLeft(boolean value)

getRightToLeft

public boolean getRightToLeft()