Bridges-Python 3.5.0-dev1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Properties | List of all members
bridges.element_visualizer.ElementVisualizer Class Reference

This class is used to store the visualization elements on the for the bridges Visualization, including the color, shape, opacity, and size of the node. More...

Public Member Functions

 __init__ (self, color="green", shape="circle", size=10.0, opacity=1.0)
 ElementVisualizer constuctor.
 
 set_location (self, x, y)
 Setter for the location of the element.
 

Public Attributes

 prop
 

Protected Attributes

 _color
 
 _shape
 
 _size
 
 _opacity
 
 _locationX
 
 _locationY
 

Properties

 size = property
 Getter for the elements size.
 
 color = property
 Getter for the color of the element in the bridges visualization.
 
 shape = property
 Getter for the shape of the element.
 
 opacity = property
 Getter for the opacity of the element.
 
 location_x = property
 Getter for the X location of element.
 
 location_y = property
 Getter for the y location of the element.
 

Detailed Description

This class is used to store the visualization elements on the for the bridges Visualization, including the color, shape, opacity, and size of the node.

Supported named colors: CSS colors. Check

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

Thickness: Range : 0.0-50.0

Opacity: Range (0.0-1.0)

Supported Shapes: "circle", "square", "diamond", "cross", "triangle", "star", "wye".

Objects of this class are stored as properties of all Element subclasses. Generally, you will manipulating the ElementVisualizer returned from the Element getVisualizer() method, and then call the setVisualizer() method on the Element after changes have been made.

Author
Matthew Mcquaigue
Date
2018, 6/24/19

Constructor & Destructor Documentation

◆ __init__()

bridges.element_visualizer.ElementVisualizer.__init__ (   self,
  color = "green",
  shape = "circle",
  size = 10.0,
  opacity = 1.0 
)

ElementVisualizer constuctor.

       (str) color: color for this element
       (str) shape: the shape of the element
       (float) size: the element size
       (float) opacity: the element opacity
Returns
None

Member Function Documentation

◆ set_location()

bridges.element_visualizer.ElementVisualizer.set_location (   self,
  x,
  y 
)

Setter for the location of the element.

       (int) x: x location
       (int) y: y location
Returns
None

Member Data Documentation

◆ _color

bridges.element_visualizer.ElementVisualizer._color
protected

◆ _locationX

bridges.element_visualizer.ElementVisualizer._locationX
protected

◆ _locationY

bridges.element_visualizer.ElementVisualizer._locationY
protected

◆ _opacity

bridges.element_visualizer.ElementVisualizer._opacity
protected

◆ _shape

bridges.element_visualizer.ElementVisualizer._shape
protected

◆ _size

bridges.element_visualizer.ElementVisualizer._size
protected

◆ prop

bridges.element_visualizer.ElementVisualizer.prop

Property Documentation

◆ color

bridges.element_visualizer.ElementVisualizer.color = property
static

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

Returns
Color Color object representing the color of the element

◆ location_x

bridges.element_visualizer.ElementVisualizer.location_x = property
static

Getter for the X location of element.

Returns
int as the x location

◆ location_y

bridges.element_visualizer.ElementVisualizer.location_y = property
static

Getter for the y location of the element.

Returns
int as the y position

◆ opacity

bridges.element_visualizer.ElementVisualizer.opacity = property
static

Getter for the opacity of the element.

Returns
float representing the opacity

◆ shape

bridges.element_visualizer.ElementVisualizer.shape = property
static

Getter for the shape of the element.

Returns
str reperesenting the type of shape

◆ size

bridges.element_visualizer.ElementVisualizer.size = property
static

Getter for the elements size.

Returns
float the size

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