Bridges-Python-3.0.2  3.0.2
Bridges(PythonAPI)
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://drafts.csswg.org/css-color-3/#svg-color:

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
http://bridgesuncc.github.io/Hello_World_Tutorials/SLL.html

Public Member Functions

def __init__ (self)
 Constructor for the link visualizer'. More...
 
def thickness (self)
 Getter for the thickness of links visualization. More...
 
def thickness (self, th)
 Setter for the thickness of links in visualization. More...
 
def 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__()

def bridges.link_visualizer.LinkVisualizer.__init__ (   self,
  None 
)

Constructor for the link visualizer'.

Retruns
None

Member Function Documentation

◆ color() [1/2]

def bridges.link_visualizer.LinkVisualizer.color (   self,
  Color 
)

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
stringlink label
Returns
None

◆ thickness() [1/2]

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

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: