Bridges-Java
3.4.3
Bridges(Java API)
|
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 (rather than creating this object directly), and then set attributes using its methods. Supported attributed values are as follows:
Color: Supported colors by name using setColor(): See the Color class for the complete list; colors are set by by RGBA Specification, 0-255 for each component, or using color names.
Supported Shapes: "circle", "square", "diamond", "cross", "triangle", "star", "wye". set it with setShape() and getShape().
Shape Size : Range [0-50]. Set it with setSize() and getSize().
Opacity: Range [0.0 - 1.0]. Use it with setOpacity(), getOpacity().
Location: Use it with setLocation(), getLocationX(), and getLocationY().
Public Member Functions | |
ElementVisualizer () | |
ElementVisualizer (String aColor) | |
ElementVisualizer (String aColor, String aShape) | |
ElementVisualizer (double size) | |
ElementVisualizer (String aColor, String aShape, float opacity, double size) | |
Construct an ElementVisualizer with given color, shape, opacity, and size. More... | |
ElementVisualizer (ElementVisualizer v) | |
void | setSize (double sz) |
double | getSize () |
void | setColor (String col_name) throws InvalidValueException |
Set the color of the Element in the Bridges Visualization. More... | |
void | setColor (Integer r, Integer g, Integer b, float a) |
Set the color of the Element in the Bridges Visualization given RGBA components. More... | |
void | setColor (Color c) |
Set the color of the Element in the Bridges Visualization. More... | |
Color | getColor () |
String | getShape () |
void | setShape (String aShape) |
void | setOpacity (float opacity) |
float | getOpacity () |
Get the opacity of the Element in the Bridges Visualization. More... | |
void | setLocation (double x, double y) |
Set the location (x, y) of the element. More... | |
double | getLocationX () |
Get the X coordinate position of the element. More... | |
double | getLocationY () |
Get the Y coordinate position of the element. More... | |
Package Attributes | |
String | key = "" |
double | locationY = Double.POSITIVE_INFINITY |
double | size = 10.0 |
bridges.base.ElementVisualizer.ElementVisualizer | ( | ) |
Construct an ElementVisualizer with the default visualization settings.
The default settings are color = [70, 130, 180, 1.0], opacity = 1.0, size = 10.0, shape = circle.
bridges.base.ElementVisualizer.ElementVisualizer | ( | String | aColor | ) |
Construct an ElementVisualizer with its color set to "aColor".
aColor | the 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".
aColor | the string that represents one of the Bridges colors. |
aShape | the string that represents one of the Bridges shapes |
bridges.base.ElementVisualizer.ElementVisualizer | ( | double | size | ) |
Construct an ElementVisualizer with its size set to "size".
size | the 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 given color, shape, opacity, and size.
aColor | the string that represents one of the Bridges colors. |
aShape | the string that represents one of the Bridges shapes |
opacity | a double in [0;1] for varying transparency representing how transparent the node should. 0 for invisible, 1 for fully visible/ |
size | the 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"
v | the ElementVisualizer whose settings you want to copy. |
Color bridges.base.ElementVisualizer.getColor | ( | ) |
double bridges.base.ElementVisualizer.getLocationX | ( | ) |
Get the X coordinate position of the element.
double bridges.base.ElementVisualizer.getLocationY | ( | ) |
Get the Y coordinate position of the element.
float bridges.base.ElementVisualizer.getOpacity | ( | ) |
Get the opacity of the Element in the Bridges Visualization.
String bridges.base.ElementVisualizer.getShape | ( | ) |
double bridges.base.ElementVisualizer.getSize | ( | ) |
void bridges.base.ElementVisualizer.setColor | ( | Color | c | ) |
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.
r,g,b,a | color components. r, g, b are in the [0-255] range, a in [0,1]. |
void bridges.base.ElementVisualizer.setColor | ( | String | col_name | ) | throws InvalidValueException |
void bridges.base.ElementVisualizer.setLocation | ( | double | x, |
double | y | ||
) |
Set the location (x, y) of the element.
x,y | location to be set |
void bridges.base.ElementVisualizer.setOpacity | ( | float | opacity | ) |
Sets the opacity of the Element in the Bridges Visualization (0.0-1.0)
opacity | a 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 | ) |
void bridges.base.ElementVisualizer.setSize | ( | double | sz | ) |
|
package |
|
package |
|
package |