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

This class is used to store the visual attributes of BRIDGES elements. 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 aColor) 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 is used to store the visual attributes of BRIDGES elements.

Visual properties include color, shape, opacity, and size. 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.

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 double that represents the size in pixels of the Element on the Bridges Visualization
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, a decimal between 0 and 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 string representing the color of the Element as an [R G B A] 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  aColor) throws InvalidValueException

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

Parameters
aColorthe string reprsenting the color of the Element in the Bridges Visualization
void bridges.base.ElementVisualizer.setColor ( Integer  r,
Integer  g,
Integer  b,
float  a 
)

Set the color of the Element in the Bridges Visualization to "aColor". give RGBA components

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
colobject
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

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 pixels

Parameters
sizethe pixel size of the Element in the Bridges Visualization

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