Bridges-Java-2.3.3  2.3.3
Bridges(JavaAPI)
Public Member Functions | List of all members
bridges.base.LinkVisualizer Class Reference

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

Public Member Functions

 LinkVisualizer ()
 
String getLabel ()
 
void setLabel (String label)
 
String arrangeLabel (String label)
 
void setThickness (double th)
 
double getThickness ()
 
void setWeight (double wt)
 
double getWeight ()
 
void setColor (String col_name)
 
void setColor (Integer r, Integer g, Integer b, Float a) throws InvalidValueException
 
Color getColor ()
 
void setOpacity (float opacity)
 
float getOpacity ()
 
String getLinkProperties ()
 

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):

"red", "green", "blue","yellow","cyan","magenta", "white",, "black", "orange", "turquoise", "maroon",
"aquamarine", "azure", "beige", "brown", "tan", "olive", "chartreuse", "khaki", "bisque", "coral",
"pink", "lavender", "purple", "gold"

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
Date
6/22/16, 1/16/17, 5/17/17
See also
Example Tutorial at
http://bridgesuncc.github.io/Hello_World_Tutorials/SLL.html

Constructor & Destructor Documentation

bridges.base.LinkVisualizer.LinkVisualizer ( )

Member Function Documentation

String bridges.base.LinkVisualizer.arrangeLabel ( String  label)

This method formats the label string using a predefine pattern (DIVIDE_KEY) and replaces the pattern with the string characters hold by the INSERT_STRING global variable

Parameters
labelthe input label string
Returns
the formatted label
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
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.
String bridges.base.LinkVisualizer.getLinkProperties ( )
float bridges.base.LinkVisualizer.getOpacity ( )

Get the opacity of the link in the Bridges Visualization

Returns
the opacity value (in the range 0.0-1.0
double bridges.base.LinkVisualizer.getThickness ( )

Get the thickness of the link in the Bridges Visualiation

Returns
the size in pixels of the Element in the Bridges Visualization
double bridges.base.LinkVisualizer.getWeight ( )

Get the weight of the link

Returns
the stored edge weight
void bridges.base.LinkVisualizer.setColor ( String  col_name)

Set the color of the link in the Bridges Visualization to "aColor".

Parameters
col_namethe string reprsenting the color of the Element in the Bridges Visualization; supported named colors are "red", "green", "blue", "yellow", "cyan", "magenta", "white", "black", "orange", "turquoise", "maroon", "aquamarine", "azure", "beige", "brown", "tan", "olive", "chartreuse", "khaki", "bisque", "coral", "pink", "lavender", "purple", "gold"
void bridges.base.LinkVisualizer.setColor ( Integer  r,
Integer  g,
Integer  b,
Float  a 
) throws InvalidValueException

Set the color of the link given RGBA components

Parameters
r,g,b,acomponents

check to ensure they are in 0-255 range, else throw exception

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

This method sets the label

Parameters
labelthe link label to set
void bridges.base.LinkVisualizer.setOpacity ( float  opacity)

Sets the opacity of the link in the Bridges Visualization

Parameters
opacitya float between 0 and 1 representing how transparent the node should be on the Bridges Visualization. 0 for invisible, 1 for fully visible, a decimal between 0 and 1 for varying transparency.
void bridges.base.LinkVisualizer.setThickness ( double  th)

Set the thickness of the link in the Bridge Visualization in pixels; thickness shoudl be in the range 0-50.0

Parameters
thickness
void bridges.base.LinkVisualizer.setWeight ( double  wt)

Set the weight of the link, useful in graph algorithms, for example. weight value is user defined, and determined by the input graph specification.

Parameters
weight

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