Class Trees Index phpDocumentor Project Page

Class Format

(line 42)

Located in File: Program_Root/Format.php


Class for generating Excel XF records (formats)

Class Variable Summary


Inherited Class Variable Summary


Method Summary

void

constructor Format ( [$index = 0], [$properties = array()] )


Constructor
string

get_font ( )


Generate an Excel BIFF FONT record.
string

get_font_key ( )


Returns a unique hash key for a font. Used by Workbook->_store_all_fonts()
string

get_xf ( $style )


Generate an Excel BIFF XF record (style or cell).
integer

get_xf_index ( )


Returns the index used by Worksheet->_XF()
void

set_align ( $location )


Set cell alignment.
void

set_bg_color ( $color )


Sets the cell's background color
void

set_bold ( [$weight = 1] )


Bold has a range 0x64..0x3E8.
void

set_border ( $style )


Set cells borders to the same style
void

set_border_color ( $color )


Sets all the cell's borders to the same color
void

set_bottom ( $style )


Sets the bottom border of the cell
void

set_bottom_color ( $color )


Sets the cell's bottom border color
void

set_color ( $color )


Sets the cell's color
void

set_fg_color ( $color )


Sets the cell's foreground color
void

set_italic ( )


Sets the font style as italic
void

set_left ( $style )


Sets the left border of the cell
void

set_left_color ( $color )


Sets the cell's left border color
void

set_merge ( )


This is an alias for the unintuitive set_align('merge')
void

set_num_format ( $num_format )


Sets the num format
void

set_pattern ( [$arg = 1] )


Sets the pattern attribute of a cell
void

set_right ( $style )


Sets the right border of the cell
void

set_right_color ( $color )


Sets the cell's right border color
void

set_size ( $size )


Sets the font size
void

set_text_wrap ( [$text_wrap = 1] )


Sets text wrapping
void

set_top ( $style )


Sets the top border of the cell
void

set_top_color ( $color )


Sets the cell's top border color
void

set_underline ( $underline )


Sets the underline of the text
integer

_get_color ( [$name_color = ''] )


Used in conjunction with the set_xxx_color methods to convert a color string into a number. Color range is 0..63 but we will restrict it to 8..63 to comply with Gnumeric. Colors 0..7 are repeated in 8..15.

Inherited Method Summary


Method Detail

Format (line 51)

void

constructor Format ( [$index = 0], [$properties = array()] )

Constructor
Function Info:
Access - public

[ Top ]


get_font (line 196)

string

get_font ( )

Generate an Excel BIFF FONT record.
Function Info:
Return - The FONT record
See - _store_all_fonts">Workbook::_store_all_fonts()

[ Top ]


get_font_key (line 241)

string

get_font_key ( )

Returns a unique hash key for a font. Used by Workbook->_store_all_fonts()

The elements that form the key are arranged to increase the probability of generating a unique key. Elements that hold a large range of numbers (eg. _color) are placed between two binary elements such as _italic

Function Info:
Return - A key for this font

[ Top ]


get_xf (line 112)

string

get_xf ( $style )

Generate an Excel BIFF XF record (style or cell).
Function Info:
Return - The XF record

[ Top ]


get_xf_index (line 257)

integer

get_xf_index ( )

Returns the index used by Worksheet->_XF()
Function Info:
Return - The index for the XF record

[ Top ]


set_align (line 328)

void

set_align ( $location )

Set cell alignment.
Function Info:
Access - public

[ Top ]


set_bg_color (line 552)

void

set_bg_color ( $color )

Sets the cell's background color
Function Info:
Access - public

[ Top ]


set_bold (line 384)

void

set_bold ( [$weight = 1] )

Bold has a range 0x64..0x3E8.

0x190 is normal. 0x2BC is bold.

Function Info:
Access - public

[ Top ]


set_border (line 457)

void

set_border ( $style )

Set cells borders to the same style
Function Info:
Access - public

[ Top ]


set_border_color (line 477)

void

set_border_color ( $color )

Sets all the cell's borders to the same color
Function Info:
Access - public

[ Top ]


set_bottom (line 412)

void

set_bottom ( $style )

Sets the bottom border of the cell
Function Info:
Access - public

[ Top ]


set_bottom_color (line 491)

void

set_bottom_color ( $color )

Sets the cell's bottom border color
Function Info:
Access - public

[ Top ]


set_color (line 564)

void

set_color ( $color )

Sets the cell's color
Function Info:
Access - public

[ Top ]


set_fg_color (line 540)

void

set_fg_color ( $color )

Sets the cell's foreground color
Function Info:
Access - public

[ Top ]


set_italic (line 598)

void

set_italic ( )

Sets the font style as italic
Function Info:
Access - public

[ Top ]


set_left (line 434)

void

set_left ( $style )

Sets the left border of the cell
Function Info:
Access - public

[ Top ]


set_left_color (line 515)

void

set_left_color ( $color )

Sets the cell's left border color
Function Info:
Access - public

[ Top ]


set_merge (line 371)

void

set_merge ( )

This is an alias for the unintuitive set_align('merge')
Function Info:
Access - public

[ Top ]


set_num_format (line 620)

void

set_num_format ( $num_format )

Sets the num format
Function Info:
Access - public

[ Top ]


set_pattern (line 576)

void

set_pattern ( [$arg = 1] )

Sets the pattern attribute of a cell
Function Info:
Access - public

[ Top ]


set_right (line 445)

void

set_right ( $style )

Sets the right border of the cell
Function Info:
Access - public

[ Top ]


set_right_color (line 527)

void

set_right_color ( $color )

Sets the cell's right border color
Function Info:
Access - public

[ Top ]


set_size (line 609)

void

set_size ( $size )

Sets the font size
Function Info:
Access - public

[ Top ]


set_text_wrap (line 632)

void

set_text_wrap ( [$text_wrap = 1] )

Sets text wrapping
Function Info:
Access - public

[ Top ]


set_top (line 423)

void

set_top ( $style )

Sets the top border of the cell
Function Info:
Access - public

[ Top ]


set_top_color (line 503)

void

set_top_color ( $color )

Sets the cell's top border color
Function Info:
Access - public

[ Top ]


set_underline (line 588)

void

set_underline ( $underline )

Sets the underline of the text
Function Info:
Access - public

[ Top ]


_get_color (line 270)

integer

_get_color ( [$name_color = ''] )

Used in conjunction with the set_xxx_color methods to convert a color string into a number. Color range is 0..63 but we will restrict it to 8..63 to comply with Gnumeric. Colors 0..7 are repeated in 8..15.
Function Info:
Return - The color index

[ Top ]



Variable Detail



Documention generated on Wed, 30 Apr 2003 11:14:30 -0400 by phpDocumentor 1.2.0