Bridges-Java-2.3.3
2.3.3
Bridges(JavaAPI)
|
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 () |
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)
bridges.base.LinkVisualizer.LinkVisualizer | ( | ) |
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
label | the input label string |
Color bridges.base.LinkVisualizer.getColor | ( | ) |
Get the color of the link in the Bridges Visualization
String bridges.base.LinkVisualizer.getLabel | ( | ) |
This method returns the existing value of the label fields
String bridges.base.LinkVisualizer.getLinkProperties | ( | ) |
float bridges.base.LinkVisualizer.getOpacity | ( | ) |
Get the opacity of the link in the Bridges Visualization
double bridges.base.LinkVisualizer.getThickness | ( | ) |
Get the thickness of the link in the Bridges Visualiation
double bridges.base.LinkVisualizer.getWeight | ( | ) |
Get the weight of the link
void bridges.base.LinkVisualizer.setColor | ( | String | col_name | ) |
Set the color of the link in the Bridges Visualization to "aColor".
col_name | the 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
r,g,b,a | components |
check to ensure they are in 0-255 range, else throw exception
void bridges.base.LinkVisualizer.setLabel | ( | String | label | ) |
This method sets the label
label | the link label to set |
void bridges.base.LinkVisualizer.setOpacity | ( | float | opacity | ) |
Sets the opacity of the link in the Bridges Visualization
opacity | a 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
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.
weight |