![]() |
Bridges-Java-3.0.1
3.0.1
Bridges(JavaAPI)
|
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
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 |
bridges.base.Symbol.Symbol | ( | ) |
Create a default symbol object
float [] bridges.base.Symbol.getDimensions | ( | ) |
Get Dimensions of symbol
Color bridges.base.Symbol.getFillColor | ( | ) |
This method gets fill color
String bridges.base.Symbol.getIdentifier | ( | ) |
This method returns the Symbol's unique identifier
JSONObject bridges.base.Symbol.getJSONRepresentation | ( | ) |
Internal code for getting the properties of the Symbol object.
String bridges.base.Symbol.getLabel | ( | ) |
This method gets the symbol label
float [] bridges.base.Symbol.getLocation | ( | ) |
This method gets the symbol location
float bridges.base.Symbol.getOpacity | ( | ) |
This method gets symbol opacity
|
protected |
Get the shape type
Color bridges.base.Symbol.getStrokeColor | ( | ) |
This method gets stroke color
Integer bridges.base.Symbol.getStrokeDash | ( | ) |
This method gets stroke dash level
float bridges.base.Symbol.getStrokeWidth | ( | ) |
This method gets stroke width
void bridges.base.Symbol.setFillColor | ( | Color | c | ) |
This method sets the symbol fill color
c | the color to set |
void bridges.base.Symbol.setFillColor | ( | String | c | ) |
This method sets the symbol fill color
c | the color to set |
void bridges.base.Symbol.setLabel | ( | String | label | ) |
This method sets the label
label | the label to set |
void bridges.base.Symbol.setLocation | ( | float | x, |
float | y | ||
) |
This method sets the symbol location
x | x coordinate |
y | y coordinate |
Symbol bridges.base.Symbol.setOpacity | ( | float | op | ) |
This method sets the symbol opacity.
op | the opacity to set |
|
protected |
Set the shape type
sh | shape type |
void bridges.base.Symbol.setStrokeColor | ( | Color | c | ) |
This method sets the symbol stroke color
c | the color to set |
Symbol bridges.base.Symbol.setStrokeColor | ( | String | c | ) |
This method sets the symbol stroke color
c | the named color to set |
Symbol bridges.base.Symbol.setStrokeDash | ( | int | dash | ) |
This method sets the stroke dash level
dash | dash level |
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.
strokewidth | the stroke width to set |
|
protected |
Translate a 2D point
pt | 2D point (x, y) |
tx,ty | translation vector |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |