Bridges-Python  3.4.3
Bridges(Python API)
Public Member Functions | Public Attributes | List of all members
bridges.link_visualizer.LinkVisualizer Class Reference

Detailed Description

This class maintains the visual attributes of links that join bridges elements.

Visual properties include color, thickness, and opacity. Objects of this class are stored as part of the Element class. Generally, a user will manipulate the LinkVisualizer returned from the Element's getLinkVisualizer(Element it) method (which it is the bridges element this element is linked to), and then set attributes using its methods. Links are utilized in all types of linked lists, tree and graph structures.

Supported attribute values are as follows:

Supported Colors by name: CSS colors; see the Color class for full list, or at https

Color by RGBA Specification : Range: 0-255 for each component

Thickness: Range : 0.0-50.0

Opacity: Range (0.0-1.0)

Author
Mihai Mehedint, Kalpathi Subramanian, Matthew McQuaigue
Date
2018, 6/24/19
See also
Example Tutorial at
https://bridgesuncc.github.io/tutorials/SinglyLinkedList.html

Public Member Functions

None __init__ (self)
 Constructor for the link visualizer'. More...
 
float thickness (self)
 Getter for the thickness of links visualization. More...
 
def thickness (self, th)
 Setter for the thickness of links in visualization. More...
 
Color color (self)
 Getter for the color of the link in the visualization. More...
 
def color (self, *args, **kwargs)
 Setter for the color of the element in the bridges visualization. More...
 
def opacity (self)
 Getter for the element opacity. More...
 
def opacity (self, opacity)
 Setter for the elementopacity. More...
 
def label (self)
 
def label (self, l)
 
def get_link_properties (self)
 Getter for the link properties. More...
 
def get_label (self)
 Getter for the link label. More...
 
def set_label (self, label)
 Setter for the element label. More...
 

Public Attributes

 label
 

Constructor & Destructor Documentation

◆ __init__()

None bridges.link_visualizer.LinkVisualizer.__init__ (   self)

Constructor for the link visualizer'.

Retruns
None

Member Function Documentation

◆ color() [1/2]

Color bridges.link_visualizer.LinkVisualizer.color (   self)

Getter for the color of the link in the visualization.

Returns
Color

◆ color() [2/2]

def bridges.link_visualizer.LinkVisualizer.color (   self,
args,
**  kwargs 
)

Setter for the color of the element in the bridges visualization.

       (optional) list: requires either 3 ints 0-255 for RGB and an optional
       float 0.0-1.0 for alpha EX: color = [0, 255, 0, 1.0].
       (optional) str: string representing the element color. Supported web colors:
       https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
Returns
None
Exceptions
ValueErrorif the color name provided is not available

◆ get_label()

def bridges.link_visualizer.LinkVisualizer.get_label (   self)

Getter for the link label.

Returns
string link label

◆ get_link_properties()

def bridges.link_visualizer.LinkVisualizer.get_link_properties (   self)

Getter for the link properties.

Returns
dict link properties

◆ label() [1/2]

def bridges.link_visualizer.LinkVisualizer.label (   self)

◆ label() [2/2]

def bridges.link_visualizer.LinkVisualizer.label (   self,
  l 
)

◆ opacity() [1/2]

def bridges.link_visualizer.LinkVisualizer.opacity (   self)

Getter for the element opacity.

Returns
opacity element opacity

◆ opacity() [2/2]

def bridges.link_visualizer.LinkVisualizer.opacity (   self,
  opacity 
)

Setter for the elementopacity.

Parameters
opacityopacity value (0-1.0) to set
Returns
None

◆ set_label()

def bridges.link_visualizer.LinkVisualizer.set_label (   self,
  label 
)

Setter for the element label.

Parameters
labellink label (string)
Returns
None

◆ thickness() [1/2]

float bridges.link_visualizer.LinkVisualizer.thickness (   self)

Getter for the thickness of links visualization.

Returns
float the thickness

◆ thickness() [2/2]

def bridges.link_visualizer.LinkVisualizer.thickness (   self,
  th 
)

Setter for the thickness of links in visualization.

       (float) th: the thickness to be applied to the link
Returns
None

Member Data Documentation

◆ label

bridges.link_visualizer.LinkVisualizer.label

The documentation for this class was generated from the following file: