JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

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:

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicANGLE_AT_ENDInteger
publicANGLE_AT_STARTInteger
publicanglePositionNumberBalloon.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  
publicarcNumber0

Defines the diameter of the arc at the four corners of the rectangle.

publicheightNumber50

Defines the height of the balloon excluding the tab.

publicNONEInteger
publicTAB_AT_BOTTOMInteger
publicTAB_AT_LEFTInteger
publicTAB_AT_RIGHTInteger
publicTAB_AT_TOPInteger
publictabDisplacementNumber0.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  
publictabHeightNumber10

Defines the height of the balloon's tab.

publictabLocationNumberBalloon.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  
publictabWidthNumber20

Defines the width of the balloon's tab where it attaches to the balloon.

publicwidthNumber50

Defines the width of the balloon excluding the tab.

publicxNumber0

Defines the X coordinate of the upper-left corner of the balloon.

publicyNumber0

Defines the Y coordinate of the upper-left corner of the balloon.

Inherited Variables

Inherited Functions