Class TextExt
- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.shape.Shape
-
- javafx.scene.text.Text
-
- org.fxmisc.richtext.TextExt
-
- All Implemented Interfaces:
Styleable,EventTarget
public class TextExt extends Text
A class which adds some more RichTextFX-specific styleable properties to JavaFX'sTextclass. 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
-
Property Summary
Properties Type Property Description ObjectProperty<Paint>backgroundColorThe background color of the section of text.ObjectProperty<Paint>borderStrokeColorThe border stroke color of the section of text.ObjectProperty<Number[]>borderStrokeDashArrayThe dash array used for drawing the border for a section of text.ObjectProperty<StrokeType>borderStrokeTypeThe stroke type of the border stroke.ObjectProperty<Number>borderStrokeWidthThe width of the border stroke.ObjectProperty<StrokeLineCap>underlineCapThe end cap style used for drawing each dash in a dashed underline for a section of text.ObjectProperty<Paint>underlineColorThe underline color of the section of text.ObjectProperty<Number[]>underlineDashArrayThe dash array used for drawing the underline for a section of text.ObjectProperty<Number>underlineDoubleGapThe size of the gap between two parallel underline lines or wave forms.ObjectProperty<Number>underlineOffsetThe offset of the underline for a section of text.ObjectProperty<Number>underlineWaveRadiusThe arc radius used to draw a wavy underline.ObjectProperty<Number>underlineWidthThe 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, tabSize, 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, focusVisible, focusWithin, 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectProperty<Paint>backgroundColorProperty()The background color of the section of text.ObjectProperty<Paint>borderStrokeColorProperty()The border stroke color of the section of text.ObjectProperty<Number[]>borderStrokeDashArrayProperty()The dash array used for drawing the border for a section of text.ObjectProperty<StrokeType>borderStrokeTypeProperty()The stroke type of the border stroke.ObjectProperty<Number>borderStrokeWidthProperty()The width of the border stroke.PaintgetBackgroundColor()Gets the value of the property backgroundColor.PaintgetBorderStrokeColor()Gets the value of the property borderStrokeColor.Number[]getBorderStrokeDashArray()Gets the value of the property borderStrokeDashArray.StrokeTypegetBorderStrokeType()Gets the value of the property borderStrokeType.NumbergetBorderStrokeWidth()Gets the value of the property borderStrokeWidth.List<CssMetaData<? extends Styleable,?>>getCssMetaData()StrokeLineCapgetUnderlineCap()Gets the value of the property underlineCap.PaintgetUnderlineColor()Gets the value of the property underlineColor.Number[]getUnderlineDashArray()Gets the value of the property underlineDashArray.NumbergetUnderlineDoubleGap()Gets the value of the property underlineDoubleGap.NumbergetUnderlineOffset()Gets the value of the property underlineOffset.NumbergetUnderlineWaveRadius()Gets the value of the property underlineWaveRadius.NumbergetUnderlineWidth()Gets the value of the property underlineWidth.voidsetBackgroundColor(Paint fill)Sets the value of the property backgroundColor.voidsetBorderStrokeColor(Paint fill)Sets the value of the property borderStrokeColor.voidsetBorderStrokeDashArray(Number[] array)Sets the value of the property borderStrokeDashArray.voidsetBorderStrokeType(StrokeType type)Sets the value of the property borderStrokeType.voidsetBorderStrokeWidth(Number width)Sets the value of the property borderStrokeWidth.voidsetUnderlineCap(StrokeLineCap cap)Sets the value of the property underlineCap.voidsetUnderlineColor(Paint fill)Sets the value of the property underlineColor.voidsetUnderlineDashArray(Number[] dashArray)Sets the value of the property underlineDashArray.voidsetUnderlineDoubleGap(Number radius)Sets the value of the property underlineDoubleGap.voidsetUnderlineOffset(Number width)Sets the value of the property underlineOffset.voidsetUnderlineWaveRadius(Number radius)Sets the value of the property underlineWaveRadius.voidsetUnderlineWidth(Number width)Sets the value of the property underlineWidth.ObjectProperty<StrokeLineCap>underlineCapProperty()The end cap style used for drawing each dash in a dashed underline for a section of text.ObjectProperty<Paint>underlineColorProperty()The underline color of the section of text.ObjectProperty<Number[]>underlineDashArrayProperty()The dash array used for drawing the underline for a section of text.ObjectProperty<Number>underlineDoubleGapProperty()The size of the gap between two parallel underline lines or wave forms.ObjectProperty<Number>underlineOffsetProperty()The offset of the underline for a section of text.ObjectProperty<Number>underlineWaveRadiusProperty()The arc radius used to draw a wavy underline.ObjectProperty<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, getTabSize, 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, setTabSize, setText, setTextAlignment, setTextOrigin, setUnderline, setWrappingWidth, setX, setY, strikethroughProperty, tabSizeProperty, 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, focusVisibleProperty, focusWithinProperty, 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, isFocusVisible, isFocusWithin, 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 ObjectProperty<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 ObjectProperty<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 andborderStrokeWidthProperty()a positive valueNote 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.
-
borderStrokeWidth
public ObjectProperty<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. SeeborderStrokeColorProperty()for more details. Can be styled from CSS using the "-rtfx-border-stroke-width" property.
-
borderStrokeType
public ObjectProperty<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. SeeborderStrokeColorProperty()for more details. Can be styled from CSS using the "-rtfx-border-stroke-type" property.
-
borderStrokeDashArray
public ObjectProperty<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. SeeborderStrokeColorProperty()for more details. Can be styled from CSS using the "-rtfx-border-stroke-dash-array" property.
-
underlineColor
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineColor(),setUnderlineColor(Paint)
-
underlineWidth
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineWidth(),setUnderlineWidth(Number)
-
underlineOffset
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineOffset(),setUnderlineOffset(Number)
-
underlineWaveRadius
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineDoubleGap
public ObjectProperty<Number> underlineDoubleGapProperty
The size of the gap between two parallel underline lines or wave forms. If null or zero, the underline will be a single line or wave form. Can be styled from CSS using the "-rtfx-underline-double-gap" property.Note that the underline properties specified here are orthogonal to the
Text.underlineProperty()inherited fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineDashArray
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineCap
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineCap(),setUnderlineCap(StrokeLineCap)
-
-
Constructor Detail
-
TextExt
public TextExt(String text)
-
TextExt
public TextExt()
-
-
Method Detail
-
getCssMetaData
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
- Specified by:
getCssMetaDatain interfaceStyleable- Overrides:
getCssMetaDatain classText
-
getBackgroundColor
public 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(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 ObjectProperty<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 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 valueNote 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(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 valueNote 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 ObjectProperty<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 andborderStrokeWidthProperty()a positive valueNote 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.
-
getBorderStrokeWidth
public 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(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 ObjectProperty<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. SeeborderStrokeColorProperty()for more details. Can be styled from CSS using the "-rtfx-border-stroke-width" property.
-
getBorderStrokeType
public 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(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 ObjectProperty<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. SeeborderStrokeColorProperty()for more details. Can be styled from CSS using the "-rtfx-border-stroke-type" property.
-
getBorderStrokeDashArray
public 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(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 ObjectProperty<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. SeeborderStrokeColorProperty()for more details. Can be styled from CSS using the "-rtfx-border-stroke-dash-array" property.
-
getUnderlineColor
public 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineColor
public void setUnderlineColor(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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineColorProperty
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineColor(),setUnderlineColor(Paint)
-
getUnderlineWidth
public 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineWidth
public void setUnderlineWidth(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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineWidthProperty
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineWidth(),setUnderlineWidth(Number)
-
getUnderlineOffset
public 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineOffset
public void setUnderlineOffset(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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineOffsetProperty
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineOffset(),setUnderlineOffset(Number)
-
getUnderlineWaveRadius
public 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineWaveRadius
public void setUnderlineWaveRadius(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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineWaveRadiusProperty
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
getUnderlineDoubleGap
public Number getUnderlineDoubleGap()
Gets the value of the property underlineDoubleGap.- Property description:
- The size of the gap between two parallel underline lines or wave forms. If null or zero, the
underline will be a single line or wave form.
Can be styled from CSS using the "-rtfx-underline-double-gap" property.
Note that the underline properties specified here are orthogonal to the
Text.underlineProperty()inherited fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineDoubleGap
public void setUnderlineDoubleGap(Number radius)
Sets the value of the property underlineDoubleGap.- Property description:
- The size of the gap between two parallel underline lines or wave forms. If null or zero, the
underline will be a single line or wave form.
Can be styled from CSS using the "-rtfx-underline-double-gap" property.
Note that the underline properties specified here are orthogonal to the
Text.underlineProperty()inherited fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineDoubleGapProperty
public ObjectProperty<Number> underlineDoubleGapProperty()
The size of the gap between two parallel underline lines or wave forms. If null or zero, the underline will be a single line or wave form. Can be styled from CSS using the "-rtfx-underline-double-gap" property.Note that the underline properties specified here are orthogonal to the
Text.underlineProperty()inherited fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
getUnderlineDashArray
public 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineDashArray
public void setUnderlineDashArray(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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineDashArrayProperty
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
getUnderlineCap
public 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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
setUnderlineCap
public void setUnderlineCap(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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().
-
underlineCapProperty
public ObjectProperty<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 fromText. The underline properties defined here inTextExtwill cause an underline to be drawn ifunderlineWidthProperty()is non-null and greater than zero, regardless of the value ofText.underlineProperty().- See Also:
getUnderlineCap(),setUnderlineCap(StrokeLineCap)
-
-