R/FlexTableStyles.R
FlexTableStyles.Rd
The `FlexTableStyles` class stores a collection of `FlexTableStyle` style objects.
R6Class
object.
count
The number of styles in the collection.
styles
A list of `FlexTableStyle` objects that comprise the collection.
new()
Create a new `FlexTableStyles` object.
FlexTableStyles$new(parentTable)
parentTable
Owning table.
No return value.
clearStyles()
Clear the collection removing all styles.
FlexTableStyles$clearStyles()
No return value.
findNamedStyle()
Find a style in the collection matching the specified base style name.
FlexTableStyles$findNamedStyle(baseStyleName)
baseStyleName
The style name to find.
A `TableTableFlexTbl` object that is the style matching the specified base style name or `NULL` otherwise.
findOrAddStyle()
Find a style in the collection matching the specified base style name and style properties. If there is no matching style, then optionally add a new style.
FlexTableStyles$findOrAddStyle( action = "findOrAdd", baseStyleName = NULL, isBaseStyle = NULL, style = NULL, mapFromCss = TRUE )
action
The action to carry out. Must be one of "find", "add" or "findOrAdd" (default).
baseStyleName
The style name to find/add.
isBaseStyle
Is the style to be found/added a base style?
style
A `TableStyle` object specifying style properties to be found/added.
mapFromCss
`TRUE` (default) to map the basictabler CSS styles to corresponding flextable styles, `FALSE` to apply only the specified ft styles.
A `TableTableFlexTbl` object that is the style matching the specified base style name or `NULL` otherwise.
addNamedStyles()
Populate the FlexTbl styles based on the styles defined in the table.
FlexTableStyles$addNamedStyles(mapFromCss = TRUE)
mapFromCss
`TRUE` (default) to map the basictabler CSS styles to corresponding Excel styles, `FALSE` to apply only the specified ft styles.
No return value.
asList()
Return the contents of this object as a list for debugging.
FlexTableStyles$asList()
A list of various object properties.
asJSON()
Return the contents of this object as JSON for debugging.
FlexTableStyles$asJSON()
A JSON representation of various object properties.
asString()
Return the contents of this object as a string for debugging.
FlexTableStyles$asString(seperator = ", ")
seperator
Delimiter used to combine multiple values into a string.
A character representation of various object properties.
clone()
The objects of this class are cloneable with this method.
FlexTableStyles$clone(deep = FALSE)
deep
Whether to make a deep clone.
# This class should not be used by end users. It is an internal class # created only by the BasicTable class. It is used when converting to a # flextable.