Bridges-Java-3.0.2  3.0.2
Bridges(JavaAPI)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
bridges.base.Symbol Class Reference
Inheritance diagram for bridges.base.Symbol:
bridges.base.Circle bridges.base.Label bridges.base.Polyline bridges.base.Rectangle bridges.base.Polygon

Detailed Description

This is a class in BRIDGES for deriving a number of Symbol objects for use in a SymbolCollection.

It is not intended that objects from this class will be directly created. Rather, we expect that classes that derive from this class be instantiated such as Circle, Label, Polyline, Polygon, Rectangle.

Symbols correspond to a simplified subset of SVG paths and shapes for custom visual representations in BRIDGES.

The stroke is the actual lines that get drawn (such as the perimeter of a rectangle) and its style is controlled by setStrokeColor(), setStrokeWidth(), and setStrokeDash().

The inside of the Symbol can be colored independently from the stroke using setFillColor().

The overall Symbol can be made more of less visible by adjusting its opacity using setOpacity().

@author David Burlinson, Kalpathi Subramanian
Date
2018, 7/15/19

Public Member Functions

 Symbol ()
 
void setLabel (String label)
 
String getLabel ()
 
String getIdentifier ()
 
void setFillColor (Color c)
 
void setFillColor (String c)
 
Color getFillColor ()
 
void setStrokeColor (Color c)
 
Symbol setStrokeColor (String c)
 
Color getStrokeColor ()
 
void setStrokeWidth (float strokewidth)
 This method sets the symbol stroke width. More...
 
float getStrokeWidth ()
 
Symbol setOpacity (float op)
 This method sets the symbol opacity. More...
 
float getOpacity ()
 
Symbol setStrokeDash (int dash)
 
Integer getStrokeDash ()
 
void setLocation (float x, float y)
 
float [] getLocation ()
 
float [] getDimensions ()
 
JSONObject getJSONRepresentation ()
 

Protected Member Functions

String getShapeType ()
 
void setShapeType (String sh)
 
void translatePoint (float[] pt, float tx, float ty)
 

Protected Attributes

String label = ""
 
Color fillColor = new Color("blue")
 
float opacity = DEFAULT_OPACITY
 
Color strokeColor = new Color("white")
 
float strokeWidth = DEFAULT_STROKEWIDTH
 
Integer strokeDash = DEFAULT_STROKEDASH
 
float locationX = DEFAULT_LOCATIONX
 
float locationY = DEFAULT_LOCATIONY
 

Constructor & Destructor Documentation

◆ Symbol()

bridges.base.Symbol.Symbol ( )

Create a default symbol object

Member Function Documentation

◆ getDimensions()

float [] bridges.base.Symbol.getDimensions ( )

Get Dimensions of symbol

Returns
symbol dimensions

◆ getFillColor()

Color bridges.base.Symbol.getFillColor ( )

This method gets fill color

Returns
fill color

◆ getIdentifier()

String bridges.base.Symbol.getIdentifier ( )

This method returns the Symbol's unique identifier

Returns
the string identifier

◆ getJSONRepresentation()

JSONObject bridges.base.Symbol.getJSONRepresentation ( )

Internal code for getting the properties of the Symbol object.

Returns
the encoded JSON string

◆ getLabel()

String bridges.base.Symbol.getLabel ( )

This method gets the symbol label

Returns
symbol label

◆ getLocation()

float [] bridges.base.Symbol.getLocation ( )

This method gets the symbol location

Returns
location (x, y) of the symbol

◆ getOpacity()

float bridges.base.Symbol.getOpacity ( )

This method gets symbol opacity

Returns
symbol opacity

◆ getShapeType()

String bridges.base.Symbol.getShapeType ( )
protected

Get the shape type

Returns
shape type

◆ getStrokeColor()

Color bridges.base.Symbol.getStrokeColor ( )

This method gets stroke color

Returns
stroke color

◆ getStrokeDash()

Integer bridges.base.Symbol.getStrokeDash ( )

This method gets stroke dash level

Returns
stroke dash level

◆ getStrokeWidth()

float bridges.base.Symbol.getStrokeWidth ( )

This method gets stroke width

Returns
stroke width

◆ setFillColor() [1/2]

void bridges.base.Symbol.setFillColor ( Color  c)

This method sets the symbol fill color

Parameters
cthe color to set

◆ setFillColor() [2/2]

void bridges.base.Symbol.setFillColor ( String  c)

This method sets the symbol fill color

Parameters
cthe color to set

◆ setLabel()

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

This method sets the label

Parameters
labelthe label to set

◆ setLocation()

void bridges.base.Symbol.setLocation ( float  x,
float  y 
)

This method sets the symbol location

Parameters
xx coordinate
yy coordinate

◆ setOpacity()

Symbol bridges.base.Symbol.setOpacity ( float  op)

This method sets the symbol opacity.

Parameters
opthe opacity to set

◆ setShapeType()

void bridges.base.Symbol.setShapeType ( String  sh)
protected

Set the shape type

Parameters
shshape type

◆ setStrokeColor() [1/2]

void bridges.base.Symbol.setStrokeColor ( Color  c)

This method sets the symbol stroke color

Parameters
cthe color to set

◆ setStrokeColor() [2/2]

Symbol bridges.base.Symbol.setStrokeColor ( String  c)

This method sets the symbol stroke color

Parameters
cthe named color to set

◆ setStrokeDash()

Symbol bridges.base.Symbol.setStrokeDash ( int  dash)

This method sets the stroke dash level

Parameters
dashdash level

◆ setStrokeWidth()

void bridges.base.Symbol.setStrokeWidth ( float  strokewidth)

This method sets the symbol stroke width.

This is the weight of the individual lines that are drawn, such as the perimeter of a rectangle.

Parameters
strokewidththe stroke width to set

◆ translatePoint()

void bridges.base.Symbol.translatePoint ( float []  pt,
float  tx,
float  ty 
)
protected

Translate a 2D point

Parameters
pt2D point (x, y)
tx,tytranslation vector

Member Data Documentation

◆ fillColor

Color bridges.base.Symbol.fillColor = new Color("blue")
protected

◆ label

String bridges.base.Symbol.label = ""
protected

◆ locationX

float bridges.base.Symbol.locationX = DEFAULT_LOCATIONX
protected

◆ locationY

float bridges.base.Symbol.locationY = DEFAULT_LOCATIONY
protected

◆ opacity

float bridges.base.Symbol.opacity = DEFAULT_OPACITY
protected

◆ strokeColor

Color bridges.base.Symbol.strokeColor = new Color("white")
protected

◆ strokeDash

Integer bridges.base.Symbol.strokeDash = DEFAULT_STROKEDASH
protected

◆ strokeWidth

float bridges.base.Symbol.strokeWidth = DEFAULT_STROKEWIDTH
protected

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