pyworkflow.gui.graph_layout module

class pyworkflow.gui.graph_layout.BasicLayout[source]

Bases: pyworkflow.gui.graph_layout.GraphLayout

This layout will keep node position as much as possible. It will try to allocate the nodes with x=0 and y=0.

draw(graph, **kwargs)[source]

Organize nodes of the graph in the plane. Nodes should have: x, y, width and height attributes x and y will be modified.

class pyworkflow.gui.graph_layout.GraphLayout[source]

Bases: object

Base class for all algorithm that implement functions to organize a graph in a plane.

draw(graph, **kwargs)[source]

Setup the nodes position in the plane.

class pyworkflow.gui.graph_layout.LevelTreeLayout[source]

Bases: pyworkflow.gui.graph_layout.GraphLayout

Organize the nodes of the graph by levels. It will recursively organize childs and then fit two sibling trees.

draw(graph, **kwargs)[source]

Organize nodes of the graph in the plane. Nodes should have: x, y, width and height attributes x and y will be modified.