Overview
The Balloon class defines a rectangular shape (with optional
rounded corners) and a triangular tab. Commonly used for tooltips and text
blurbs in comics.
the code:
import org.jfxtras.scene.shape.Balloon;
import javafx.scene.paint.*;
Balloon {
x: 10
y: 10
width: 50
height: 50
arc: 20
tabWidth: 20
tabHeight: 10
tabDisplacement: 0.5
tabLocation: Balloon.TAB_AT_BOTTOM
fill: Color.BLACK
}produces:

Profile: desktop
Script Variable Summary
| access | name | type | Can Read | Can Init | Can Write | Default Value | description |
|---|---|---|---|---|---|---|---|
| public | ANGLE_AT_END | Integer | ![]() | ||||
| public | ANGLE_AT_START | Integer | ![]() | ||||
| public | NONE | Integer | ![]() | ||||
| public | TAB_AT_BOTTOM | Integer | ![]() | ||||
| public | TAB_AT_LEFT | Integer | ![]() | ||||
| public | TAB_AT_RIGHT | Integer | ![]() | ||||
| public | TAB_AT_TOP | Integer | ![]() |
Variable Summary
| access | name | type | Can Read | Can Init | Can Write | Default Value | description |
|---|---|---|---|---|---|---|---|
| public | anglePosition | Number | ![]() | ![]() | ![]() | Balloon.NONE |
Defines the position of the angle on the balloon's tab.
Defines the position of the angle on the balloon's tab. Valid values are Balloon.NONE, Balloon.ANGLE_AT_START, and Balloon.ANGLE_AT_END. Balloon.NONE |
| public | arc | Number | ![]() | ![]() | ![]() | 0 |
Defines the diameter of the arc at the four corners of the rectangle. |
| public | height | Number | ![]() | ![]() | ![]() | 50 |
Defines the height of the balloon excluding the tab. |
| public | tabDisplacement | Number | ![]() | ![]() | ![]() | 0.5 |
Defines the location of the tab along the side of the balloon.
Defines the location of the tab along the side of the balloon. Range is from 0.0 to 1.0. A value of 0.5 will center the tab along the balloon's side. 0.5 |
| public | tabHeight | Number | ![]() | ![]() | ![]() | 10 |
Defines the height of the balloon's tab. |
| public | tabLocation | Number | ![]() | ![]() | ![]() | Balloon.TAB_AT_BOTTOM |
Defines which side of the balloon the tab should appear on.
Defines which side of the balloon the tab should appear on. Valid values are Balloon.TAB_AT_BOTTOM, Balloon.TAB_AT_TOP, Balloon.TAB_AT_LEFT, Balloon.TAB_AT_RIGHT. Balloon.TAB_AT_BOTTOM |
| public | tabWidth | Number | ![]() | ![]() | ![]() | 20 |
Defines the width of the balloon's tab where it attaches to the balloon. |
| public | width | Number | ![]() | ![]() | ![]() | 50 |
Defines the width of the balloon excluding the tab. |
| public | x | Number | ![]() | ![]() | ![]() | 0 |
Defines the X coordinate of the upper-left corner of the balloon. |
| public | y | Number | ![]() | ![]() | ![]() | 0 |
Defines the Y coordinate of the upper-left corner of the balloon. |

