Class TextExt

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget

    public class TextExt
    extends javafx.scene.text.Text
    A class which adds some more RichTextFX-specific styleable properties to JavaFX's Text class. The extra items can be styled using the properties (and accessors/mutators) or via CSS. Each property is documented with its CSS property. Each CSS property begins with the "-rtfx" prefix.

    Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

    • Property Summary

      Properties 
      Type Property Description
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> backgroundColor
      The background color of the section of text.
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> borderStrokeColor
      The border stroke color of the section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number[]> borderStrokeDashArray
      The dash array used for drawing the border for a section of text.
      javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeType> borderStrokeType
      The stroke type of the border stroke.
      javafx.beans.property.ObjectProperty<java.lang.Number> borderStrokeWidth
      The width of the border stroke.
      javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeLineCap> underlineCap
      The end cap style used for drawing each dash in a dashed underline for a section of text.
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> underlineColor
      The underline color of the section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number[]> underlineDashArray
      The dash array used for drawing the underline for a section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number> underlineOffset
      The offset of the underline for a section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number> underlineWaveRadius
      The arc radius used to draw a wavy underline.
      javafx.beans.property.ObjectProperty<java.lang.Number> underlineWidth
      The width of the underline for a section of text.
      • Properties inherited from class javafx.scene.text.Text

        baselineOffset, boundsType, caretBias, caretPosition, caretShape, font, fontSmoothingType, lineSpacing, selectionEnd, selectionFill, selectionShape, selectionStart, strikethrough, textAlignment, textOrigin, text, underline, wrappingWidth, x, y
      • Properties inherited from class javafx.scene.shape.Shape

        fill, smooth, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, stroke, strokeType, strokeWidth
      • Properties inherited from class javafx.scene.Node

        accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
    • Field Summary

      • Fields inherited from class javafx.scene.Node

        BASELINE_OFFSET_SAME_AS_HEIGHT
    • Constructor Summary

      Constructors 
      Constructor Description
      TextExt()  
      TextExt​(java.lang.String text)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> backgroundColorProperty()
      The background color of the section of text.
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> borderStrokeColorProperty()
      The border stroke color of the section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number[]> borderStrokeDashArrayProperty()
      The dash array used for drawing the border for a section of text.
      javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeType> borderStrokeTypeProperty()
      The stroke type of the border stroke.
      javafx.beans.property.ObjectProperty<java.lang.Number> borderStrokeWidthProperty()
      The width of the border stroke.
      javafx.scene.paint.Paint getBackgroundColor()
      Gets the value of the property backgroundColor.
      javafx.scene.paint.Paint getBorderStrokeColor()
      Gets the value of the property borderStrokeColor.
      java.lang.Number[] getBorderStrokeDashArray()
      Gets the value of the property borderStrokeDashArray.
      javafx.scene.shape.StrokeType getBorderStrokeType()
      Gets the value of the property borderStrokeType.
      java.lang.Number getBorderStrokeWidth()
      Gets the value of the property borderStrokeWidth.
      java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getCssMetaData()  
      javafx.scene.shape.StrokeLineCap getUnderlineCap()
      Gets the value of the property underlineCap.
      javafx.scene.paint.Paint getUnderlineColor()
      Gets the value of the property underlineColor.
      java.lang.Number[] getUnderlineDashArray()
      Gets the value of the property underlineDashArray.
      java.lang.Number getUnderlineOffset()
      Gets the value of the property underlineOffset.
      java.lang.Number getUnderlineWaveRadius()
      Gets the value of the property underlineWaveRadius.
      java.lang.Number getUnderlineWidth()
      Gets the value of the property underlineWidth.
      void setBackgroundColor​(javafx.scene.paint.Paint fill)
      Sets the value of the property backgroundColor.
      void setBorderStrokeColor​(javafx.scene.paint.Paint fill)
      Sets the value of the property borderStrokeColor.
      void setBorderStrokeDashArray​(java.lang.Number[] array)
      Sets the value of the property borderStrokeDashArray.
      void setBorderStrokeType​(javafx.scene.shape.StrokeType type)
      Sets the value of the property borderStrokeType.
      void setBorderStrokeWidth​(java.lang.Number width)
      Sets the value of the property borderStrokeWidth.
      void setUnderlineCap​(javafx.scene.shape.StrokeLineCap cap)
      Sets the value of the property underlineCap.
      void setUnderlineColor​(javafx.scene.paint.Paint fill)
      Sets the value of the property underlineColor.
      void setUnderlineDashArray​(java.lang.Number[] dashArray)
      Sets the value of the property underlineDashArray.
      void setUnderlineOffset​(java.lang.Number width)
      Sets the value of the property underlineOffset.
      void setUnderlineWaveRadius​(java.lang.Number radius)
      Sets the value of the property underlineWaveRadius.
      void setUnderlineWidth​(java.lang.Number width)
      Sets the value of the property underlineWidth.
      javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeLineCap> underlineCapProperty()
      The end cap style used for drawing each dash in a dashed underline for a section of text.
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> underlineColorProperty()
      The underline color of the section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number[]> underlineDashArrayProperty()
      The dash array used for drawing the underline for a section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number> underlineOffsetProperty()
      The offset of the underline for a section of text.
      javafx.beans.property.ObjectProperty<java.lang.Number> underlineWaveRadiusProperty()
      The arc radius used to draw a wavy underline.
      javafx.beans.property.ObjectProperty<java.lang.Number> underlineWidthProperty()
      The width of the underline for a section of text.
      • Methods inherited from class javafx.scene.text.Text

        baselineOffsetProperty, boundsTypeProperty, caretBiasProperty, caretPositionProperty, caretShape, caretShapeProperty, fontProperty, fontSmoothingTypeProperty, getBaselineOffset, getBoundsType, getCaretPosition, getCaretShape, getClassCssMetaData, getFont, getFontSmoothingType, getLineSpacing, getSelectionEnd, getSelectionFill, getSelectionShape, getSelectionStart, getText, getTextAlignment, getTextOrigin, getWrappingWidth, getX, getY, hitTest, isCaretBias, isStrikethrough, isUnderline, lineSpacingProperty, queryAccessibleAttribute, rangeShape, selectionEndProperty, selectionFillProperty, selectionShapeProperty, selectionStartProperty, setBoundsType, setCaretBias, setCaretPosition, setFont, setFontSmoothingType, setLineSpacing, setSelectionEnd, setSelectionFill, setSelectionStart, setStrikethrough, setText, setTextAlignment, setTextOrigin, setUnderline, setWrappingWidth, setX, setY, strikethroughProperty, textAlignmentProperty, textOriginProperty, textProperty, toString, underlineProperty, underlineShape, usesMirroring, wrappingWidthProperty, xProperty, yProperty
      • Methods inherited from class javafx.scene.shape.Shape

        fillProperty, getFill, getStroke, getStrokeDashArray, getStrokeDashOffset, getStrokeLineCap, getStrokeLineJoin, getStrokeMiterLimit, getStrokeType, getStrokeWidth, intersect, isSmooth, setFill, setSmooth, setStroke, setStrokeDashOffset, setStrokeLineCap, setStrokeLineJoin, setStrokeMiterLimit, setStrokeType, setStrokeWidth, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty, subtract, union
      • Methods inherited from class javafx.scene.Node

        accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, viewOrderProperty, visibleProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javafx.css.Styleable

        getStyleableNode
    • Property Detail

      • backgroundColor

        public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> backgroundColorProperty
        The background color of the section of text. By default, JavaFX doesn't support a background for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-background-color" property.
        See Also:
        getBackgroundColor(), setBackgroundColor(Paint)
      • borderStrokeColor

        public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> borderStrokeColorProperty
        The border stroke color of the section of text. By default, JavaFX doesn't support a border for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text. The border will only be drawn if this has a non-null value and borderStrokeWidthProperty() a positive value

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-border-stroke-color" property.
        See Also:
        getBorderStrokeColor(), setBorderStrokeColor(Paint)
      • borderStrokeWidth

        public javafx.beans.property.ObjectProperty<java.lang.Number> borderStrokeWidthProperty
        The width of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-width" property.
        See Also:
        getBorderStrokeWidth(), setBorderStrokeWidth(Number)
      • borderStrokeType

        public javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeType> borderStrokeTypeProperty
        The stroke type of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-type" property.
        See Also:
        getBorderStrokeType(), setBorderStrokeType(StrokeType)
      • borderStrokeDashArray

        public javafx.beans.property.ObjectProperty<java.lang.Number[]> borderStrokeDashArrayProperty
        The dash array used for drawing the border for a section of text. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-dash-array" property.
        See Also:
        getBorderStrokeDashArray(), setBorderStrokeDashArray(Number[])
      • underlineColor

        public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> underlineColorProperty
        The underline color of the section of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-underline-color" property (not to be confused with JavaFX's separate "-fx-underline" property).

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineColor(), setUnderlineColor(Paint)
      • underlineWidth

        public javafx.beans.property.ObjectProperty<java.lang.Number> underlineWidthProperty
        The width of the underline for a section of text. If null or zero, the underline will not be drawn. Can be styled from CSS using the "-rtfx-underline-width" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineWidth(), setUnderlineWidth(Number)
      • underlineOffset

        public javafx.beans.property.ObjectProperty<java.lang.Number> underlineOffsetProperty
        The offset of the underline for a section of text. If null or zero, the underline will be drawn along the baseline of the text. Can be styled from CSS using the "-rtfx-underline-offset" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineOffset(), setUnderlineOffset(Number)
      • underlineWaveRadius

        public javafx.beans.property.ObjectProperty<java.lang.Number> underlineWaveRadiusProperty
        The arc radius used to draw a wavy underline. If null or zero, the underline will be a simple line. Can be styled from CSS using the "-rtfx-underline-wave-radius" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineWaveRadius(), setUnderlineWaveRadius(Number)
      • underlineDashArray

        public javafx.beans.property.ObjectProperty<java.lang.Number[]> underlineDashArrayProperty
        The dash array used for drawing the underline for a section of text. Can be styled from CSS using the "-rtfx-underline-dash-array" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineDashArray(), setUnderlineDashArray(Number[])
      • underlineCap

        public javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeLineCap> underlineCapProperty
        The end cap style used for drawing each dash in a dashed underline for a section of text. Can be styled from CSS using the "-rtfx-underline-cap" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineCap(), setUnderlineCap(StrokeLineCap)
    • Constructor Detail

      • TextExt

        public TextExt​(java.lang.String text)
      • TextExt

        public TextExt()
    • Method Detail

      • getCssMetaData

        public java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,​?>> getCssMetaData()
        Specified by:
        getCssMetaData in interface javafx.css.Styleable
        Overrides:
        getCssMetaData in class javafx.scene.text.Text
      • getBackgroundColor

        public javafx.scene.paint.Paint getBackgroundColor()
        Gets the value of the property backgroundColor.
        Property description:
        The background color of the section of text. By default, JavaFX doesn't support a background for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-background-color" property.
      • setBackgroundColor

        public void setBackgroundColor​(javafx.scene.paint.Paint fill)
        Sets the value of the property backgroundColor.
        Property description:
        The background color of the section of text. By default, JavaFX doesn't support a background for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-background-color" property.
      • backgroundColorProperty

        public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> backgroundColorProperty()
        The background color of the section of text. By default, JavaFX doesn't support a background for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-background-color" property.
        See Also:
        getBackgroundColor(), setBackgroundColor(Paint)
      • getBorderStrokeColor

        public javafx.scene.paint.Paint getBorderStrokeColor()
        Gets the value of the property borderStrokeColor.
        Property description:
        The border stroke color of the section of text. By default, JavaFX doesn't support a border for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text. The border will only be drawn if this has a non-null value and borderStrokeWidthProperty() a positive value

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-border-stroke-color" property.
      • setBorderStrokeColor

        public void setBorderStrokeColor​(javafx.scene.paint.Paint fill)
        Sets the value of the property borderStrokeColor.
        Property description:
        The border stroke color of the section of text. By default, JavaFX doesn't support a border for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text. The border will only be drawn if this has a non-null value and borderStrokeWidthProperty() a positive value

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-border-stroke-color" property.
      • borderStrokeColorProperty

        public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> borderStrokeColorProperty()
        The border stroke color of the section of text. By default, JavaFX doesn't support a border for Text (as it is a Shape item), but RichTextFX does support drawing a different background for different sections of text. The border will only be drawn if this has a non-null value and borderStrokeWidthProperty() a positive value

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-border-stroke-color" property.
        See Also:
        getBorderStrokeColor(), setBorderStrokeColor(Paint)
      • getBorderStrokeWidth

        public java.lang.Number getBorderStrokeWidth()
        Gets the value of the property borderStrokeWidth.
        Property description:
        The width of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-width" property.
      • setBorderStrokeWidth

        public void setBorderStrokeWidth​(java.lang.Number width)
        Sets the value of the property borderStrokeWidth.
        Property description:
        The width of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-width" property.
      • borderStrokeWidthProperty

        public javafx.beans.property.ObjectProperty<java.lang.Number> borderStrokeWidthProperty()
        The width of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-width" property.
        See Also:
        getBorderStrokeWidth(), setBorderStrokeWidth(Number)
      • getBorderStrokeType

        public javafx.scene.shape.StrokeType getBorderStrokeType()
        Gets the value of the property borderStrokeType.
        Property description:
        The stroke type of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-type" property.
      • setBorderStrokeType

        public void setBorderStrokeType​(javafx.scene.shape.StrokeType type)
        Sets the value of the property borderStrokeType.
        Property description:
        The stroke type of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-type" property.
      • borderStrokeTypeProperty

        public javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeType> borderStrokeTypeProperty()
        The stroke type of the border stroke. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-type" property.
        See Also:
        getBorderStrokeType(), setBorderStrokeType(StrokeType)
      • getBorderStrokeDashArray

        public java.lang.Number[] getBorderStrokeDashArray()
        Gets the value of the property borderStrokeDashArray.
        Property description:
        The dash array used for drawing the border for a section of text. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-dash-array" property.
      • setBorderStrokeDashArray

        public void setBorderStrokeDashArray​(java.lang.Number[] array)
        Sets the value of the property borderStrokeDashArray.
        Property description:
        The dash array used for drawing the border for a section of text. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-dash-array" property.
      • borderStrokeDashArrayProperty

        public javafx.beans.property.ObjectProperty<java.lang.Number[]> borderStrokeDashArrayProperty()
        The dash array used for drawing the border for a section of text. The border stroke will only be drawn if borderStrokeColorProperty() (which determines the color) has a non-null value. See borderStrokeColorProperty() for more details. Can be styled from CSS using the "-rtfx-border-stroke-dash-array" property.
        See Also:
        getBorderStrokeDashArray(), setBorderStrokeDashArray(Number[])
      • getUnderlineColor

        public javafx.scene.paint.Paint getUnderlineColor()
        Gets the value of the property underlineColor.
        Property description:
        The underline color of the section of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-underline-color" property (not to be confused with JavaFX's separate "-fx-underline" property).

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • setUnderlineColor

        public void setUnderlineColor​(javafx.scene.paint.Paint fill)
        Sets the value of the property underlineColor.
        Property description:
        The underline color of the section of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-underline-color" property (not to be confused with JavaFX's separate "-fx-underline" property).

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • underlineColorProperty

        public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> underlineColorProperty()
        The underline color of the section of text.

        Note that this is actually a Paint type, so you can specify gradient or image fills rather than a flat colour. But due to line wrapping, it's possible that the fill may be used multiple times on separate lines even for the same segment of text.

        Can be styled from CSS using the "-rtfx-underline-color" property (not to be confused with JavaFX's separate "-fx-underline" property).

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineColor(), setUnderlineColor(Paint)
      • getUnderlineWidth

        public java.lang.Number getUnderlineWidth()
        Gets the value of the property underlineWidth.
        Property description:
        The width of the underline for a section of text. If null or zero, the underline will not be drawn. Can be styled from CSS using the "-rtfx-underline-width" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • setUnderlineWidth

        public void setUnderlineWidth​(java.lang.Number width)
        Sets the value of the property underlineWidth.
        Property description:
        The width of the underline for a section of text. If null or zero, the underline will not be drawn. Can be styled from CSS using the "-rtfx-underline-width" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • underlineWidthProperty

        public javafx.beans.property.ObjectProperty<java.lang.Number> underlineWidthProperty()
        The width of the underline for a section of text. If null or zero, the underline will not be drawn. Can be styled from CSS using the "-rtfx-underline-width" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineWidth(), setUnderlineWidth(Number)
      • getUnderlineOffset

        public java.lang.Number getUnderlineOffset()
        Gets the value of the property underlineOffset.
        Property description:
        The offset of the underline for a section of text. If null or zero, the underline will be drawn along the baseline of the text. Can be styled from CSS using the "-rtfx-underline-offset" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • setUnderlineOffset

        public void setUnderlineOffset​(java.lang.Number width)
        Sets the value of the property underlineOffset.
        Property description:
        The offset of the underline for a section of text. If null or zero, the underline will be drawn along the baseline of the text. Can be styled from CSS using the "-rtfx-underline-offset" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • underlineOffsetProperty

        public javafx.beans.property.ObjectProperty<java.lang.Number> underlineOffsetProperty()
        The offset of the underline for a section of text. If null or zero, the underline will be drawn along the baseline of the text. Can be styled from CSS using the "-rtfx-underline-offset" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineOffset(), setUnderlineOffset(Number)
      • getUnderlineWaveRadius

        public java.lang.Number getUnderlineWaveRadius()
        Gets the value of the property underlineWaveRadius.
        Property description:
        The arc radius used to draw a wavy underline. If null or zero, the underline will be a simple line. Can be styled from CSS using the "-rtfx-underline-wave-radius" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • setUnderlineWaveRadius

        public void setUnderlineWaveRadius​(java.lang.Number radius)
        Sets the value of the property underlineWaveRadius.
        Property description:
        The arc radius used to draw a wavy underline. If null or zero, the underline will be a simple line. Can be styled from CSS using the "-rtfx-underline-wave-radius" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • underlineWaveRadiusProperty

        public javafx.beans.property.ObjectProperty<java.lang.Number> underlineWaveRadiusProperty()
        The arc radius used to draw a wavy underline. If null or zero, the underline will be a simple line. Can be styled from CSS using the "-rtfx-underline-wave-radius" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineWaveRadius(), setUnderlineWaveRadius(Number)
      • getUnderlineDashArray

        public java.lang.Number[] getUnderlineDashArray()
        Gets the value of the property underlineDashArray.
        Property description:
        The dash array used for drawing the underline for a section of text. Can be styled from CSS using the "-rtfx-underline-dash-array" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • setUnderlineDashArray

        public void setUnderlineDashArray​(java.lang.Number[] dashArray)
        Sets the value of the property underlineDashArray.
        Property description:
        The dash array used for drawing the underline for a section of text. Can be styled from CSS using the "-rtfx-underline-dash-array" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • underlineDashArrayProperty

        public javafx.beans.property.ObjectProperty<java.lang.Number[]> underlineDashArrayProperty()
        The dash array used for drawing the underline for a section of text. Can be styled from CSS using the "-rtfx-underline-dash-array" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineDashArray(), setUnderlineDashArray(Number[])
      • getUnderlineCap

        public javafx.scene.shape.StrokeLineCap getUnderlineCap()
        Gets the value of the property underlineCap.
        Property description:
        The end cap style used for drawing each dash in a dashed underline for a section of text. Can be styled from CSS using the "-rtfx-underline-cap" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • setUnderlineCap

        public void setUnderlineCap​(javafx.scene.shape.StrokeLineCap cap)
        Sets the value of the property underlineCap.
        Property description:
        The end cap style used for drawing each dash in a dashed underline for a section of text. Can be styled from CSS using the "-rtfx-underline-cap" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

      • underlineCapProperty

        public javafx.beans.property.ObjectProperty<javafx.scene.shape.StrokeLineCap> underlineCapProperty()
        The end cap style used for drawing each dash in a dashed underline for a section of text. Can be styled from CSS using the "-rtfx-underline-cap" property.

        Note that the underline properties specified here are orthogonal to the Text.underlineProperty() inherited from Text. The underline properties defined here in TextExt will cause an underline to be drawn if underlineWidthProperty() is non-null and greater than zero, regardless of the value of Text.underlineProperty().

        See Also:
        getUnderlineCap(), setUnderlineCap(StrokeLineCap)