| FlexTableStyle {basictabler} | R Documentation | 
R6 class that specifies styling as used by the 'flextable' package.
Description
The 'FlexTableStyle' class specifies the styling for cells in a table from the flextable package.
Format
R6Class object.
Active bindings
baseStyleNameThe name of the base style in the table.
isBaseStyle'TRUE' when this style is the equivalent of a named style in the table, 'FALSE' if this style has additional settings over and above the base style of the same name.
fontNameThe name of the font (single font name, not a CSS style list).
fontSizeThe size of the font (units: point).
boldTRUE' if text is bold.
italic'TRUE' if text is italic.
bgColorThe background colour for the cell (as a hex value, e.g. #00FF00).
textColorThe color of the text (as a hex value).
hAlignThe horizontal alignment of the text: left, center or right.
vAlignThe vertical alignment of the text: top, middle or bottom.
textRotationThe rotation angle of the text or 255 for vertical.
paddingAllThe padding to apply to all sides of each cell.
paddingLeftThe padding to apply to the left side of each cell.
paddingRightThe padding to apply to the right side of each cell.
paddingTopThe padding to apply to the top of each cell.
paddingBottomThe padding to apply to the bottom of each cell.
borderAllA list (with elements style, color and width) specifying the border settings for all four sides of each cell at once.
borderLeftA list (with elements style, color and width) specifying the border settings for the left border of each cell.
borderRightA list (with elements style, color and width) specifying the border settings for the right border of each cell.
borderTopA list (with elements style, color and width) specifying the border settings for the top border of each cell.
borderBottomA list (with elements style, color and width) specifying the border settings for the bottom border of each cell.
Methods
Public methods
Method new()
Create a new 'FlexTableStyle' object.
Usage
FlexTableStyle$new( parentTable, baseStyleName = NULL, isBaseStyle = NULL, fontName = NULL, fontSize = NULL, bold = NULL, italic = NULL, bgColor = NULL, textColor = NULL, hAlign = NULL, vAlign = NULL, textRotation = NULL, paddingAll = NULL, paddingLeft = NULL, paddingRight = NULL, paddingTop = NULL, paddingBottom = NULL, borderAll = NULL, borderLeft = NULL, borderRight = NULL, borderTop = NULL, borderBottom = NULL )
Arguments
parentTableOwning table.
baseStyleNameThe name of the base style in the table.
isBaseStyle'TRUE' when this style is the equivalent of a named style in the table, 'FALSE' if this style has additional settings over and above the base style of the same name.
fontNameThe name of the font (single font name, not a CSS style list).
fontSizeThe size of the font (units: point).
bold'TRUE' if text is bold.
italic'TRUE' if text is italic.
bgColorThe background colour for the cell (as a hex value, e.g. #00FF00).
textColorThe color of the text (as a hex value).
hAlignThe horizontal alignment of the text: left, center or right.
vAlignThe vertical alignment of the text: top, middle or bottom.
textRotationThe rotation angle of the text or 255 for vertical.
paddingAllThe padding to apply to all sides of each cell.
paddingLeftThe padding to apply to the left side of each cell.
paddingRightThe padding to apply to the right side of each cell.
paddingTopThe padding to apply to the top of each cell.
paddingBottomThe padding to apply to the bottom of each cell.
borderAllA list (with elements style, color and width) specifying the border settings for all four sides of each cell at once.
borderLeftA list (with elements style, color and width) specifying the border settings for the left border of each cell.
borderRightA list (with elements style, color and width) specifying the border settings for the right border of each cell.
borderTopA list (with elements style, color and width) specifying the border settings for the top border of each cell.
borderBottomA list (with elements style, color and width) specifying the border settings for the bottom border of each cell.
Returns
No return value.
Method isBasicStyleNameMatch()
Check if this style matches the specified base style name.
Usage
FlexTableStyle$isBasicStyleNameMatch(baseStyleName = NULL)
Arguments
baseStyleNameThe style name to compare to.
Returns
'TRUE' if the style name matches, 'FALSE' otherwise.
Method isFullStyleDetailMatch()
Check if this style matches the specified style properties.
Usage
FlexTableStyle$isFullStyleDetailMatch( baseStyleName = NULL, isBaseStyle = NULL, fontName = NULL, fontSize = NULL, bold = NULL, italic = NULL, bgColor = NULL, textColor = NULL, hAlign = NULL, vAlign = NULL, textRotation = NULL, paddingAll = NULL, paddingLeft = NULL, paddingRight = NULL, paddingTop = NULL, paddingBottom = NULL, borderAll = NULL, borderLeft = NULL, borderRight = NULL, borderTop = NULL, borderBottom = NULL )
Arguments
baseStyleNameThe style name to compare to.
isBaseStyleWhether the style being compared to is a base style.
fontNameThe font name to compare to.
fontSizeThe font size to compare to.
boldThe style property bold to compare to.
italicThe style property italic to compare to.
bgColorThe style property bgColor to compare to.
textColorThe style property textColor to compare to.
hAlignThe style property hAlign to compare to.
vAlignThe style property vAlign to compare to.
textRotationThe style property textRotation to compare to.
paddingAllThe padding to apply to all sides of each cell.
paddingLeftThe padding to apply to the left side of each cell.
paddingRightThe padding to apply to the right side of each cell.
paddingTopThe padding to apply to the top of each cell.
paddingBottomThe padding to apply to the bottom of each cell.
borderAllThe style property borderAll to compare to.
borderLeftThe style property borderLeft to compare to.
borderRightThe style property borderRight to compare to.
borderTopThe style property borderTop to compare to.
borderBottomThe style property borderBottom to compare to.
valueFormatThe style value format to compare to.
minColumnWidthThe style property minColumnWidth to compare to.
minRowHeightThe style property minRowHeight to compare to.
Returns
'TRUE' if the style matches, 'FALSE' otherwise.
Method asList()
Return the contents of this object as a list for debugging.
Usage
FlexTableStyle$asList()
Returns
A list of various object properties.
Method asJSON()
Return the contents of this object as JSON for debugging.
Usage
FlexTableStyle$asJSON()
Returns
A JSON representation of various object properties.
Method asString()
Return the contents of this object as a string for debugging.
Usage
FlexTableStyle$asString()
Returns
A character representation of various object properties.
Method clone()
The objects of this class are cloneable with this method.
Usage
FlexTableStyle$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
# This class should only be created by using the functions in the table.
# It is not intended to be created by users outside of the table.