Bridges-Java  3.4.3
Bridges(Java API)
Public Member Functions | Package Attributes | List of all members
bridges.base.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.getLinkVisualizer() 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:

Color: Use color with setColor() and getColor(). :by name: See the Color class for the complete list. by RGBA Specification: Range: 0-255 for each component.

Thickness: Range : 0.0-50.0. Use thickness with setThickness() and getThickness().

Opacity: Range (0.0-1.0). use opacity with setOpacity(), getOpacity().

Author
Mihai Mehedint, Kalpathi Subramanian
Date
6/22/16, 1/16/17, 5/17/17, 7/12/19
See also
Example Tutorial at
https://bridgesuncc.github.io/tutorials/SinglyLinkedList.html

Public Member Functions

 LinkVisualizer ()
 
String getLabel ()
 
void setLabel (String label)
 
void setThickness (double th)
 Set the thickness of the link in the Bridge Visualization. More...
 
double getThickness ()
 
void setColor (String col_name)
 
void setColor (Color color)
 
void setColor (Integer r, Integer g, Integer b, Float a) throws InvalidValueException
 
Color getColor ()
 
void setOpacity (float opacity)
 Sets the opacity of the link in the Bridges Visualization. More...
 
float getOpacity ()
 Get the opacity of the link in the Bridges Visualization. More...
 
String getLinkProperties ()
 
String getLinkRepresentation (String src, String dest)
 

Package Attributes

String COMMA = ","
 
String COLON = ":"
 
String OPEN_CURLY = "{"
 
String CLOSE_CURLY = "}"
 
String OPEN_PAREN = "("
 
String CLOSE_PAREN = ")"
 
String OPEN_BOX = "["
 
String CLOSE_BOX = "]"
 

Constructor & Destructor Documentation

◆ LinkVisualizer()

bridges.base.LinkVisualizer.LinkVisualizer ( )

Member Function Documentation

◆ getColor()

Color bridges.base.LinkVisualizer.getColor ( )

Get the color of the link in the Bridges Visualization

Returns
the Color object representing the color of the link

◆ getLabel()

String bridges.base.LinkVisualizer.getLabel ( )

This method returns the existing value of the label fields

Returns
the label of the Element; the label is typically displayed on BRIDGES visualizations.

◆ getLinkProperties()

String bridges.base.LinkVisualizer.getLinkProperties ( )

Get link properties - used for building JSON representation

◆ getLinkRepresentation()

String bridges.base.LinkVisualizer.getLinkRepresentation ( String  src,
String  dest 
)

Get the link visualizer representation, iterating through the link properties

Parameters
srcsource node name
destdestination node name

◆ getOpacity()

float bridges.base.LinkVisualizer.getOpacity ( )

Get the opacity of the link in the Bridges Visualization.

Returns
the opacity value in [0.0-1.0]. 0 is fully transparent, 1 for fully opaque.

◆ getThickness()

double bridges.base.LinkVisualizer.getThickness ( )

Get the thickness of the link in the Bridges Visualiation

Returns
the size in pixels of the link

◆ setColor() [1/3]

void bridges.base.LinkVisualizer.setColor ( Color  color)

Set the color of the link from an existing Color object

Parameters
colorBridges Color object

◆ setColor() [2/3]

void bridges.base.LinkVisualizer.setColor ( Integer  r,
Integer  g,
Integer  b,
Float  a 
) throws InvalidValueException

Set the color of the link given RGBA components; 0-255 range for R, G, B and 0-1.0 for opacity

Parameters
rred component
ggreen component
bblue component
aalpha (opacity) component

◆ setColor() [3/3]

void bridges.base.LinkVisualizer.setColor ( String  col_name)

Set the color of the link in the Bridges Visualization to "aColor". See the Color clas for a complete list of supported color names.

Parameters
col_namethe string reprsenting the color of the link.

◆ setLabel()

void bridges.base.LinkVisualizer.setLabel ( String  label)

This method sets the label

Parameters
labelthe link label to set

◆ setOpacity()

void bridges.base.LinkVisualizer.setOpacity ( float  opacity)

Sets the opacity of the link in the Bridges Visualization.

Parameters
opacitya float in [0-1.0]. 0 is fully transparent, 1 for fully opaque.

◆ setThickness()

void bridges.base.LinkVisualizer.setThickness ( double  th)

Set the thickness of the link in the Bridge Visualization.

Parameters
ththickness of the link in pixels; thickness should be in [0-50.0].

Member Data Documentation

◆ CLOSE_BOX

String bridges.base.LinkVisualizer.CLOSE_BOX = "]"
package

◆ CLOSE_CURLY

String bridges.base.LinkVisualizer.CLOSE_CURLY = "}"
package

◆ CLOSE_PAREN

String bridges.base.LinkVisualizer.CLOSE_PAREN = ")"
package

◆ COLON

String bridges.base.LinkVisualizer.COLON = ":"
package

◆ COMMA

String bridges.base.LinkVisualizer.COMMA = ","
package

◆ OPEN_BOX

String bridges.base.LinkVisualizer.OPEN_BOX = "["
package

◆ OPEN_CURLY

String bridges.base.LinkVisualizer.OPEN_CURLY = "{"
package

◆ OPEN_PAREN

String bridges.base.LinkVisualizer.OPEN_PAREN = "("
package

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