public class Label extends Labeled
labelFor
property.
Label sets focusTraversable to false.
Example:
Label label = new Label("a label");
Type | Property and Description |
---|---|
<any> |
labelFor
A Label can act as a label for a different Control or
Node.
|
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, graphicProperty, graphicTextGapProperty, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, underlineProperty, wrapTextProperty
contextMenuProperty, skinClassNameProperty, skinProperty, tooltipProperty
Modifier and Type | Field and Description |
---|---|
private <any> |
labelFor |
private <any> |
mnemonicStateListener
*
Properties *
*
|
Constructor and Description |
---|
Label()
Creates an empty label
|
Label(java.lang.String text)
Creates Label with supplied text.
|
Label(java.lang.String text,
Node graphic)
Creates a Label with the supplied text and graphic.
|
Modifier and Type | Method and Description |
---|---|
protected Skin<?> |
createDefaultSkin()
Create a new instance of the default skin for this control.
|
protected java.lang.Boolean |
getInitialFocusTraversable()
Returns the initial focus traversable state of this control, for use
by the JavaFX CSS engine to correctly set its initial value.
|
Node |
getLabelFor()
Gets the value of the property labelFor.
|
private void |
initialize() |
<any> |
labelForProperty()
A Label can act as a label for a different Control or
Node.
|
void |
setLabelFor(Node value)
Sets the value of the property labelFor.
|
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getAlignment, getClassCssMetaData, getContentBias, getContentDisplay, getControlCssMetaData, getEllipsisString, getFont, getGraphic, getGraphicTextGap, getInitialAlignment, getLabelPadding, getLineSpacing, getText, getTextAlignment, getTextFill, getTextOverrun, graphicProperty, graphicTextGapProperty, isMnemonicParsing, isUnderline, isWrapText, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, setAlignment, setContentDisplay, setEllipsisString, setFont, setGraphic, setGraphicTextGap, setLineSpacing, setMnemonicParsing, setText, setTextAlignment, setTextFill, setTextOverrun, setUnderline, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, toString, underlineProperty, wrapTextProperty
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getControlChildren, getCssMetaData, getSkin, getTooltip, isResizable, layoutChildren, loadSkinClass, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipProperty
public <any> labelForProperty
getLabelFor()
,
setLabelFor(Node)
private <any> mnemonicStateListener
private <any> labelFor
public Label()
public Label(java.lang.String text)
text
- null text is treated as the empty stringpublic Label(java.lang.String text, Node graphic)
text
- null text is treated as the empty stringgraphic
- a null graphic is acceptableprivate void initialize()
public <any> labelForProperty()
getLabelFor()
,
setLabelFor(Node)
public final void setLabelFor(Node value)
public final Node getLabelFor()
protected Skin<?> createDefaultSkin()
-fx-skin
or set explicitly in a sub-class with setSkin(...)
.createDefaultSkin
in class Control
protected java.lang.Boolean getInitialFocusTraversable()
getInitialFocusTraversable
in class Control