StringFormat

Inheritance: java.lang.Object, com.aspose.psd.DisposableObject

public final class StringFormat extends DisposableObject

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.

Constructors

ConstructorDescription
StringFormat()Initializes a new com.aspose.psd.StringFormat object.
StringFormat(int options)Initializes a new com.aspose.psd.StringFormat object with the specified com.aspose.psd.StringFormatFlags enumeration and language.
StringFormat(StringFormat format)Initializes a new com.aspose.psd.StringFormat object from the specified existing com.aspose.psd.StringFormat object.

Methods

MethodDescription
close()Implements the Closable interface and can be used in the try-with-resources statement since JDK 1.7.
deepClone()Creates a deep clone of this com.aspose.psd.StringFormat object.
dispose()Disposes the current instance.
equals(Object arg0)
getAlignment()Gets text alignment information on the vertical plane.
getClass()
getDigitSubstitutionLanguage()Gets the language that is used when local digits are substituted for western digits.
getDigitSubstitutionMethod()Gets the method to be used for digit substitution.
getDisposed()Gets a value indicating whether this instance is disposed.
getFirstTabOffset()Gets the number of spaces between the beginning of a line of text and the first tab stop.
getFormatFlags()Gets a com.aspose.psd.StringFormatFlags enumeration that contains formatting information.
getGenericDefault()Gets a generic default com.aspose.psd.StringFormat object.
getGenericTypographic()Gets a generic typographic com.aspose.psd.StringFormat object.
getHotkeyPrefix()Gets the com.aspose.psd.HotkeyPrefix object for this com.aspose.psd.StringFormat object.
getLineAlignment()Gets the line alignment on the horizontal plane.
getTabStops()Gets an array of distances between tab stops in the units specified by the P:Aspose.Imaging.getGraphics().PageUnit property.
getTrimming()Gets the com.aspose.psd.StringTrimming enumeration for this com.aspose.psd.StringFormat object.
hashCode()
notify()
notifyAll()
setAlignment(int value)Sets text alignment information on the vertical plane.
setDigitSubstitutionLanguage(int value)Sets the language that is used when local digits are substituted for western digits.
setDigitSubstitutionMethod(int value)Sets the method to be used for digit substitution.
setFormatFlags(int value)Sets a com.aspose.psd.StringFormatFlags enumeration that contains formatting information.
setHotkeyPrefix(int value)Sets the com.aspose.psd.HotkeyPrefix object for this com.aspose.psd.StringFormat object.
setLineAlignment(int value)Sets the line alignment on the horizontal plane.
setTabStops(float firstTabOffset, float[] tabStops)Sets tab stops for this com.aspose.psd.StringFormat object.
setTrimming(int value)Sets the com.aspose.psd.StringTrimming enumeration for this com.aspose.psd.StringFormat object.
toString()Converts this com.aspose.psd.StringFormat object to a human-readable string.
wait()
wait(long arg0)
wait(long arg0, int arg1)

StringFormat()

public StringFormat()

Initializes a new com.aspose.psd.StringFormat object.

StringFormat(int options)

public StringFormat(int options)

Initializes a new com.aspose.psd.StringFormat object with the specified com.aspose.psd.StringFormatFlags enumeration and language.

Parameters:

ParameterTypeDescription
optionsintThe com.aspose.psd.StringFormatFlags enumeration for the new com.aspose.psd.StringFormat object.

StringFormat(StringFormat format)

public StringFormat(StringFormat format)

Initializes a new com.aspose.psd.StringFormat object from the specified existing com.aspose.psd.StringFormat object.

Parameters:

ParameterTypeDescription
formatStringFormatThe com.aspose.psd.StringFormat object from which to initialize the new com.aspose.psd.StringFormat object.

close()

public void close()

Implements the Closable interface and can be used in the try-with-resources statement since JDK 1.7. This method simply call dispose method.

deepClone()

public StringFormat deepClone()

Creates a deep clone of this com.aspose.psd.StringFormat object.

Returns: StringFormat - The deep clone of the current com.aspose.psd.StringFormat .

dispose()

public final void dispose()

Disposes the current instance.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAlignment()

public int getAlignment()

Gets text alignment information on the vertical plane.

Returns: int - A com.aspose.psd.StringAlignment enumeration that specifies text alignment information.

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDigitSubstitutionLanguage()

public int getDigitSubstitutionLanguage()

Gets the language that is used when local digits are substituted for western digits.

Returns: int - 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 the P:System.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 P:System.Globalization.CultureInfo.LCID property of that System.Globalization.CultureInfo object along with. com.aspose.psd.StringDigitSubstitute.Traditional to the com.aspose.psd.StringFormat.setDigitSubstitution(int, com.aspose.psd.StringDigitSubstitute) method, then Arabic-Indic digits will be substituted for western digits at display time.

The setter is introduced for the obsolete method setDigitSubstitution.

getDigitSubstitutionMethod()

public int getDigitSubstitutionMethod()

Gets the method to be used for digit substitution.

Returns: int - A com.aspose.psd.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.

The setter is introduced for the obsolete method SetDigitSubstitution.

getDisposed()

public final boolean getDisposed()

