The `TableStyle` class specifies the styling for headers and cells in a table. Styles are specified in the form of Cascading Style Sheet (CSS) name-value pairs.
R6Class object.
nameThe unique name of the style (must be unique among the style names in the table theme).
declarationsA list containing CSS style declarations. Example: `declarations = list(font="...", color="...")`
new()Create a new `TableStyle` object.
TableStyle$new(parentTable, styleName = NULL, declarations = NULL)
parentTableOwning table.
styleNameA unique name for the style.
declarationsA list containing CSS style declarations. Example: `declarations = list(font="...", color="...")`
No return value.
setPropertyValue()Set the value of a single style property.
TableStyle$setPropertyValue(property = NULL, value = NULL)
propertyThe CSS style property name, e.g. color.
valueThe value of the style property, e.g. red.
No return value.
setPropertyValues()Set the values of multiple style properties.
TableStyle$setPropertyValues(declarations = NULL)
declarationsA list containing CSS style declarations. Example: `declarations = list(font="...", color="...")`
No return value.
getPropertyValue()Get the value of a single style property.
TableStyle$getPropertyValue(property = NULL)
propertyThe CSS style property name, e.g. color.
No return value.
asCSSRule()Generate a CSS style rule from this table style.
TableStyle$asCSSRule(selector = NULL)
selectorThe CSS selector name. Default value `NULL`.
The CSS style rule, e.g. text-align: center; color: red;
asNamedCSSStyle()Generate a named CSS style from this table style.
TableStyle$asNamedCSSStyle(styleNamePrefix = NULL)
styleNamePrefixA character variable specifying a prefix for all named CSS styles, to avoid style name collisions where multiple tables exist.
The CSS style rule, e.g. cell text-align: center; color: red;
getCopy()Create a copy of this `TableStyle` object.
TableStyle$getCopy(newStyleName = NULL)
newStyleNameThe name of the new style.
The new `TableStyle` object.
asList()Return the contents of this object as a list for debugging.
TableStyle$asList()
A list of various object properties.
asJSON()Return the contents of this object as JSON for debugging.
TableStyle$asJSON()
A JSON representation of various object properties.
clone()The objects of this class are cloneable with this method.
TableStyle$clone(deep = FALSE)
deepWhether to make a deep clone.
# TableStyle objects are normally created indirectly via one of the helper # methods. # For an example, see the `TableStyles` class.