Package epydoc :: Package docwriter :: Module dotgraph :: Class DotGraphUmlModuleNode
[hide private]
[frames] | no frames]

Class DotGraphUmlModuleNode
source code


A specialized dot grah node used to display ModuleDocs using UML notation. Simple module nodes look like:

.----.
+------------+
| modulename |
+------------+

Packages nodes are drawn with their modules & subpackages nested inside:

.----.
+----------------------------------------+
| packagename                            |
|                                        |
|  .----.       .----.       .----.      |
|  +---------+  +---------+  +---------+ |
|  | module1 |  | module2 |  | module3 | |
|  +---------+  +---------+  +---------+ |
|                                        |
+----------------------------------------+


Instance Methods [hide private]
  __init__(self, module_doc, linker, context, collapsed=False, excluded_submodules=(), **options)
  _get_html_label(self, package)
  _color(self, package, depth)
  to_dotfile(self)
Return the dot commands that should be used to render this node.

Inherited from DotGraphNode: __getitem__, __setitem__


Class Variables [hide private]
_MODULE_LABEL Expects: (color, color, url, tooltip, body)
_NESTED_BODY Expects: (name, body_rows)
_NESTED_BODY_ROW Expects: (cells,)
_COLOR_DIFF  

Inherited from DotGraphNode (private): _next_id


Method Details [hide private]

__init__(self, module_doc, linker, context, collapsed=False, excluded_submodules=(), **options)
(Constructor)

source code 
Overrides: DotGraphNode.__init__

_get_html_label(self, package)

source code 
Returns:

(label, depth, width) where:

  • label is the HTML label

  • depth is the depth of the package tree (for coloring)

  • width is the max width of the HTML label, roughly in

    units of characters.

_color(self, package, depth)

source code 

to_dotfile(self)

source code 
Return the dot commands that should be used to render this node.
Overrides: DotGraphNode.to_dotfile
(inherited documentation)

Class Variable Details [hide private]

_MODULE_LABEL

Expects: (color, color, url, tooltip, body)
Value:
''' 
    <TABLE BORDER="0" CELLBORDER="0" CELLSPACING="0" ALIGN="LEFT">
    <TR><TD ALIGN="LEFT" VALIGN="BOTTOM" HEIGHT="8" WIDTH="16"
            FIXEDSIZE="true" BGCOLOR="%s" BORDER="1" PORT="tab"></TD><\
/TR>
    <TR><TD ALIGN="LEFT" VALIGN="TOP" BGCOLOR="%s" BORDER="1" WIDTH="2\
0"
            PORT="body" HREF="%s" TOOLTIP="%s">%s</TD></TR>
...                                                                    
      

_NESTED_BODY

Expects: (name, body_rows)
Value:
'''
    <TABLE BORDER="0" CELLBORDER="0" CELLPADDING="0" CELLSPACING="0">
    <TR><TD ALIGN="LEFT">%s</TD></TR>
    %s
    </TABLE>'''                                                        
      

_NESTED_BODY_ROW

Expects: (cells,)
Value:
'''
    <TR><TD>
      <TABLE BORDER="0" CELLBORDER="0"><TR>%s</TR></TABLE>
    </TD></TR>'''                                                      
      

_COLOR_DIFF

Value:
24