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

Class StyleSheet

source code

A collection of named paragraph styles.

Instance Methods
 
__init__(self, obj=None)
Create a new empty StyleSheet.
source code
 
set_name(self, name)
Set the name of the StyleSheet
source code
 
get_name(self)
Return the name of the StyleSheet
source code
 
clear(self)
Remove all styles from the StyleSheet
source code
 
is_empty(self)
Checks if any styles are defined
source code
 
add_paragraph_style(self, name, style)
Add a paragraph style to the style sheet.
source code
 
get_paragraph_style(self, name)
Return the ParagraphStyle associated with the name
source code
 
get_paragraph_style_names(self)
Return the the list of paragraph names in the StyleSheet
source code
 
add_draw_style(self, name, style)
Add a draw style to the style sheet.
source code
 
get_draw_style(self, name)
Return the GraphicsStyle associated with the name
source code
 
get_draw_style_names(self)
Return the the list of draw style names in the StyleSheet
source code
 
add_table_style(self, name, style)
Add a table style to the style sheet.
source code
 
get_table_style(self, name)
Return the TableStyle associated with the name
source code
 
get_table_style_names(self)
Return the the list of table style names in the StyleSheet
source code
 
add_cell_style(self, name, style)
Add a cell style to the style sheet.
source code
 
get_cell_style(self, name)
Return the TableCellStyle associated with the name
source code
 
get_cell_style_names(self)
Return the the list of cell style names in the StyleSheet
source code
Method Details

__init__(self, obj=None)
(Constructor)

source code 

Create a new empty StyleSheet.

Parameters:
  • obj - if not None, creates the StyleSheet from the values in obj, instead of creating an empty StyleSheet

set_name(self, name)

source code 

Set the name of the StyleSheet

Parameters:
  • name - The name to be given to the StyleSheet

add_paragraph_style(self, name, style)

source code 

Add a paragraph style to the style sheet.

Parameters:
  • name - The name of the ParagraphStyle
  • style - ParagraphStyle instance to be added.

get_paragraph_style(self, name)

source code 

Return the ParagraphStyle associated with the name

Parameters:
  • name - name of the ParagraphStyle that is wanted

add_draw_style(self, name, style)

source code 

Add a draw style to the style sheet.

Parameters:
  • name - The name of the GraphicsStyle
  • style - GraphicsStyle instance to be added.

get_draw_style(self, name)

source code 

Return the GraphicsStyle associated with the name

Parameters:
  • name - name of the GraphicsStyle that is wanted

add_table_style(self, name, style)

source code 

Add a table style to the style sheet.

Parameters:
  • name - The name of the TableStyle
  • style - TableStyle instance to be added.

get_table_style(self, name)

source code 

Return the TableStyle associated with the name

Parameters:
  • name - name of the TableStyle that is wanted

add_cell_style(self, name, style)

source code 

Add a cell style to the style sheet.

Parameters:
  • name - The name of the TableCellStyle
  • style - TableCellStyle instance to be added.

get_cell_style(self, name)

source code 

Return the TableCellStyle associated with the name

Parameters:
  • name - name of the TableCellStyle that is wanted