Bridges-Java-2.4  2.4.2
Bridges(JavaAPI)
Public Member Functions | List of all members
bridges.base.Polygon Class Reference

This class defines a rectangle and is part of the symbol collection. A rectangle has height and width. More...

Inheritance diagram for bridges.base.Polygon:
bridges.base.Symbol bridges.base.DataStruct

Public Member Functions

 Polygon ()
 
 Polygon (ArrayList< Float > pts)
 
String getName ()
 
void addPoint (Integer x, Integer y)
 
ArrayList< Float > getPoints ()
 
void setPolygon (ArrayList< Float > pts)
 
Float [] getDimensions ()
 
JSONObject getJSONRepresentation ()
 
- Public Member Functions inherited from bridges.base.Symbol
String getDataStructType ()
 
 Symbol ()
 
void setLabel (String label)
 
String getLabel ()
 
String getIdentifier ()
 
Symbol setFillColor (Color c)
 
Color getFillColor ()
 
Symbol setStrokeColor (Color c)
 
Color getStrokeColor ()
 
Symbol setStrokeWidth (Float strokewidth)
 
Float getStrokeWidth ()
 
Symbol setOpacity (Float o)
 
Float getOpacity ()
 
Symbol setStrokeDash (int dash)
 
Integer getStrokeDash ()
 
Symbol setLocation (int x, int y)
 
Symbol setLocation (Float x, Float y)
 
Float [] getLocation ()
 

Additional Inherited Members

- 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
 
- Protected Attributes inherited from bridges.base.DataStruct
String QUOTE = "\""
 

Detailed Description

This class defines a rectangle and is part of the symbol collection. A rectangle has height and width.

Author
David Burlinson, Kalpathi Subramanian
Date
12/23/18

Constructor & Destructor Documentation

◆ Polygon() [1/2]

bridges.base.Polygon.Polygon ( )

◆ Polygon() [2/2]

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

Member Function Documentation

◆ addPoint()

void bridges.base.Polygon.addPoint ( Integer  x,
Integer  y 
)

This method adds a point to the polygon

Parameters
x,yX, Y coordinates of the point

◆ getDimensions()

Float [] bridges.base.Polygon.getDimensions ( )

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

Parameters
none
Returns
array of 4 values

Reimplemented from bridges.base.Symbol.

◆ getJSONRepresentation()

JSONObject bridges.base.Polygon.getJSONRepresentation ( )

This method returns the JSON representation of the shape

Returns
string JSON string

Reimplemented from bridges.base.Symbol.

◆ getName()

String bridges.base.Polygon.getName ( )

This method gets the name of the shape

Returns
name shape name

◆ getPoints()

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

This method returns the point list of the polygon

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

◆ setPolygon()

void bridges.base.Polygon.setPolygon ( ArrayList< Float >  pts)

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