
**Inheritance:**
java.lang.Object
```
public class TextStyle
```

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

| Constructor | Description |
| --- | --- |
| [TextStyle()](#TextStyle--) | Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with default settings. |
| [TextStyle(float fontSize, int fontStyle)](#TextStyle-float-int-) | Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with the default font and specified font size and style. |
| [TextStyle(int fontStyle)](#TextStyle-int-) | Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with the default font and specified font style. |
| [TextStyle(FontDescriptor font)](#TextStyle-com.aspose.tasks.FontDescriptor-) | Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with the specified font settings. |
## Methods

| Method | Description |
| --- | --- |
| [getBackgroundColor()](#getBackgroundColor--) | Gets background color of the text style. |
| [getBackgroundPattern()](#getBackgroundPattern--) | Gets background pattern of the text style. |
| [getColor()](#getColor--) | Gets color of the text. |
| [getFont()](#getFont--) | Gets font of the text style. |
| [getItemType()](#getItemType--) | Gets [TextItemType](../../com.aspose.tasks/textitemtype) of the text style. |
| [setBackgroundColor(Color value)](#setBackgroundColor-java.awt.Color-) | Sets background color of the text style. |
| [setBackgroundPattern(int value)](#setBackgroundPattern-int-) | Sets background pattern of the text style. |
| [setColor(Color value)](#setColor-java.awt.Color-) | Sets color of the text. |
| [setFont(FontDescriptor value)](#setFont-com.aspose.tasks.FontDescriptor-) | Sets font of the text style. |
| [setItemType(int value)](#setItemType-int-) | Sets [TextItemType](../../com.aspose.tasks/textitemtype) of the text style. |
### TextStyle() {#TextStyle--}
```
public TextStyle()
```


Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with default settings.

### TextStyle(float fontSize, int fontStyle) {#TextStyle-float-int-}
```
public TextStyle(float fontSize, int fontStyle)
```


Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with the default font and specified font size and style.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| fontSize | float | Size of font of TextStyle. |
| fontStyle | int | Style of font of TextStyle. |

### TextStyle(int fontStyle) {#TextStyle-int-}
```
public TextStyle(int fontStyle)
```


Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with the default font and specified font style.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| fontStyle | int | Style of font to apply to default font. |

### TextStyle(FontDescriptor font) {#TextStyle-com.aspose.tasks.FontDescriptor-}
```
public TextStyle(FontDescriptor font)
```


Initializes a new instance of the [TextStyle](../../com.aspose.tasks/textstyle) class with the specified font settings.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| font | [FontDescriptor](../../com.aspose.tasks/fontdescriptor) | Font of the TextStyle. |

### getBackgroundColor() {#getBackgroundColor--}
```
public final Color getBackgroundColor()
```


Gets background color of the text style. `Color`([getBackgroundColor()](../../com.aspose.tasks/textstyle\#getBackgroundColor--)/[setBackgroundColor(java.awt.Color)](../../com.aspose.tasks/textstyle\#setBackgroundColor-java.awt.Color-)).

**Returns:**
java.awt.Color - background color of the text style.
### getBackgroundPattern() {#getBackgroundPattern--}
```
public final int getBackgroundPattern()
```


Gets background pattern of the text style. `BackgroundPattern`([getBackgroundPattern()](../../com.aspose.tasks/textstyle\#getBackgroundPattern--)/[setBackgroundPattern(int)](../../com.aspose.tasks/textstyle\#setBackgroundPattern-int-)).

**Returns:**
int - background pattern of the text style.
### getColor() {#getColor--}
```
public final Color getColor()
```


Gets color of the text.

**Returns:**
java.awt.Color - color of the text.
### getFont() {#getFont--}
```
public final FontDescriptor getFont()
```


Gets font of the text style.

**Returns:**
[FontDescriptor](../../com.aspose.tasks/fontdescriptor) - font of the text style.
### getItemType() {#getItemType--}
```
public int getItemType()
```


Gets [TextItemType](../../com.aspose.tasks/textitemtype) of the text style.

**Returns:**
int - [TextItemType](../../com.aspose.tasks/textitemtype) of the text style.
### setBackgroundColor(Color value) {#setBackgroundColor-java.awt.Color-}
```
public final void setBackgroundColor(Color value)
```


Sets background color of the text style. `Color`([getBackgroundColor()](../../com.aspose.tasks/textstyle\#getBackgroundColor--)/[setBackgroundColor(java.awt.Color)](../../com.aspose.tasks/textstyle\#setBackgroundColor-java.awt.Color-)).

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.awt.Color | background color of the text style. |

### setBackgroundPattern(int value) {#setBackgroundPattern-int-}
```
public final void setBackgroundPattern(int value)
```


Sets background pattern of the text style. `BackgroundPattern`([getBackgroundPattern()](../../com.aspose.tasks/textstyle\#getBackgroundPattern--)/[setBackgroundPattern(int)](../../com.aspose.tasks/textstyle\#setBackgroundPattern-int-)).

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | background pattern of the text style. |

### setColor(Color value) {#setColor-java.awt.Color-}
```
public final void setColor(Color value)
```


Sets color of the text.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.awt.Color | color of the text. |

### setFont(FontDescriptor value) {#setFont-com.aspose.tasks.FontDescriptor-}
```
public final void setFont(FontDescriptor value)
```


Sets font of the text style.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [FontDescriptor](../../com.aspose.tasks/fontdescriptor) | font of the text style. |

### setItemType(int value) {#setItemType-int-}
```
public void setItemType(int value)
```


Sets [TextItemType](../../com.aspose.tasks/textitemtype) of the text style.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | [TextItemType](../../com.aspose.tasks/textitemtype) of the text style. |

