- All Implemented Interfaces:
Styleable,EventTarget,Skinnable
- Direct Known Subclasses:
ButtonBase,Cell,Label,TitledPane
@DefaultProperty("text") public abstract class Labeled extends Control
Control is one which has as part of its user interface
a textual content associated with it. For example, a Button displays
text, as does a Label, a Tooltip, and many
other controls.
Labeled is also a convenient base class from which to extend when building new Controls which, as part of their UI, display read-only textual content.
Example of how to place a graphic above the text:
Image image = new Image(getClass().getResourceAsStream("image.png"));
ImageView imageView = new ImageView();
imageView.setImage(image);
Label label = new Label("text", imageView);
label.setContentDisplay(ContentDisplay.TOP);
- Since:
- JavaFX 2.0
- See Also:
Button,Label,ToggleButton
-
Property Summary
Properties Type Property Description ObjectProperty<Pos>alignmentSpecifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled.ObjectProperty<ContentDisplay>contentDisplaySpecifies the positioning of the graphic relative to the text.StringPropertyellipsisStringSpecifies the string to display for the ellipsis when text is truncated.ObjectProperty<Font>fontThe default font to use for text in the Labeled.ObjectProperty<Node>graphicAn optional icon for the Labeled.DoublePropertygraphicTextGapThe amount of space between the graphic and textReadOnlyObjectProperty<Insets>labelPaddingThe padding around the Labeled's text and graphic content.DoublePropertylineSpacingSpecifies the space in pixel between lines.BooleanPropertymnemonicParsingMnemonicParsing property to enable/disable text parsing.ObjectProperty<TextAlignment>textAlignmentSpecifies the behavior for lines of text when text is multiline.ObjectProperty<Paint>textFillThePaintused to fill the text.ObjectProperty<OverrunStyle>textOverrunSpecifies the behavior to use if the text of theLabeledexceeds the available space for rendering the text.StringPropertytextThe text to display in the label.BooleanPropertyunderlineWhether all text should be underlined.BooleanPropertywrapTextIf a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties 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
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description ObjectProperty<Pos>alignmentProperty()Specifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled.ObjectProperty<ContentDisplay>contentDisplayProperty()Specifies the positioning of the graphic relative to the text.StringPropertyellipsisStringProperty()Specifies the string to display for the ellipsis when text is truncated.ObjectProperty<Font>fontProperty()The default font to use for text in the Labeled.PosgetAlignment()Gets the value of the property alignment.static List<CssMetaData<? extends Styleable,?>>getClassCssMetaData()OrientationgetContentBias()If wrapText is true, then contentBias will be HORIZONTAL, otherwise it is null.ContentDisplaygetContentDisplay()Gets the value of the property contentDisplay.List<CssMetaData<? extends Styleable,?>>getControlCssMetaData()StringgetEllipsisString()Gets the value of the property ellipsisString.FontgetFont()Gets the value of the property font.NodegetGraphic()Gets the value of the property graphic.doublegetGraphicTextGap()Gets the value of the property graphicTextGap.protected PosgetInitialAlignment()Returns the initial alignment state of this control, for use by the JavaFX CSS engine to correctly set its initial value.InsetsgetLabelPadding()Gets the value of the property labelPadding.doublegetLineSpacing()Gets the value of the property lineSpacing.StringgetText()Gets the value of the property text.TextAlignmentgetTextAlignment()Gets the value of the property textAlignment.PaintgetTextFill()Gets the value of the property textFill.OverrunStylegetTextOverrun()Gets the value of the property textOverrun.ObjectProperty<Node>graphicProperty()An optional icon for the Labeled.DoublePropertygraphicTextGapProperty()The amount of space between the graphic and textbooleanisMnemonicParsing()Gets the value of the property mnemonicParsing.booleanisUnderline()Gets the value of the property underline.booleanisWrapText()Gets the value of the property wrapText.ReadOnlyObjectProperty<Insets>labelPaddingProperty()The padding around the Labeled's text and graphic content.DoublePropertylineSpacingProperty()Specifies the space in pixel between lines.BooleanPropertymnemonicParsingProperty()MnemonicParsing property to enable/disable text parsing.voidsetAlignment(Pos value)Sets the value of the property alignment.voidsetContentDisplay(ContentDisplay value)Sets the value of the property contentDisplay.voidsetEllipsisString(String value)Sets the value of the property ellipsisString.voidsetFont(Font value)Sets the value of the property font.voidsetGraphic(Node value)Sets the value of the property graphic.voidsetGraphicTextGap(double value)Sets the value of the property graphicTextGap.voidsetLineSpacing(double value)Sets the value of the property lineSpacing.voidsetMnemonicParsing(boolean value)Sets the value of the property mnemonicParsing.voidsetText(String value)Sets the value of the property text.voidsetTextAlignment(TextAlignment value)Sets the value of the property textAlignment.voidsetTextFill(Paint value)Sets the value of the property textFill.voidsetTextOverrun(OverrunStyle value)Sets the value of the property textOverrun.voidsetUnderline(boolean value)Sets the value of the property underline.voidsetWrapText(boolean value)Sets the value of the property wrapText.ObjectProperty<TextAlignment>textAlignmentProperty()Specifies the behavior for lines of text when text is multiline.ObjectProperty<Paint>textFillProperty()ThePaintused to fill the text.ObjectProperty<OverrunStyle>textOverrunProperty()Specifies the behavior to use if the text of theLabeledexceeds the available space for rendering the text.StringPropertytextProperty()The text to display in the label.StringtoString()Returns a string representation for the object.BooleanPropertyunderlineProperty()Whether all text should be underlined.BooleanPropertywrapTextProperty()If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, createDefaultSkin, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipPropertyMethods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, 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, 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, lookupAll, managedProperty, 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, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, 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, usesMirroring, viewOrderProperty, visibleProperty
-
Property Details
-
text
The text to display in the label. The text may be null.- See Also:
getText(),setText(String)
-
alignment
Specifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled.- See Also:
getAlignment(),setAlignment(Pos)
-
textAlignment
Specifies the behavior for lines of text when text is multiline. UnlikecontentDisplayProperty()which affects the graphic and text, this setting only affects multiple lines of text relative to the text bounds. -
textOverrun
Specifies the behavior to use if the text of theLabeledexceeds the available space for rendering the text.- See Also:
getTextOverrun(),setTextOverrun(OverrunStyle)
-
ellipsisString
Specifies the string to display for the ellipsis when text is truncated.Ellipsis Table Examples "..." Default value for most locales " . . . " " [...] " "\u2026" The Unicode ellipsis character '…' "" No ellipsis, just display the truncated string Note that not all fonts support all Unicode characters.
- Since:
- JavaFX 2.2
- See Also:
getEllipsisString(),setEllipsisString(String)
-
wrapText
If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.- See Also:
isWrapText(),setWrapText(boolean)
-
font
The default font to use for text in the Labeled. If the Label's text is rich text then this font may or may not be used depending on the font information embedded in the rich text, but in any case where a default font is required, this font will be used.- See Also:
getFont(),setFont(Font)
-
graphic
An optional icon for the Labeled. This can be positioned relative to the text by usingsetContentDisplay(javafx.scene.control.ContentDisplay). The node specified for this variable cannot appear elsewhere in the scene graph, otherwise theIllegalArgumentExceptionis thrown. See the class description ofNodefor more detail.- See Also:
getGraphic(),setGraphic(Node)
-
underline
Whether all text should be underlined.- See Also:
isUnderline(),setUnderline(boolean)
-
lineSpacing
Specifies the space in pixel between lines.- Since:
- JavaFX 8.0
- See Also:
getLineSpacing(),setLineSpacing(double)
-
contentDisplay
Specifies the positioning of the graphic relative to the text. -
labelPadding
The padding around the Labeled's text and graphic content. By default labelPadding is Insets.EMPTY and cannot be set to null. Subclasses may add nodes outside this padding and inside the Labeled's padding. This property can only be set from CSS.- See Also:
getLabelPadding()
-
graphicTextGap
The amount of space between the graphic and text- See Also:
getGraphicTextGap(),setGraphicTextGap(double)
-
textFill
ThePaintused to fill the text.- See Also:
getTextFill(),setTextFill(Paint)
-
mnemonicParsing
MnemonicParsing property to enable/disable text parsing. If this is set to true, then the Label text will be parsed to see if it contains the mnemonic parsing character '_'. When a mnemonic is detected the key combination will be determined based on the succeeding character, and the mnemonic added.The default value for Labeled is false, but it is enabled by default on some Controls.
- See Also:
isMnemonicParsing(),setMnemonicParsing(boolean)
-
-
Constructor Details
-
Method Details
-
textProperty
The text to display in the label. The text may be null.- See Also:
getText(),setText(String)
-
setText
Sets the value of the property text.- Property description:
- The text to display in the label. The text may be null.
-
getText
Gets the value of the property text.- Property description:
- The text to display in the label. The text may be null.
-
alignmentProperty
Specifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled.- See Also:
getAlignment(),setAlignment(Pos)
-
setAlignment
Sets the value of the property alignment.- Property description:
- Specifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled.
-
getAlignment
Gets the value of the property alignment.- Property description:
- Specifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled.
-
textAlignmentProperty
Specifies the behavior for lines of text when text is multiline. UnlikecontentDisplayProperty()which affects the graphic and text, this setting only affects multiple lines of text relative to the text bounds. -
setTextAlignment
Sets the value of the property textAlignment.- Property description:
- Specifies the behavior for lines of text when text is multiline.
Unlike
contentDisplayProperty()which affects the graphic and text, this setting only affects multiple lines of text relative to the text bounds.
-
getTextAlignment
Gets the value of the property textAlignment.- Property description:
- Specifies the behavior for lines of text when text is multiline.
Unlike
contentDisplayProperty()which affects the graphic and text, this setting only affects multiple lines of text relative to the text bounds.
-
textOverrunProperty
Specifies the behavior to use if the text of theLabeledexceeds the available space for rendering the text.- See Also:
getTextOverrun(),setTextOverrun(OverrunStyle)
-
setTextOverrun
Sets the value of the property textOverrun.- Property description:
- Specifies the behavior to use if the text of the
Labeledexceeds the available space for rendering the text.
-
getTextOverrun
Gets the value of the property textOverrun.- Property description:
- Specifies the behavior to use if the text of the
Labeledexceeds the available space for rendering the text.
-
ellipsisStringProperty
Specifies the string to display for the ellipsis when text is truncated.Ellipsis Table Examples "..." Default value for most locales " . . . " " [...] " "\u2026" The Unicode ellipsis character '…' "" No ellipsis, just display the truncated string Note that not all fonts support all Unicode characters.
- Since:
- JavaFX 2.2
- See Also:
getEllipsisString(),setEllipsisString(String)
-
setEllipsisString
Sets the value of the property ellipsisString.- Property description:
- Specifies the string to display for the ellipsis when text is truncated.
Ellipsis Table Examples "..." Default value for most locales " . . . " " [...] " "\u2026" The Unicode ellipsis character '…' "" No ellipsis, just display the truncated string Note that not all fonts support all Unicode characters.
- Since:
- JavaFX 2.2
-
getEllipsisString
Gets the value of the property ellipsisString.- Property description:
- Specifies the string to display for the ellipsis when text is truncated.
Ellipsis Table Examples "..." Default value for most locales " . . . " " [...] " "\u2026" The Unicode ellipsis character '…' "" No ellipsis, just display the truncated string Note that not all fonts support all Unicode characters.
- Since:
- JavaFX 2.2
-
wrapTextProperty
If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.- See Also:
isWrapText(),setWrapText(boolean)
-
setWrapText
public final void setWrapText(boolean value)Sets the value of the property wrapText.- Property description:
- If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.
-
isWrapText
public final boolean isWrapText()Gets the value of the property wrapText.- Property description:
- If a run of text exceeds the width of the Labeled, then this variable indicates whether the text should wrap onto another line.
-
getContentBias
If wrapText is true, then contentBias will be HORIZONTAL, otherwise it is null.- Overrides:
getContentBiasin classNode- Returns:
- orientation of width/height dependency or null if there is none
- See Also:
Node.isResizable(),Node.minWidth(double),Node.minHeight(double),Node.prefWidth(double),Node.prefHeight(double),Node.maxWidth(double),Node.maxHeight(double)
-
fontProperty
The default font to use for text in the Labeled. If the Label's text is rich text then this font may or may not be used depending on the font information embedded in the rich text, but in any case where a default font is required, this font will be used.- See Also:
getFont(),setFont(Font)
-
setFont
Sets the value of the property font.- Property description:
- The default font to use for text in the Labeled. If the Label's text is rich text then this font may or may not be used depending on the font information embedded in the rich text, but in any case where a default font is required, this font will be used.
-
getFont
Gets the value of the property font.- Property description:
- The default font to use for text in the Labeled. If the Label's text is rich text then this font may or may not be used depending on the font information embedded in the rich text, but in any case where a default font is required, this font will be used.
-
graphicProperty
An optional icon for the Labeled. This can be positioned relative to the text by usingsetContentDisplay(javafx.scene.control.ContentDisplay). The node specified for this variable cannot appear elsewhere in the scene graph, otherwise theIllegalArgumentExceptionis thrown. See the class description ofNodefor more detail.- See Also:
getGraphic(),setGraphic(Node)
-
setGraphic
Sets the value of the property graphic.- Property description:
- An optional icon for the Labeled. This can be positioned relative to the
text by using
setContentDisplay(javafx.scene.control.ContentDisplay). The node specified for this variable cannot appear elsewhere in the scene graph, otherwise theIllegalArgumentExceptionis thrown. See the class description ofNodefor more detail.
-
getGraphic
Gets the value of the property graphic.- Property description:
- An optional icon for the Labeled. This can be positioned relative to the
text by using
setContentDisplay(javafx.scene.control.ContentDisplay). The node specified for this variable cannot appear elsewhere in the scene graph, otherwise theIllegalArgumentExceptionis thrown. See the class description ofNodefor more detail.
-
underlineProperty
Whether all text should be underlined.- See Also:
isUnderline(),setUnderline(boolean)
-
setUnderline
public final void setUnderline(boolean value)Sets the value of the property underline.- Property description:
- Whether all text should be underlined.
-
isUnderline
public final boolean isUnderline()Gets the value of the property underline.- Property description:
- Whether all text should be underlined.
-
lineSpacingProperty
Specifies the space in pixel between lines.- Since:
- JavaFX 8.0
- See Also:
getLineSpacing(),setLineSpacing(double)
-
setLineSpacing
public final void setLineSpacing(double value)Sets the value of the property lineSpacing.- Property description:
- Specifies the space in pixel between lines.
- Since:
- JavaFX 8.0
-
getLineSpacing
public final double getLineSpacing()Gets the value of the property lineSpacing.- Property description:
- Specifies the space in pixel between lines.
- Since:
- JavaFX 8.0
-
contentDisplayProperty
Specifies the positioning of the graphic relative to the text. -
setContentDisplay
Sets the value of the property contentDisplay.- Property description:
- Specifies the positioning of the graphic relative to the text.
-
getContentDisplay
Gets the value of the property contentDisplay.- Property description:
- Specifies the positioning of the graphic relative to the text.
-
labelPaddingProperty
The padding around the Labeled's text and graphic content. By default labelPadding is Insets.EMPTY and cannot be set to null. Subclasses may add nodes outside this padding and inside the Labeled's padding. This property can only be set from CSS.- See Also:
getLabelPadding()
-
getLabelPadding
Gets the value of the property labelPadding.- Property description:
- The padding around the Labeled's text and graphic content. By default labelPadding is Insets.EMPTY and cannot be set to null. Subclasses may add nodes outside this padding and inside the Labeled's padding. This property can only be set from CSS.
-
graphicTextGapProperty
The amount of space between the graphic and text- See Also:
getGraphicTextGap(),setGraphicTextGap(double)
-
setGraphicTextGap
public final void setGraphicTextGap(double value)Sets the value of the property graphicTextGap.- Property description:
- The amount of space between the graphic and text
-
getGraphicTextGap
public final double getGraphicTextGap()Gets the value of the property graphicTextGap.- Property description:
- The amount of space between the graphic and text
-
setTextFill
Sets the value of the property textFill.- Property description:
- The
Paintused to fill the text.
-
getTextFill
Gets the value of the property textFill.- Property description:
- The
Paintused to fill the text.
-
textFillProperty
ThePaintused to fill the text.- See Also:
getTextFill(),setTextFill(Paint)
-
setMnemonicParsing
public final void setMnemonicParsing(boolean value)Sets the value of the property mnemonicParsing.- Property description:
- MnemonicParsing property to enable/disable text parsing.
If this is set to true, then the Label text will be
parsed to see if it contains the mnemonic parsing character '_'.
When a mnemonic is detected the key combination will
be determined based on the succeeding character, and the mnemonic
added.
The default value for Labeled is false, but it is enabled by default on some Controls.
-
isMnemonicParsing
public final boolean isMnemonicParsing()Gets the value of the property mnemonicParsing.- Property description:
- MnemonicParsing property to enable/disable text parsing.
If this is set to true, then the Label text will be
parsed to see if it contains the mnemonic parsing character '_'.
When a mnemonic is detected the key combination will
be determined based on the succeeding character, and the mnemonic
added.
The default value for Labeled is false, but it is enabled by default on some Controls.
-
mnemonicParsingProperty
MnemonicParsing property to enable/disable text parsing. If this is set to true, then the Label text will be parsed to see if it contains the mnemonic parsing character '_'. When a mnemonic is detected the key combination will be determined based on the succeeding character, and the mnemonic added.The default value for Labeled is false, but it is enabled by default on some Controls.
- See Also:
isMnemonicParsing(),setMnemonicParsing(boolean)
-
toString
Description copied from class:NodeReturns a string representation for the object. -
getInitialAlignment
Returns the initial alignment state of this control, for use by the JavaFX CSS engine to correctly set its initial value. This method is overridden to use Pos.CENTER_LEFT initially.- Returns:
- the initial alignment state of this control
- Since:
- 9
-
getClassCssMetaData
- Returns:
- The CssMetaData associated with this class, which may include the CssMetaData of its superclasses.
- Since:
- JavaFX 8.0
-
getControlCssMetaData
- Overrides:
getControlCssMetaDatain classControl- Returns:
- unmodifiable list of the controls css styleable properties
- Since:
- JavaFX 8.0
-