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

Detailed Description

This class defines a polyline and is part of the symbol collection. A polyline has a sequence of points (x, y coordinate pairs)

Basic styling such as stroke and fill are defined in the superclass Symbol.

Author
David Burlinson, Kalpathi Subramanian
Date
12/23/18, 7/15/19

Public Member Functions

 Polyline ()
 
 Polyline (ArrayList< Float > pts)
 
String getName ()
 
void addPoint (float x, float y)
 
ArrayList< Float > getPoints ()
 
void setPolyline (ArrayList< Float > pts)
 
float [] getDimensions ()
 
JSONObject getJSONRepresentation ()
 
- Public Member Functions inherited from bridges.base.Symbol
 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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from bridges.base.Symbol
String getShapeType ()
 
void setShapeType (String sh)
 
void translatePoint (float[] pt, float tx, float ty)
 
- Protected Attributes inherited from bridges.base.Symbol
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

◆ Polyline() [1/2]

bridges.base.Polyline.Polyline ( )

Construct a default polyline structure

◆ Polyline() [2/2]

bridges.base.Polyline.Polyline ( ArrayList< Float >  pts)

Construct a polyline with the give set of points

Member Function Documentation

◆ addPoint()

void bridges.base.Polyline.addPoint ( float  x,
float  y 
)

This method adds a point to the polyline

Parameters
x,yCoordinates of the point

◆ getDimensions()

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

This method returns the dimensions of the shape: min and max values in X and Y

Returns
Bounding box of the point list (array of 4 values)

◆ getJSONRepresentation()

JSONObject bridges.base.Polyline.getJSONRepresentation ( )

This method returns the JSON representation of the shape

Returns
string JSON string

◆ getName()

String bridges.base.Polyline.getName ( )

This method gets the name of the shape

Returns
shape name

◆ getPoints()

ArrayList<Float> bridges.base.Polyline.getPoints ( )

This method returns the point list of the polyline

Returns
points point list of the polyline - sequence of x, y values

◆ setPolyline()

void bridges.base.Polyline.setPolyline ( ArrayList< Float >  pts)

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