Gets a value indicating whether this instance is disposed.

Returns: boolean - true if disposed; otherwise, false .

getFirstTabOffset()

public float getFirstTabOffset()

Gets the number of spaces between the beginning of a line of text and the first tab stop.

Returns: float - The first tab offset.

The property is introduced for removed method GetTabStops.

getFormatFlags()

public int getFormatFlags()

Gets a com.aspose.psd.StringFormatFlags enumeration that contains formatting information.

Returns: int - A com.aspose.psd.StringFormatFlags enumeration that contains formatting information.

getGenericDefault()

public static StringFormat getGenericDefault()

Gets a generic default com.aspose.psd.StringFormat object.

Returns: StringFormat - The generic default com.aspose.psd.StringFormat object.

getGenericTypographic()

public static StringFormat getGenericTypographic()

Gets a generic typographic com.aspose.psd.StringFormat object.

Returns: StringFormat - A generic typographic com.aspose.psd.StringFormat object.

getHotkeyPrefix()

public int getHotkeyPrefix()

Gets the com.aspose.psd.HotkeyPrefix object for this com.aspose.psd.StringFormat object.

Returns: int - The com.aspose.psd.HotkeyPrefix object for this com.aspose.psd.StringFormat object, the default is F:Aspose.Imaging.HotkeyPrefix.None .

getLineAlignment()

public int getLineAlignment()

Gets the line alignment on the horizontal plane.

Returns: int - A com.aspose.psd.StringAlignment enumeration that represents the line alignment.

getTabStops()

public float[] getTabStops()

Gets an array of distances between tab stops in the units specified by the P:Aspose.Imaging.getGraphics().PageUnit property.

Returns: float[] - The tab stops.

The property is introduced for removed method GetTabStops.

getTrimming()

public int getTrimming()

Gets the com.aspose.psd.StringTrimming enumeration for this com.aspose.psd.StringFormat object.

Returns: int - A com.aspose.psd.StringTrimming enumeration that indicates how text drawn with this com.aspose.psd.StringFormat object is trimmed when it exceeds the edges of the layout rectangle.

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAlignment(int value)

public void setAlignment(int value)

Sets text alignment information on the vertical plane.

Parameters:

ParameterTypeDescription
valueintA com.aspose.psd.StringAlignment enumeration that specifies text alignment information.

setDigitSubstitutionLanguage(int value)

public void setDigitSubstitutionLanguage(int value)

Sets the language that is used when local digits are substituted for western digits.

Parameters:

ParameterTypeDescription
valueintA 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 the P:System.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 P:System.Globalization.CultureInfo.LCID property of that System.Globalization.CultureInfo object along with. com.aspose.psd.StringDigitSubstitute.Traditional to the com.aspose.psd.StringFormat.setDigitSubstitution(int,com.aspose.psd.StringDigitSubstitute) method, then Arabic-Indic digits will be substituted for western digits at display time.

The setter is introduced for the obsolete method SetDigitSubstitution. |

setDigitSubstitutionMethod(int value)

public void setDigitSubstitutionMethod(int value)

Sets the method to be used for digit substitution.

Parameters:

ParameterTypeDescription
valueintA com.aspose.psd.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.

The setter is introduced for the obsolete method SetDigitSubstitution. |

setFormatFlags(int value)

public void setFormatFlags(int value)

Sets a com.aspose.psd.StringFormatFlags enumeration that contains formatting information.

Parameters:

ParameterTypeDescription
valueintA com.aspose.psd.StringFormatFlags enumeration that contains formatting information.

setHotkeyPrefix(int value)

public void setHotkeyPrefix(int value)

Sets the com.aspose.psd.HotkeyPrefix object for this com.aspose.psd.StringFormat object.

Parameters:

ParameterTypeDescription
valueintThe com.aspose.psd.HotkeyPrefix object for this com.aspose.psd.StringFormat object, the default is F:Aspose.Imaging.HotkeyPrefix.None .

setLineAlignment(int value)

public void setLineAlignment(int value)

Sets the line alignment on the horizontal plane.

Parameters:

ParameterTypeDescription
valueintA com.aspose.psd.StringAlignment enumeration that represents the line alignment.

setTabStops(float firstTabOffset, float[] tabStops)

public void setTabStops(float firstTabOffset, float[] tabStops)

Sets tab stops for this com.aspose.psd.StringFormat object.

Parameters:

ParameterTypeDescription
firstTabOffsetfloatThe number of spaces between the beginning of a line of text and the first tab stop.
tabStopsfloat[]An array of distances between tab stops in the units specified by the com.aspose.psd.Graphics.PageUnit property.

setTrimming(int value)

public void setTrimming(int value)

Sets the com.aspose.psd.StringTrimming enumeration for this com.aspose.psd.StringFormat object.

Parameters:

ParameterTypeDescription
valueintA com.aspose.psd.StringTrimming enumeration that indicates how text drawn with this com.aspose.psd.StringFormat object is trimmed when it exceeds the edges of the layout rectangle.

toString()

public String toString()

Converts this com.aspose.psd.StringFormat object to a human-readable string.

Returns: java.lang.String - A string representation of this com.aspose.psd.StringFormat object.

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int