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

type 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) source code
call graph 
 
_get_html_label(self, package)
Returns: (label, depth, width) where:
source code
call graph 
 
_color(self, package, depth) source code
call graph 
 
to_dotfile(self)
Return the dot commands that should be used to render this node.
source code
call graph 

Inherited from DotGraphNode: __getitem__, __setitem__

Class Variables [hide private]
  _MODULE_LABEL = ' \n <TABLE BORDER="0" CELLBORDER="0" CELLS...
Expects: (color, color, url, tooltip, body)
  _NESTED_BODY = '\n <TABLE BORDER="0" CELLBORDER="0" CELLPAD...
Expects: (name, body_rows)
  _NESTED_BODY_ROW = '\n <TR><TD>\n <TABLE BORDER="0" CE...
Expects: (cells,)
  _COLOR_DIFF = 24

Inherited from DotGraphNode (private): _next_id

Method Details [hide private]

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

source code 
call graph 
Overrides: DotGraphNode.__init__

_get_html_label(self, package)

source code 
call graph 
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.

to_dotfile(self)

source code 
call graph 
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>'''