Class TextStyle
- java.lang.Object
-
- com.aspose.tasks.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 Summary
Constructors Constructor Description TextStyle()
Initializes a new instance of theTextStyle
class with default settings.TextStyle(float fontSize, int fontStyle)
Initializes a new instance of theTextStyle
class with the default font and specified font size and style.TextStyle(int fontStyle)
Initializes a new instance of theTextStyle
class with the default font and specified font style.TextStyle(FontDescriptor font)
Initializes a new instance of theTextStyle
class with the specified font settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Color
getBackgroundColor()
Gets background color of the text style.int
getBackgroundPattern()
Gets background pattern of the text style.Color
getColor()
Gets color of the text.FontDescriptor
getFont()
Gets font of the text style.String
getFontFamily()
Deprecated.This member is obsolete and will be removed after the release 22.8.int
getFontStyle()
Deprecated.This member is obsolete and will be removed after the release 22.8.int
getItemType()
GetsTextItemType
of the text style.float
getSizeInPoints()
Deprecated.This member is obsolete and will be removed after the release 22.8.void
setBackgroundColor(Color value)
Sets background color of the text style.void
setBackgroundPattern(int value)
Sets background pattern of the text style.void
setColor(Color value)
Sets color of the text.void
setFont(FontDescriptor value)
Sets font of the text style.void
setFontFamily(String familyName)
Deprecated.This member is obsolete and will be removed after the release 22.8.void
setFontStyle(int value)
Deprecated.This member is obsolete and will be removed after the release 22.8.void
setItemType(int value)
SetsTextItemType
of the text style.void
setSizeInPoints(float value)
Deprecated.This member is obsolete and will be removed after the release 22.8.
-
-
-
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
-
getBackgroundColor
public final Color getBackgroundColor()
Gets background color of the text style.
Color
(getBackgroundColor()
/setBackgroundColor(java.awt.Color)
).- Returns:
- background color of the text style.
-
setBackgroundColor
public final void setBackgroundColor(Color value)
Sets background color of the text style.
Color
(getBackgroundColor()
/setBackgroundColor(java.awt.Color)
).- Parameters:
value
- background color of the text style.
-
getBackgroundPattern
public final int getBackgroundPattern()
Gets background pattern of the text style.
BackgroundPattern
(getBackgroundPattern()
/setBackgroundPattern(int)
).- Returns:
- background pattern of the text style.
-
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.
-
getFontStyle
@Deprecated public final int getFontStyle()
Deprecated.This member is obsolete and will be removed after the release 22.8. Please use 'Font.Style' member instead.Gets
FontStyle
(getFontStyle()
/setFontStyle(int)
) of the text style font.- Returns:
FontStyle
(getFontStyle()
/setFontStyle(int)
) of the text style font.
-
setFontStyle
@Deprecated public final void setFontStyle(int value)
Deprecated.This member is obsolete and will be removed after the release 22.8. Please use 'Font.Style' member instead.Sets
FontStyle
(getFontStyle()
/setFontStyle(int)
) of the text style font.- Parameters:
value
-FontStyle
(getFontStyle()
/setFontStyle(int)
) of the text style font.
-
getItemType
public int getItemType()
Gets
TextItemType
of the text style.- Returns:
TextItemType
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
).
-
-