AGW Logo

agw_title XLSBorderFactory

This is a factory class which holds information about all the borders in a cell. Its implementation and use is merely to simplify the handling of the different cell borders (left, top, bottom, right, diagonal).

hierarchy Inheritance Diagram

Inheritance diagram for: XLSBorderFactory

Inheritance diagram of XLSBorderFactory


method_summary Methods Summary

__init__Default class constructor.
DrawActually draws all the cell borders based on their drawing priority.

API Class API

class XLSBorderFactory(object)[source]

This is a factory class which holds information about all the borders in a cell. Its implementation and use is merely to simplify the handling of the different cell borders (left, top, bottom, right, diagonal).



__init__(book, border, default_colour)[source]

Default class constructor.

Parameters:
  • book – an instance of the xlrd.Book class;
  • border – an instance of xlrd.formatting.XFBorder class;
  • default_colour – the “magic” colour used by Excel to draw non-custom border lines.


Draw(dc, rect)[source]

Actually draws all the cell borders based on their drawing priority.

Parameters:
  • dc – an instance of wx.DC;
  • rect – an instance of wx.Rect, representing the cell rectangle.

Note

The drawing priority is assigned depending on if the border is a custom one or not. Customized borders are drawn last.

Tree

Table Of Contents

Previous topic

XLSBorder

Next topic

XLSCell