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

This class maintains the visual attributes of each BRIDGES element. More...

Public Member Functions

 ElementVisualizer ()
 
 ElementVisualizer (String aColor)
 
 ElementVisualizer (String aColor, String aShape)
 
 ElementVisualizer (double size)
 
 ElementVisualizer (String aColor, String aShape, float opacity, double size)
 
 ElementVisualizer (ElementVisualizer v)
 
void setSize (double sz)
 
double getSize ()
 
void setColor (String col_name) throws InvalidValueException
 
void setColor (Integer r, Integer g, Integer b, float a)
 
void setColor (Color c)
 
Color getColor ()
 
String getShape ()
 
void setShape (String aShape)
 
void setOpacity (float opacity)
 
float getOpacity ()
 
void setLocation (double x, double y)
 

Detailed Description

This class maintains the visual attributes of each BRIDGES element.

Visual properties include color, shape, opacity, size and location. Objects of this class are stored as part of the Element class. Generally, a user will manipulate the ElementVisualizer returned from the Element's getVisualizer() method, and then set attributes using its methods. Supported attributed 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

Supported Shapes:

"circle", "square", "diamond", "cross", "triangle", "star", "wye"

Shape Size : Range (0-50)

Opacity: Range (0.0-1.0)

Author
Mihai Mehedint, Kalpathi Subramanian
Date
6/22/16, 1/7/17, 5/17/17
See also
Example Tutorial at
http://bridgesuncc.github.io/Hello_World_Tutorials/SLL.html

Constructor & Destructor Documentation

bridges.base.ElementVisualizer.ElementVisualizer ( )

Construct an ElementVisualizer with the default visualization settings.

The default settings are color = green, opacity = 1.0, size = 10.0, shape = circle.

bridges.base.ElementVisualizer.ElementVisualizer ( String  aColor)

Construct an ElementVisualizer with its color set to "aColor".

Parameters
aColorthe string that represents one of the Bridges colors.
bridges.base.ElementVisualizer.ElementVisualizer ( String  aColor,
String  aShape 
)

Construct an ElementVisualizer with its color set to "aColor" and shape set to "aShape".

Parameters
aColorthe string that represents one of the Bridges colors.
aShapethe string that represents one of the Bridges shapes
bridges.base.ElementVisualizer.ElementVisualizer ( double  size)

Construct an ElementVisualizer with its size set to "size".

Parameters
sizethe value that represents the size in pixels of the Bridges Element
bridges.base.ElementVisualizer.ElementVisualizer ( String  aColor,
String  aShape,
float  opacity,
double  size 
)

Construct an ElementVisualizer with its color set to "aColor", its shape set to "aShape", its opacity set to "opacity" and size set to "size".

Parameters
aColorthe string that represents one of the Bridges colors.
aShapethe string that represents one of the Bridges shapes
opacitya double between 0 and 1 representing how transparent the node should be on the Bridges Visualization. 0 for invisible, 1 for fully visible, 0-1 for varying transparency.
sizethe double that represents the size of the Element on the Bridges Visualization
bridges.base.ElementVisualizer.ElementVisualizer ( ElementVisualizer  v)

Construct a new ElementVisualizer with the same color, shape, opacity, and size as "v"

Parameters
vthe ElementVisualizer whose settings you want to copy.

Member Function Documentation

Color bridges.base.ElementVisualizer.getColor ( )

Get the color of the Element in the Bridges Visualization

Returns
Color object representing the color of the Element as R,G,B,A components, each in the range 0-255
float bridges.base.ElementVisualizer.getOpacity ( )

Get the opacity of the Element in the Bridges Visualization

Returns
the opacity value
String bridges.base.ElementVisualizer.getShape ( )

Get the shape of the Element in the Bridges Visualization.

Returns
the string that represents the Element's shape in the Bridges Visualization.
double bridges.base.ElementVisualizer.getSize ( )

Get the size of the Element in the Bridges Visualiation

Returns
the size in pixels of the Element in the Bridges Visualization
void bridges.base.ElementVisualizer.setColor ( String  col_name) throws InvalidValueException

Set the color of the Element 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.ElementVisualizer.setColor ( Integer  r,
Integer  g,
Integer  b,
float  a 
)

Set the color of the Element in the Bridges Visualization given RGBA components (0-255 range)

Parameters
r,g,b,acolor components
void bridges.base.ElementVisualizer.setColor ( Color  c)

Set the color of the Element in the Bridges Visualization to "aColor". given a Color object

Parameters
colColor object
void bridges.base.ElementVisualizer.setLocation ( double  x,
double  y 
)

Set the location (x, y) of the element - used for displaying elements in maps

Parameters
locationthe X,Y location(array of 2 doubles) to be set
void bridges.base.ElementVisualizer.setOpacity ( float  opacity)

Sets the opacity of the Element in the Bridges Visualization

Parameters
opacitya double 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.ElementVisualizer.setShape ( String  aShape)

Sets the shape of the Element in the Bridges Visualization. Supported shapes include "star", "circle", "square", "diamond", "cross", "triangle", "wye".

Parameters
aShapethe string representing the shape of the Element in the Bridges Visualization
void bridges.base.ElementVisualizer.setSize ( double  sz)

Set the size of the Element in the Bridge Visualization (in pixel units)

Parameters
sizethe pixel size of the Element in the Bridges Visualization

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