Module BaseDoc :: Class StyleSheet
[frames] | no frames]

Class StyleSheet

source code

A collection of named paragraph styles.

Instance Methods
 
__init__(self, obj=None)
Creates a new empty StyleSheet.
source code
 
add_cell_style(self, name, style)
Adds a cell style to the style sheet.
source code
 
add_draw_style(self, name, style)
Adds a draw style to the style sheet.
source code
 
add_paragraph_style(self, name, style)
Adds a paragraph style to the style sheet.
source code
 
add_table_style(self, name, style)
Adds a table style to the style sheet.
source code
 
clear(self)
Removes all styles from the StyleSheet
source code
 
get_cell_style(self, name)
Returns the TableCellStyle associated with the name
source code
 
get_cell_style_names(self)
Returns the the list of cell style names in the StyleSheet
source code
 
get_draw_style(self, name)
Returns the GraphicsStyle associated with the name
source code
 
get_draw_style_names(self)
Returns the the list of draw style names in the StyleSheet
source code
 
get_name(self)
Returns the name of the StyleSheet
source code
 
get_paragraph_style(self, name)
Returns the ParagraphStyle associated with the name
source code
 
get_paragraph_style_names(self)
Returns the the list of paragraph names in the StyleSheet
source code
 
get_table_style(self, name)
Returns the TableStyle associated with the name
source code
 
get_table_style_names(self)
Returns the the list of table style names in the StyleSheet
source code
 
set_name(self, name)
Sets the name of the StyleSheet
source code
Method Details

__init__(self, obj=None)
(Constructor)

source code 
Creates a new empty StyleSheet.
Parameters:
  • obj - if not None, creates the StyleSheet from the values in obj, instead of creating an empty StyleSheet

add_cell_style(self, name, style)

source code 
Adds a cell style to the style sheet.
Parameters:
  • name - The name of the TableCellStyle
  • style - TableCellStyle instance to be added.

add_draw_style(self, name, style)

source code 
Adds a draw style to the style sheet.
Parameters:
  • name - The name of the GraphicsStyle
  • style - GraphicsStyle instance to be added.

add_paragraph_style(self, name, style)

source code 
Adds a paragraph style to the style sheet.
Parameters:
  • name - The name of the ParagraphStyle
  • style - ParagraphStyle instance to be added.

add_table_style(self, name, style)

source code 
Adds a table style to the style sheet.
Parameters:
  • name - The name of the TableStyle
  • style - TableStyle instance to be added.

get_cell_style(self, name)

source code 
Returns the TableCellStyle associated with the name
Parameters:
  • name - name of the TableCellStyle that is wanted

get_draw_style(self, name)

source code 
Returns the GraphicsStyle associated with the name
Parameters:
  • name - name of the GraphicsStyle that is wanted

get_paragraph_style(self, name)

source code 
Returns the ParagraphStyle associated with the name
Parameters:
  • name - name of the ParagraphStyle that is wanted

get_table_style(self, name)

source code 
Returns the TableStyle associated with the name
Parameters:
  • name - name of the TableStyle that is wanted

set_name(self, name)

source code 
Sets the name of the StyleSheet
Parameters:
  • name - The name to be given to the StyleSheet