Bridges-Java  3.4.2
Bridges(Java API)
Public Member Functions | List of all members
bridges.base.Text Class Reference
Inheritance diagram for bridges.base.Text:
bridges.base.Symbol

Detailed Description

This class used to render text as part of a SymbolCollection.

Text have a text string, font size, anchor location, and anchoring mode.

Basic styling such as stroke, color are defined in the superclass Symbol.

On a label the "stroke" refer to the outside of the of the letter, and the "fill" refers to the inside of the letters. In most case, you want no stroke but a fill.

Text is placed by defining an anchor position and what that position is for the text (is it the middle? is it the top left?). Check the tutorial for details.

See also
An example tutorial can be found at https://bridgesuncc.github.io/tutorials/Symbol_Collection.html
Author
David Burlinson, Erik Saule
Date
2018, 7/15/19, 06/22/21

Public Member Functions

 Text ()
 
 Text (String label)
 
String getShapeType ()
 
Symbol setText (String t)
 
String getText ()
 
Text setFontSize (float size)
 
float getFontSize ()
 
Symbol setAnchorLocation (float x, float y)
 
float getAnchorLocationX ()
 
float getAnchorLocationY ()
 
Symbol setAnchorAlignment (String typeLR, String typeTB)
 
String getAnchroAlignmentLR ()
 
String getAnchroAlignmentTB ()
 
JSONObject getJSONRepresentation ()
 
- Public Member Functions inherited from bridges.base.Symbol
 Symbol ()
 
Symbol setLabel (String label)
 
String getLabel ()
 
Symbol setFillColor (String c)
 
Symbol setFillColor (Color c)
 
Color getFillColor ()
 
Symbol setStrokeColor (Color c)
 
Symbol setStrokeColor (String c)
 
Color getStrokeColor ()
 
Symbol 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 ()
 
Symbol setLayer (int layer)
 
Integer getLayer ()
 
float[][] identity (float[][] m)
 
Symbol translate (float tx, float ty)
 
Symbol scale (float s)
 
Symbol scale (float sx, float sy)
 
Symbol rotate (float angle)
 
Symbol scale (float sx, float sy, float px, float py)
 
Symbol rotate (float angle, float px, float py)
 
Symbol setTransform (float a, float b, float c, float d, float e, float f)
 
float[][] getTransform ()
 
void addAllJSON (JSONArray symbol_json, Integer parent)
 

Additional Inherited Members

- Protected Attributes inherited from bridges.base.Symbol
String label = null
 
Color fillColor = null
 
Float opacity = null
 
Color strokeColor = null
 
Float strokeWidth = null
 
Integer strokeDash = null
 
Integer layer = null
 
float[] transform = null
 
- Package Attributes inherited from bridges.base.Symbol
Boolean xform_flag = false
 

Constructor & Destructor Documentation

◆ Text() [1/2]

bridges.base.Text.Text ( )

Construct a default label

◆ Text() [2/2]

bridges.base.Text.Text ( String  label)

Construct a label with the give text string

Parameters
labelthe text of the label

Member Function Documentation

◆ getAnchorLocationX()

float bridges.base.Text.getAnchorLocationX ( )

◆ getAnchorLocationY()

float bridges.base.Text.getAnchorLocationY ( )

◆ getAnchroAlignmentLR()

String bridges.base.Text.getAnchroAlignmentLR ( )

◆ getAnchroAlignmentTB()

String bridges.base.Text.getAnchroAlignmentTB ( )

◆ getFontSize()

float bridges.base.Text.getFontSize ( )

◆ getJSONRepresentation()

JSONObject bridges.base.Text.getJSONRepresentation ( )

Get the JSON representation of the label object

Returns
the encoded JSON string

Reimplemented from bridges.base.Symbol.

◆ getShapeType()

String bridges.base.Text.getShapeType ( )

Get the shape type

Returns
shape type

Reimplemented from bridges.base.Symbol.

◆ getText()

String bridges.base.Text.getText ( )

◆ setAnchorAlignment()

Symbol bridges.base.Text.setAnchorAlignment ( String  typeLR,
String  typeTB 
)
Parameters
typeLRvalid parameters are "left", "middle", and "right"
typeTBvalid parameters are "top", "bottom", "embottom", "emtop", "middle"

◆ setAnchorLocation()

Symbol bridges.base.Text.setAnchorLocation ( float  x,
float  y 
)

◆ setFontSize()

Text bridges.base.Text.setFontSize ( float  size)

◆ setText()

Symbol bridges.base.Text.setText ( String  t)

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