API / geotoolkit / report / edit / properties / TextStyleProperties / TextStyleProperties
properties.TextStyleProperties.TextStyleProperties
Define text properties implementation for DOM Element
Constructors
Methods
Constructors
• new TextStyleProperties(domElement?)
| Name | Type | Description |
|---|---|---|
Optional domElement | AbstractElement | DOM element |
Methods
▸ clearTextFormatting(): TextStyleProperties
Clear custom text style (restore to default Report Settings)
ITextStyleProperties.clearTextFormatting
▸ getBackgroundColor(): string | RgbaColor
Returns element background color
string | RgbaColor
return element background color
ITextStyleProperties.getBackgroundColor
▸ getColor(): string | RgbaColor
Returns text style color
string | RgbaColor
return text color
▸ getFontFamily(): string
Return font family
string
return font family
ITextStyleProperties.getFontFamily
▸ getHighlightColor(): string | RgbaColor
Returns text highlight color
string | RgbaColor
return text highlight color
ITextStyleProperties.getHighlightColor
▸ getTextAlignment(): string
Returns text alignment
string
return text alignment
ITextStyleProperties.getTextAlignment
▸ getTextSize(): string | number
Return text size
string | number
return text size
ITextStyleProperties.getTextSize
▸ getTextStyle(): TextStyle
Return text style
return text style
ITextStyleProperties.getTextStyle
▸ hasCustomTextFormatting(): boolean
Return true if text has custom text style declared in attribute
boolean
return true if text has custom format declared in attribute
ITextStyleProperties.hasCustomTextFormatting
▸ isBold(): boolean
Return true if text style is bold
boolean
return true if text style is bold
▸ isItalic(): boolean
Return true if text style is italic
boolean
return true if text style is italic
▸ isStrikethrough(): boolean
Return true if text has strikethrough style
boolean
return true if text has underline style
ITextStyleProperties.isStrikethrough
▸ isUnderline(): boolean
Return true if text has underline style
boolean
return true if text has underline style
ITextStyleProperties.isUnderline
▸ setBackgroundColor(color): TextStyleProperties
Set element background color
| Name | Type | Description |
|---|---|---|
color | string | element background color |
ITextStyleProperties.setBackgroundColor
▸ setColor(color): TextStyleProperties
Set text style color
| Name | Type | Description |
|---|---|---|
color | string | text style color |
▸ setDomElements(domElements): TextStyleProperties
Set Array of DOM Elements
| Name | Type | Description |
|---|---|---|
domElements | AbstractElement[] | DOM Elements |
ITextStyleProperties.setDomElements
▸ setFontFamily(fontFamily): TextStyleProperties
Set font family
| Name | Type | Description |
|---|---|---|
fontFamily | string | font family |
ITextStyleProperties.setFontFamily
▸ setHighlightColor(color): TextStyleProperties
Set text highlight color
| Name | Type | Description |
|---|---|---|
color | string | text highlight color |
ITextStyleProperties.setHighlightColor
▸ setOnCreateState(callBack): TextStyleProperties
Set Undo/Redo create state delegate
| Name | Type | Description |
|---|---|---|
callBack | (documentElement: Element | Element[], fullState: boolean) => IState | create undo/redo state delegate |
ITextStyleProperties.setOnCreateState
▸ setTextAlignment(alignment): TextStyleProperties
Set text alignment
| Name | Type | Description |
|---|---|---|
alignment | string | text alignment |
ITextStyleProperties.setTextAlignment
▸ setTextSize(textSize): TextStyleProperties
Set text size
| Name | Type | Description |
|---|---|---|
textSize | string | number | text size |
ITextStyleProperties.setTextSize
▸ setTextStyle(textStyle): TextStyleProperties
Set text style
| Name | Type | Description |
|---|---|---|
textStyle | TextStyleProperties | text style |
this
ITextStyleProperties.setTextStyle
▸ toggleBold(): TextStyleProperties
Change bold style
ITextStyleProperties.toggleBold
▸ toggleItalic(): TextStyleProperties
Change italic style
ITextStyleProperties.toggleItalic
▸ toggleStrikethrough(): TextStyleProperties
Change underline style
ITextStyleProperties.toggleStrikethrough
▸ toggleUnderline(): TextStyleProperties
Change underline style