|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aspose.imaging.DisposableObject
com.aspose.imaging.StringFormat
public final class StringFormat
Encapsulates text layout information (such as alignment, orientation and tab stops) display manipulations (such as ellipsis insertion and national digit substitution) and OpenType features. This class cannot be inherited.
| Constructor Summary | |
|---|---|
StringFormat()
Initializes a new com.aspose.imaging.StringFormat object. |
|
StringFormat(int options)
Initializes a new com.aspose.imaging.StringFormat object with the specified com.aspose.imaging.StringFormatFlags enumeration and language. |
|
StringFormat(StringFormat format)
Initializes a new com.aspose.imaging.StringFormat object from the specified existing com.aspose.imaging.StringFormat object. |
|
| Method Summary | |
|---|---|
StringFormat |
deepClone()
Creates a deep clone of this com.aspose.imaging.StringFormat object. |
int |
getAlignment()
Gets text alignment information on the vertical plane. |
int |
getDigitSubstitutionLanguage()
Gets the language that is used when local digits are substituted for western digits. |
int |
getDigitSubstitutionMethod()
Gets the method to be used for digit substitution. |
float |
getFirstTabOffset()
Gets the number of spaces between the beginning of a line of text and the first tab stop. |
int |
getFormatFlags()
Gets a com.aspose.imaging.StringFormatFlags enumeration that contains formatting information. |
static StringFormat |
getGenericDefault()
Gets a generic default com.aspose.imaging.StringFormat object. |
static StringFormat |
getGenericTypographic()
Gets a generic typographic com.aspose.imaging.StringFormat object. |
int |
getHotkeyPrefix()
Gets the com.aspose.imaging.HotkeyPrefix object for this com.aspose.imaging.StringFormat object. |
int |
getLineAlignment()
Gets the line alignment on the horizontal plane. |
float[] |
getTabStops()
Gets an array of distances between tab stops in the units specified by the Graphics.PageUnit property. |
int |
getTrimming()
Gets the com.aspose.imaging.StringTrimming enumeration for this com.aspose.imaging.StringFormat object. |
void |
setAlignment(int value)
Sets text alignment information on the vertical plane. |
void |
setDigitSubstitutionLanguage(int value)
Sets the language that is used when local digits are substituted for western digits. |
void |
setDigitSubstitutionMethod(int value)
Sets the method to be used for digit substitution. |
void |
setFormatFlags(int value)
Sets a com.aspose.imaging.StringFormatFlags enumeration that contains formatting information. |
void |
setHotkeyPrefix(int value)
Sets the com.aspose.imaging.HotkeyPrefix object for this com.aspose.imaging.StringFormat object. |
void |
setLineAlignment(int value)
Sets the line alignment on the horizontal plane. |
void |
setTabStops(float firstTabOffset,
float[] tabStops)
Sets tab stops for this com.aspose.imaging.StringFormat object. |
void |
setTrimming(int value)
Sets the com.aspose.imaging.StringTrimming enumeration for this com.aspose.imaging.StringFormat object. |
java.lang.String |
toString()
Converts this com.aspose.imaging.StringFormat object to a human-readable string. |
| Methods inherited from class com.aspose.imaging.DisposableObject |
|---|
dispose, getDisposed, releaseManagedResources, releaseUnmanagedResources, verifyNotDisposed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringFormat()
Initializes a new com.aspose.imaging.StringFormat object.
public StringFormat(int options)
Initializes a new com.aspose.imaging.StringFormat object with the specified com.aspose.imaging.StringFormatFlags enumeration and language.
options - The com.aspose.imaging.StringFormatFlags enumeration for the new com.aspose.imaging.StringFormat object.public StringFormat(StringFormat format)
Initializes a new com.aspose.imaging.StringFormat object from the specified existing com.aspose.imaging.StringFormat object.
| Method Detail |
|---|
public StringFormat deepClone()
Creates a deep clone of this com.aspose.imaging.StringFormat object.
com.aspose.imaging.StringFormat.public int getAlignment()
Gets text alignment information on the vertical plane.
Value: Acom.aspose.imaging.StringAlignment enumeration that specifies text alignment information.
public int getDigitSubstitutionLanguage()
Gets the language that is used when local digits are substituted for western digits.
Value: A National Language Support (NLS) language identifier that identifies the language that will be used when local digits are substituted for western digits. You can pass theSystem.Globalization.CultureInfo.LCID property of a System.Globalization.CultureInfo object as the NLS language identifier.
For example, suppose you create a System.Globalization.CultureInfo object by passing the string "ar-EG" to a System.Globalization.CultureInfo constructor.
If you pass the System.Globalization.CultureInfo.LCID property of that System.Globalization.CultureInfo object along with.
com.aspose.imaging.StringDigitSubstitute.Traditional to the StringFormat.SetDigitSubstitution(System.Int32,StringDigitSubstitute) method,
then Arabic-Indic digits will be substituted for western digits at display time.
public int getDigitSubstitutionMethod()
Gets the method to be used for digit substitution.
Value: Acom.aspose.imaging.StringDigitSubstitute enumeration value that specifies how to substitute characters in a string that cannot be displayed because they are not supported by the current font.
public float getFirstTabOffset()
Gets the number of spaces between the beginning of a line of text and the first tab stop.
Value: The first tab offset.
public int getFormatFlags()
Gets a com.aspose.imaging.StringFormatFlags enumeration that contains formatting information.
com.aspose.imaging.StringFormatFlags enumeration that contains formatting information.
public static StringFormat getGenericDefault()
Gets a generic default com.aspose.imaging.StringFormat object.
com.aspose.imaging.StringFormat object.
public static StringFormat getGenericTypographic()
Gets a generic typographic com.aspose.imaging.StringFormat object.
com.aspose.imaging.StringFormat object.
public int getHotkeyPrefix()
Gets the com.aspose.imaging.HotkeyPrefix object for this com.aspose.imaging.StringFormat object.
com.aspose.imaging.HotkeyPrefix object for this com.aspose.imaging.StringFormat object, the default is com.aspose.imaging.HotkeyPrefix.None.
public int getLineAlignment()
Gets the line alignment on the horizontal plane.
Value: Acom.aspose.imaging.StringAlignment enumeration that represents the line alignment.
public float[] getTabStops()
Gets an array of distances between tab stops in the units specified by the Graphics.PageUnit property.
public int getTrimming()
Gets the com.aspose.imaging.StringTrimming enumeration for this com.aspose.imaging.StringFormat object.
com.aspose.imaging.StringTrimming enumeration that indicates how text drawn with this com.aspose.imaging.StringFormat object is trimmed when it exceeds the edges of the layout rectangle.
public void setAlignment(int value)
Sets text alignment information on the vertical plane.
Value: Acom.aspose.imaging.StringAlignment enumeration that specifies text alignment information.
public void setDigitSubstitutionLanguage(int value)
Sets the language that is used when local digits are substituted for western digits.
Value: A National Language Support (NLS) language identifier that identifies the language that will be used when local digits are substituted for western digits. You can pass theSystem.Globalization.CultureInfo.LCID property of a System.Globalization.CultureInfo object as the NLS language identifier.
For example, suppose you create a System.Globalization.CultureInfo object by passing the string "ar-EG" to a System.Globalization.CultureInfo constructor.
If you pass the System.Globalization.CultureInfo.LCID property of that System.Globalization.CultureInfo object along with.
com.aspose.imaging.StringDigitSubstitute.Traditional to the StringFormat.SetDigitSubstitution(System.Int32,StringDigitSubstitute) method,
then Arabic-Indic digits will be substituted for western digits at display time.
public void setDigitSubstitutionMethod(int value)
Sets the method to be used for digit substitution.
Value: Acom.aspose.imaging.StringDigitSubstitute enumeration value that specifies how to substitute characters in a string that cannot be displayed because they are not supported by the current font.
public void setFormatFlags(int value)
Sets a com.aspose.imaging.StringFormatFlags enumeration that contains formatting information.
com.aspose.imaging.StringFormatFlags enumeration that contains formatting information.
public void setHotkeyPrefix(int value)
Sets the com.aspose.imaging.HotkeyPrefix object for this com.aspose.imaging.StringFormat object.
com.aspose.imaging.HotkeyPrefix object for this com.aspose.imaging.StringFormat object, the default is com.aspose.imaging.HotkeyPrefix.None.
public void setLineAlignment(int value)
Sets the line alignment on the horizontal plane.
Value: Acom.aspose.imaging.StringAlignment enumeration that represents the line alignment.
public void setTabStops(float firstTabOffset,
float[] tabStops)
Sets tab stops for this com.aspose.imaging.StringFormat object.
firstTabOffset - The number of spaces between the beginning of a line of text and the first tab stop.tabStops - An array of distances between tab stops in the units specified by the Graphics.PageUnit property.public void setTrimming(int value)
Sets the com.aspose.imaging.StringTrimming enumeration for this com.aspose.imaging.StringFormat object.
com.aspose.imaging.StringTrimming enumeration that indicates how text drawn with this com.aspose.imaging.StringFormat object is trimmed when it exceeds the edges of the layout rectangle.
public java.lang.String toString()
Converts this com.aspose.imaging.StringFormat object to a human-readable string.
toString in class java.lang.Objectcom.aspose.imaging.StringFormat object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||