Package nltk_lite :: Package contrib :: Package fst :: Module draw_graph :: Class GraphEdgeWidget
[hide private]
[frames] | no frames]

Class GraphEdgeWidget

source code

       object --+    
                |    
draw.CanvasWidget --+
                    |
                   GraphEdgeWidget

A canvas widget used to display graph edges.


To Do: Add an 'arrow' attribute, which can be used to control the direction and/or shape of the arrow.

Instance Methods [hide private]
 
__init__(self, canvas, x1, y1, x2, y2, label=None, **attribs)
Create a new canvas widget.
source code
None
__setitem__(self, attr, value)
Set the value of the attribute attr to value.
source code
(any)
__getitem__(self, attr)
Returns: the value of the attribute attr.
source code
list of int
_tags(self)
Returns: a list of canvas tags for all graphical elements managed by this canvas widget, not including graphical elements managed by its child widgets.
source code
string
__repr__(self)
Returns: a string representation of this canvas widget.
source code
 
start(self) source code
 
end(self) source code
 
set_start(self, x, y) source code
 
set_end(self, x, y) source code
None
_update(self, child)
Update this canvas widget in response to a change in one of its children.
source code
None
_manage(self)
Arrange the child widgets of this canvas widget.
source code
 
_label_coords(self) source code
 
_line_coords(self, (startx, starty), (endx, endy)) source code

Inherited from draw.CanvasWidget: bbox, bind_click, bind_drag, canvas, child_widgets, destroy, height, hidden, hide, manage, move, moveto, parent, show, tags, unbind_click, unbind_drag, update, width

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, canvas, x1, y1, x2, y2, label=None, **attribs)
(Constructor)

source code 

Create a new canvas widget. This constructor should only be called by subclass constructors; and it should be called only after the subclass has constructed all graphical canvas objects and registered all child widgets.

Overrides: draw.CanvasWidget.__init__
(inherited documentation)

__setitem__(self, attr, value)
(Index assignment operator)

source code 

Set the value of the attribute attr to value. See the class documentation for a list of attributes supported by this canvas widget.

Returns: None
Overrides: draw.CanvasWidget.__setitem__
(inherited documentation)

__getitem__(self, attr)
(Indexing operator)

source code 
Returns: (any)
the value of the attribute attr. See the class documentation for a list of attributes supported by this canvas widget.
Overrides: draw.CanvasWidget.__getitem__
(inherited documentation)

_tags(self)

source code 
Returns: list of int
a list of canvas tags for all graphical elements managed by this canvas widget, not including graphical elements managed by its child widgets.
Overrides: draw.CanvasWidget._tags
(inherited documentation)

__repr__(self)
(Representation operator)

source code 
Returns: string
a string representation of this canvas widget.
Overrides: draw.CanvasWidget.__repr__
(inherited documentation)

_update(self, child)

source code 

Update this canvas widget in response to a change in one of its children.

Returns: None
Overrides: draw.CanvasWidget._update
(inherited documentation)

_manage(self)

source code 

Arrange the child widgets of this canvas widget. This method is called when the canvas widget is initially created. It is also called if the user calls the manage method on this canvas widget or any of its ancestors.

Returns: None
Overrides: draw.CanvasWidget._manage
(inherited documentation)