com.aspose.tasks

Interfaces

Classes

Exceptions

Class TextStyle

  • Direct Known Subclasses:
    TableTextStyle

    public class TextStyle
    extends Object

    Change the visual style of the text for an item in the project view.

    • Constructor Detail

      • TextStyle

        public TextStyle()

        Initializes a new instance of the TextStyle class with default settings.

      • TextStyle

        public TextStyle​(float fontSize,
                         int fontStyle)

        Initializes a new instance of the TextStyle class with the default font and specified font size and style.

        Parameters:
        fontSize - Size of font of TextStyle.
        fontStyle - Style of font of TextStyle.
      • TextStyle

        public TextStyle​(int fontStyle)

        Initializes a new instance of the TextStyle class with the default font and specified font style.

        Parameters:
        fontStyle - Style of font to apply to default font.
      • TextStyle

        public TextStyle​(FontDescriptor font)

        Initializes a new instance of the TextStyle class with the specified font settings.

        Parameters:
        font - Font of the TextStyle.
    • Method Detail

      • setBackgroundPattern

        public final void setBackgroundPattern​(int value)

        Sets background pattern of the text style. BackgroundPattern(getBackgroundPattern()/setBackgroundPattern(int)).

        Parameters:
        value - background pattern of the text style.
      • getColor

        public final Color getColor()

        Gets color of the text.

        Returns:
        color of the text.
      • setColor

        public final void setColor​(Color value)

        Sets color of the text.

        Parameters:
        value - color of the text.
      • getFont

        public final FontDescriptor getFont()

        Gets font of the text style.

        Returns:
        font of the text style.
      • setFont

        public final void setFont​(FontDescriptor value)

        Sets font of the text style.

        Parameters:
        value - font of the text style.
      • setItemType

        public void setItemType​(int value)

        Sets TextItemType of the text style.

        Parameters:
        value - TextItemType of the text style.
      • getSizeInPoints

        @Deprecated
        public final float getSizeInPoints()
        Deprecated.
        This member is obsolete and will be removed after the release 22.8. Please use 'Font.Size' member instead.

        Gets size in points of the text style font.

        Returns:
        size in points of the text style font.
      • setSizeInPoints

        @Deprecated
        public final void setSizeInPoints​(float value)
        Deprecated.
        This member is obsolete and will be removed after the release 22.8. Please use 'Font.Size' member instead.

        Sets size in points of the text style font.

        Parameters:
        value - size in points of the text style font.
      • getFontFamily

        @Deprecated
        public final String getFontFamily()
        Deprecated.
        This member is obsolete and will be removed after the release 22.8. Please use 'getFont().getFontFamily() instead.
        Returns the font family of the text style.
        Returns:
        the font family of the text style (String).
      • setFontFamily

        @Deprecated
        public final void setFontFamily​(String familyName)
        Deprecated.
        This member is obsolete and will be removed after the release 22.8. Please use 'getFont().setFontFamily(String) instead.
        Sets the font family of the text style.
        Parameters:
        familyName - the font family of the text style (String).