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

Detailed Description

This class defines a circle and is part of the symbol collection. A circle has a center and radius.

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

Author
Kalpathi Subramanian
Date
12/24/18

Public Member Functions

 Circle ()
 
 Circle (float r)
 
 Circle (float locx, float locy, float r)
 
String getName ()
 
void setRadius (float r)
 
void setCircle (float locx, float locy, float r)
 
void translate (float tx, float ty)
 
void scale (float scale)
 
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

◆ Circle() [1/3]

bridges.base.Circle.Circle ( )

Construct a default circle (center at origin, radius of 10 units)

◆ Circle() [2/3]

bridges.base.Circle.Circle ( float  r)

Construct a circle of radius r

Parameters
rradius of circle

◆ Circle() [3/3]

bridges.base.Circle.Circle ( float  locx,
float  locy,
float  r 
)

Construct a circle with given location and radius

Parameters
locxx coordinat of circle center
locyy coordinat of circle center
rradius of circle

Member Function Documentation

◆ getDimensions()

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

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

Returns
array of 4 values This method returns the dimensions of the shape: min and max values in X and Y
bounding box of circle (array of 4 values)

◆ getJSONRepresentation()

JSONObject bridges.base.Circle.getJSONRepresentation ( )

This method returns the JSON representation of the shape

Returns
JSON representation of circle (string)

◆ getName()

String bridges.base.Circle.getName ( )

This method gets the name of the shape

Returns
name shape name

◆ scale()

void bridges.base.Circle.scale ( float  scale)

Scale the circle Only the radius needs to be scaled, using a single scale value

Parameters
scalefactor s

◆ setCircle()

void bridges.base.Circle.setCircle ( float  locx,
float  locy,
float  r 
)

This method sets the circle dimensions

Parameters
locxx coordinate of circle center
locyy coordinate of circle center
rradius of circle
Returns
none

◆ setRadius()

void bridges.base.Circle.setRadius ( float  r)

This method sets the radius of the circle

Parameters
rradius

◆ translate()

void bridges.base.Circle.translate ( float  tx,
float  ty 
)

Translate the circle

Parameters
(tx,ty)translation vector

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