Module gml :: Class gml_cluster
[show private | hide private]
[frames | no frames]

Class gml_cluster


Clusters contain a number of attributes that describe the size, color, label, nodes etc. of the displayable groups nodes. Relevant getters and setters exist for manipulating cluster attributes. The render() routine should be used for returning a cluster description suitable for inclusion in a GML file.
Method Summary
  __init__(self)
Set the default attributes for the newly created cluster.
  __module_test__(self)
Run a few basic tests to ensure the class is working.
  add_vertex(self, node_id)
Add a node ID as a vertex in the cluster, ignores duplicates.
  del_vertex(self, node_id)
Delete a node ID as a vertex from the cluster.
HTML RGB string (ex: #CCFFCC) get_g_fill(self)
Get the fill color of the cluster from the graphics sub-header.
Integer get_g_height(self)
Get the height of the cluster from the graphics sub-header.
HTML RGB string (ex: #CCFFCC) get_g_line_fill(self)
Get the fill color of the border line from the graphics sub-header.
Float get_g_line_width(self)
Get the width of the border line for the cluster from the graphics sub-header.
Integer get_g_pattern(self)
Get the pattern value for the cluster from the graphics sub-header.
Integer get_g_stipple(self)
Get the stipple value for the cluster from the graphics sub-header.
String get_g_style(self)
Get the style for the cluster from the graphics sub-header.
Integer get_g_width(self)
Get the width of the cluster from the graphics sub-header.
Integer get_g_x(self)
Get the x coordinate of the top left corner of the cluster in the graphics sub-header.
Integer get_g_y(self)
Get the y coordinate of the top left corner of the cluster in the graphics sub-header.
Integer get_id(self)
Get the identifier for the cluster.
String get_label(self)
Get the label (if any) of the cluster.
List get_vertices(self)
Return the list of vertices in the cluster.
String render(self)
Render a cluster description suitable for use in a GML file using the set internal attributes.
  set_g_fill(self, color)
Set the fill color of the cluster in the graphics sub-header.
  set_g_height(self, pixels)
Set the height of the cluster in the graphics sub-header.
  set_g_line_fill(self, color)
Set the fill color of the border line in the graphics sub-header.
  set_g_line_width(self, pixels)
Set the width of the border line for the cluster in the graphics sub-header.
  set_g_pattern(self, pattern)
Set the pattern type for the cluster in the graphics sub-header.
  set_g_stipple(self, stipple)
Set the stipple type for the cluster in the graphics sub-header.
  set_g_style(self, style)
Set the style for the cluster from the graphics sub-header.
  set_g_width(self, pixels)
Set the width of the cluster in the graphics sub-header.
  set_g_x(self, x)
Set the x coordinate of the top left corner of the cluster in the graphics sub-header.
  set_g_y(self, y)
Set the y coordinate of the top left corner of the cluster in the graphics sub-header.
  set_id(self, id)
Set the identifier for the cluster.
  set_label(self, label)
Set the label of this cluster.

Method Details

__init__(self)
(Constructor)

Set the default attributes for the newly created cluster. See the source if you want to modify the default creation values.

__module_test__(self)

Run a few basic tests to ensure the class is working.

add_vertex(self, node_id)

Add a node ID as a vertex in the cluster, ignores duplicates.
Parameters:
node_id - Node identifier to add
           (type=Integer)

del_vertex(self, node_id)

Delete a node ID as a vertex from the cluster.
Parameters:
node_id - Node identifier
           (type=Integer)

get_g_fill(self)

Get the fill color of the cluster from the graphics sub-header.
Returns:
Color
           (type=HTML RGB string (ex: #CCFFCC))

get_g_height(self)

Get the height of the cluster from the graphics sub-header.
Returns:
Cluster height in pixels
           (type=Integer)

get_g_line_fill(self)

Get the fill color of the border line from the graphics sub-header.
Returns:
Color
           (type=HTML RGB string (ex: #CCFFCC))

get_g_line_width(self)

Get the width of the border line for the cluster from the graphics sub-header.
Returns:
Line width in pixels
           (type=Float)

get_g_pattern(self)

Get the pattern value for the cluster from the graphics sub-header.
Returns:
Pattern value
           (type=Integer)

get_g_stipple(self)

Get the stipple value for the cluster from the graphics sub-header.
Returns:
Stipple value
           (type=Integer)

get_g_style(self)

Get the style for the cluster from the graphics sub-header. For the purposes of Process Stalker this value will always be "rectangle".
Returns:
Style
           (type=String)

get_g_width(self)

Get the width of the cluster from the graphics sub-header.
Returns:
Line width in pixels
           (type=Integer)

get_g_x(self)

Get the x coordinate of the top left corner of the cluster in the graphics sub-header.
Returns:
X-Coordinate in pixels
           (type=Integer)

get_g_y(self)

Get the y coordinate of the top left corner of the cluster in the graphics sub-header.
Returns:
Y-Coordinate in pixels
           (type=Integer)

get_id(self)

Get the identifier for the cluster.
Returns:
Identifier
           (type=Integer)

get_label(self)

Get the label (if any) of the cluster.
Returns:
Cluster label
           (type=String)

get_vertices(self)

Return the list of vertices in the cluster.
Returns:
Sorted list of vertices
           (type=List)

render(self)

Render a cluster description suitable for use in a GML file using the set internal attributes.
Returns:
GML cluster description
           (type=String)

set_g_fill(self, color)

Set the fill color of the cluster in the graphics sub-header.
Parameters:
color - Color
           (type=HTML RGB string (ex: #CCFFCC))

set_g_height(self, pixels)

Set the height of the cluster in the graphics sub-header.
Parameters:
pixels - Cluster height in pixels
           (type=Integer)

set_g_line_fill(self, color)

Set the fill color of the border line in the graphics sub-header.
Parameters:
color - Color
           (type=HTML RGB string (ex: #CCFFCC))

set_g_line_width(self, pixels)

Set the width of the border line for the cluster in the graphics sub-header.
Parameters:
pixels - Line width in pixels
           (type=Float)

set_g_pattern(self, pattern)

Set the pattern type for the cluster in the graphics sub-header.
Parameters:
pattern - Pattern value
           (type=Integer)

set_g_stipple(self, stipple)

Set the stipple type for the cluster in the graphics sub-header.
Parameters:
stipple - Stipple value
           (type=Integer)

set_g_style(self, style)

Set the style for the cluster from the graphics sub-header. For the purposes of Process Stalker this value will always be "rectangle".
Parameters:
style - Style
           (type=String)

set_g_width(self, pixels)

Set the width of the cluster in the graphics sub-header.
Parameters:
pixels - Cluster width in pixels
           (type=Integer)

set_g_x(self, x)

Set the x coordinate of the top left corner of the cluster in the graphics sub-header.
Parameters:
x - X-Coordinate in pixels
           (type=Integer)

set_g_y(self, y)

Set the y coordinate of the top left corner of the cluster in the graphics sub-header.
Parameters:
y - Y-Coordinate in pixels
           (type=Integer)

set_id(self, id)

Set the identifier for the cluster.
Parameters:
id - Identifier
           (type=Integer)

set_label(self, label)

Set the label of this cluster.
Parameters:
label - Cluster label
           (type=String)

Generated by Epydoc 2.1 on Tue Jul 05 12:05:31 2005 http://epydoc.sf.net