Method new()
Create a new `TableStyles` object.
Usage
TableStyles$new(parentTable, themeName = NULL, allowExternalStyles = FALSE)
Arguments
parentTable
Owning table.
themeName
The name of the theme.
allowExternalStyles
Enable integration scenarios where an external
system is supplying the CSS definitions.
Method isExistingStyle()
Check whether a style with the specified name exists in the collection.
Usage
TableStyles$isExistingStyle(styleName = NULL)
Arguments
styleName
The style name.
Returns
`TRUE` if a style with the specified name exists, `FALSE` otherwise.
Method getStyle()
Retrieve a style with the specified name from the collection.
Usage
TableStyles$getStyle(styleName = NULL)
Arguments
styleName
The style name.
Returns
A `TableStyle` object if a style with the specified name exists in the collection, an error is raised otherwise.
Method addStyle()
Add a new style to the collection of styles.
Usage
TableStyles$addStyle(styleName = NULL, declarations = NULL)
Arguments
styleName
The style name of the new style.
declarations
A list containing CSS style declarations.
Example: `declarations = list(font="...", color="...")`
Returns
The newly created `TableStyle` object.
Method copyStyle()
Create a copy of an exist style.
Usage
TableStyles$copyStyle(styleName = NULL, newStyleName = NULL)
Arguments
styleName
The style name of the style to copy.
newStyleName
The name of the new style.
Returns
The newly created `TableStyle` object.
Method asCSSRule()
Generate a CSS style rule from the specified table style.
Usage
TableStyles$asCSSRule(styleName = NULL, selector = NULL)
Arguments
styleName
The style name.
selector
The CSS selector name. Default value `NULL`.
Returns
The CSS style rule, e.g. { text-align: center; color: red; }
Method asNamedCSSStyle()
Generate a named CSS style from the specified table style.
Usage
TableStyles$asNamedCSSStyle(styleName = NULL, styleNamePrefix = NULL)
Arguments
styleName
The style name.
styleNamePrefix
A character variable specifying a prefix for all named
CSS styles, to avoid style name collisions where multiple tables exist.
Returns
The CSS style rule, e.g. cell { text-align: center; color: red; }
Method asList()
Return the contents of this object as a list for debugging.
Usage
TableStyles$asList()
Returns
A list of various object properties.
Method asJSON()
Return the contents of this object as JSON for debugging.
Usage
TableStyles$asJSON()
Returns
A JSON representation of various object properties.
Method asString()
Return the contents of this object as a string for debugging.
Usage
TableStyles$asString(seperator = ", ")
Arguments
seperator
Delimiter used to combine multiple values into a string.
Returns
A character representation of various object properties.
Method clone()
The objects of this class are cloneable with this method.
Usage
TableStyles$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.