- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- javafx.scene.control.Labeled
-
- すべての実装されたインタフェース:
Styleable
,EventTarget
,Skinnable
- 直系の既知のサブクラス:
ButtonBase
,Cell
,Label
,TitledPane
@DefaultProperty("text") public abstract class Labeled extends Control
ラベル付けされたControl
は、ユーザー・インタフェースの一部として関連付けられたテキスト・コンテンツを持ちます。 たとえば、Button
にはLabel
やTooltip
などその他の多くのコントロールと同様に、text
が表示されます。また、Labeledは便利なベース・クラスでもあり、読取り専用のテキスト・コンテンツがUIの一部として表示される新しいコントロールを構築するときに、このクラスをベースに拡張できます。
テキストの上にグラフィックを配置する方法の例を次に示します。
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);
- 導入されたバージョン:
- JavaFX 2.0
- 関連項目:
Button
、Label
、ToggleButton
-
-
プロパティのサマリー
プロパティ Type プロパティ 説明 ObjectProperty<Pos>
alignment
ラベル表示内に空きスペースがある場合の、ラベル表示内のテキストとグラフィックを位置合せする方法を指定します。ObjectProperty<ContentDisplay>
contentDisplay
テキストに対するグラフィックの相対的な位置決めを指定します。StringProperty
ellipsisString
テキストが切り捨てられた場合に楕円に表示する文字列を指定します。ObjectProperty<Font>
font
ラベル表示内のテキストに使用するデフォルト・フォント。ObjectProperty<Node>
graphic
ラベル表示のオプション・アイコン。DoubleProperty
graphicTextGap
グラフィックとテキストの間の総スペースReadOnlyObjectProperty<Insets>
labelPadding
ラベル表示のテキストおよびグラフィックのコンテンツ周辺の余白。DoubleProperty
lineSpacing
行間のピクセル単位の空間を指定します。BooleanProperty
mnemonicParsing
テキストの解析を有効/無効にするMnemonicParsingプロパティ。ObjectProperty<TextAlignment>
textAlignment
テキストが複数行の場合のテキストの行の動作を指定します。グラフィックとテキストに作用するcontentDisplayProperty()
とは異なり、この設定は複数行のテキストのみに、テキスト境界に対して相対的に作用します。ObjectProperty<Paint>
textFill
テキストを入力するために使用されるPaint
。ObjectProperty<OverrunStyle>
textOverrun
Labeled
のテキストが、テキストのレンダリングに使用できるスペースを超過した場合に使用する動作を指定します。StringProperty
text
ラベルに表示するテキスト。BooleanProperty
underline
すべてのテキストに下線を付けるかどうか。BooleanProperty
wrapText
テキストの長さがラベル表示の幅を超える場合に、テキストを別の行に折り返すかどうかをこの変数で示します。-
クラス javafx.scene.control.Controlから継承されたプロパティ
contextMenu、skin、tooltip
-
クラス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
-
クラス javafx.scene.Parentから継承されたプロパティ
needsLayout
-
クラス javafx.scene.layout.Regionから継承されたプロパティ
background、border、cacheShape、centerShape、height、insets、maxHeight、maxWidth、minHeight、minWidth、opaqueInsets、padding、prefHeight、prefWidth、scaleShape、shape、snapToPixel、width
-
-
フィールドのサマリー
-
クラスjavafx.scene.Nodeから継承されたフィールド
BASELINE_OFFSET_SAME_AS_HEIGHT
-
クラス javafx.scene.layout.Regionから継承されたフィールド
USE_COMPUTED_SIZE、USE_PREF_SIZE
-
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 ObjectProperty<Pos>
alignmentProperty()
ラベル表示内に空きスペースがある場合の、ラベル表示内のテキストとグラフィックを位置合せする方法を指定します。ObjectProperty<ContentDisplay>
contentDisplayProperty()
テキストに対するグラフィックの相対的な位置決めを指定します。StringProperty
ellipsisStringProperty()
テキストが切り捨てられた場合に楕円に表示する文字列を指定します。ObjectProperty<Font>
fontProperty()
ラベル表示内のテキストに使用するデフォルト・フォント。Pos
getAlignment()
プロパティalignmentの値を取得します。static List<CssMetaData<? extends Styleable,?>>
getClassCssMetaData()
Orientation
getContentBias()
wrapTextがtrueの場合はcontentBiasはHORIZONTALになり、そうでない場合はnullです。ContentDisplay
getContentDisplay()
プロパティcontentDisplayの値を取得します。List<CssMetaData<? extends Styleable,?>>
getControlCssMetaData()
String
getEllipsisString()
プロパティellipsisStringの値を取得します。Font
getFont()
プロパティfontの値を取得します。Node
getGraphic()
プロパティgraphicの値を取得します。double
getGraphicTextGap()
プロパティgraphicTextGapの値を取得します。protected Pos
getInitialAlignment()
JavaFX CSSエンジンが初期値を正しく設定するために使用する、このコントロールの初期整列状態を返します。Insets
getLabelPadding()
プロパティlabelPaddingの値を取得します。double
getLineSpacing()
プロパティlineSpacingの値を取得します。String
getText()
プロパティtextの値を取得します。TextAlignment
getTextAlignment()
プロパティtextAlignmentの値を取得します。Paint
getTextFill()
プロパティtextFillの値を取得します。OverrunStyle
getTextOverrun()
プロパティtextOverrunの値を取得します。ObjectProperty<Node>
graphicProperty()
ラベル表示のオプション・アイコン。DoubleProperty
graphicTextGapProperty()
グラフィックとテキストの間の総スペースboolean
isMnemonicParsing()
プロパティmnemonicParsingの値を取得します。boolean
isUnderline()
プロパティunderlineの値を取得します。boolean
isWrapText()
プロパティwrapTextの値を取得します。ReadOnlyObjectProperty<Insets>
labelPaddingProperty()
ラベル表示のテキストおよびグラフィックのコンテンツ周辺の余白。DoubleProperty
lineSpacingProperty()
行間のピクセル単位の空間を指定します。BooleanProperty
mnemonicParsingProperty()
テキストの解析を有効/無効にするMnemonicParsingプロパティ。void
setAlignment(Pos value)
プロパティalignmentの値を設定します。void
setContentDisplay(ContentDisplay value)
プロパティcontentDisplayの値を設定します。void
setEllipsisString(String value)
プロパティellipsisStringの値を設定します。void
setFont(Font value)
プロパティfontの値を設定します。void
setGraphic(Node value)
プロパティgraphicの値を設定します。void
setGraphicTextGap(double value)
プロパティgraphicTextGapの値を設定します。void
setLineSpacing(double value)
プロパティlineSpacingの値を設定します。void
setMnemonicParsing(boolean value)
プロパティmnemonicParsingの値を設定します。void
setText(String value)
プロパティtextの値を設定します。void
setTextAlignment(TextAlignment value)
プロパティtextAlignmentの値を設定します。void
setTextFill(Paint value)
プロパティtextFillの値を設定します。void
setTextOverrun(OverrunStyle value)
プロパティtextOverrunの値を設定します。void
setUnderline(boolean value)
プロパティunderlineの値を設定します。void
setWrapText(boolean value)
プロパティwrapTextの値を設定します。ObjectProperty<TextAlignment>
textAlignmentProperty()
テキストが複数行の場合のテキストの行の動作を指定します。グラフィックとテキストに作用するcontentDisplayProperty()
とは異なり、この設定は複数行のテキストのみに、テキスト境界に対して相対的に作用します。ObjectProperty<Paint>
textFillProperty()
テキストを入力するために使用されるPaint
。ObjectProperty<OverrunStyle>
textOverrunProperty()
Labeled
のテキストが、テキストのレンダリングに使用できるスペースを超過した場合に使用する動作を指定します。StringProperty
textProperty()
ラベルに表示するテキスト。String
toString()
オブジェクトの文字列表現を返します。BooleanProperty
underlineProperty()
すべてのテキストに下線を付けるかどうか。BooleanProperty
wrapTextProperty()
テキストの長さがラベル表示の幅を超える場合に、テキストを別の行に折り返すかどうかをこの変数で示します。-
クラス 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, tooltipProperty
-
クラス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
-
クラス java.lang.Objectから継承されたメソッド
clone、equals、finalize、getClass、hashCode、notify、notifyAll、wait、wait、wait
-
クラス javafx.scene.Parentから継承されたメソッド
getChildren、getChildrenUnmodifiable、getManagedChildren、getStylesheets、isNeedsLayout、layout、lookup、needsLayoutProperty、requestLayout、requestParentLayout、setNeedsLayout、updateBounds
-
クラス 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, widthProperty
-
インタフェース javafx.css.Styleableから継承されたメソッド
getStyleableNode
-
-
-
-
プロパティの詳細
-
text
public final StringProperty textProperty
ラベルに表示するテキスト。 テキストはnullになる場合があります。- 関連項目:
getText()
、setText(String)
-
位置合せ
public final ObjectProperty<Pos> alignmentProperty
ラベル表示内に空きスペースがある場合の、ラベル表示内のテキストとグラフィックを位置合せする方法を指定します。
-
textAlignment
public final ObjectProperty<TextAlignment> textAlignmentProperty
テキストが複数行の場合のテキストの行の動作を指定します。グラフィックとテキストに作用するcontentDisplayProperty()
とは異なり、この設定は複数行のテキストのみに、テキスト境界に対して相対的に作用します。
-
textOverrun
public final ObjectProperty<OverrunStyle> textOverrunProperty
Labeled
のテキストが、テキストのレンダリングに使用できるスペースを超過した場合に使用する動作を指定します。
-
ellipsisString
public final StringProperty ellipsisStringProperty
テキストが切り捨てられた場合に楕円に表示する文字列を指定します。省略記号表 例 "..." ほとんどのロケールのデフォルト値 " . . . " " [...] " "\u2026" Unicodeの省略記号'…' "" 省略記号はなく、切り捨てられた文字列を表示するだけです フォントによっては、必ずしもすべてのUnicode文字がサポートされないことに注意してください。
- 導入されたバージョン:
- JavaFX 2.2
- 関連項目:
getEllipsisString()
、setEllipsisString(String)
-
wrapText
public final BooleanProperty wrapTextProperty
テキストの長さがラベル表示の幅を超える場合に、テキストを別の行に折り返すかどうかをこの変数で示します。
-
font
public final ObjectProperty<Font> fontProperty
ラベル表示内のテキストに使用するデフォルト・フォント。 ラベルのテキストがリッチ・テキストである場合、このフォントを使用できるかどうかはリッチ・テキストに埋め込まれたフォント情報に応じて異なりますが、デフォルトのフォントが要求された場合は、常にこのフォントが使用されます。- 関連項目:
getFont()
、setFont(Font)
-
graphic
public final ObjectProperty<Node> graphicProperty
ラベル表示のオプション・アイコン。 これは、setContentDisplay(javafx.scene.control.ContentDisplay)
を使用して、テキストに対して相対的に配置できます。 この変数用に指定されているノードは、シーングラフのどこにも使用できません。使用した場合、IllegalArgumentException
がスローされます。 詳細は、Node
のクラスの説明を参照してください。- 関連項目:
getGraphic()
、setGraphic(Node)
-
underline
public final BooleanProperty underlineProperty
すべてのテキストに下線を付けるかどうか。
-
lineSpacing
public final DoubleProperty lineSpacingProperty
行間のピクセル単位の空間を指定します。- 導入されたバージョン:
- JavaFX 8.0
- 関連項目:
getLineSpacing()
、setLineSpacing(double)
-
contentDisplay
public final ObjectProperty<ContentDisplay> contentDisplayProperty
テキストに対するグラフィックの相対的な位置決めを指定します。
-
labelPadding
public final ReadOnlyObjectProperty<Insets> labelPaddingProperty
ラベル表示のテキストおよびグラフィックのコンテンツ周辺の余白。 labelPaddingはデフォルトではInsets.EMPTYで、nullに設定することはできません。 サブクラスによって、この余白の外側とLabeledの余白の内側にノードが追加される場合があります。 このプロパティは、CSSからのみ設定できます。- 関連項目:
getLabelPadding()
-
graphicTextGap
public final DoubleProperty graphicTextGapProperty
グラフィックとテキストの間の総スペース
-
textFill
public final ObjectProperty<Paint> textFillProperty
テキストを入力するために使用されるPaint
。
-
mnemonicParsing
public final BooleanProperty mnemonicParsingProperty
テキストの解析を有効/無効にするMnemonicParsingプロパティ。 これがtrueに設定されている場合、Labelのテキストが解析され、テキストにニーモニック解析文字「_」が含まれているかどうかが確認されます。 ニーモニックが検出されると、キーの組合せが後続の文字に基づいて決定され、ニーモニックが追加されます。Labeledのデフォルト値はfalseですが、一部のコントロールではデフォルトで有効になっています。
-
-
メソッドの詳細
-
textProperty
public final StringProperty textProperty()
ラベルに表示するテキスト。 テキストはnullになる場合があります。- 関連項目:
getText()
、setText(String)
-
setText
public final void setText(String value)
プロパティtextの値を設定します。- プロパティの説明:
- ラベルに表示するテキスト。 テキストはnullになる場合があります。
-
getText
public final String getText()
プロパティtextの値を取得します。- プロパティの説明:
- ラベルに表示するテキスト。 テキストはnullになる場合があります。
-
alignmentProperty
public final ObjectProperty<Pos> alignmentProperty()
ラベル表示内に空きスペースがある場合の、ラベル表示内のテキストとグラフィックを位置合せする方法を指定します。
-
setAlignment
public final void setAlignment(Pos value)
プロパティalignmentの値を設定します。- プロパティの説明:
- ラベル表示内に空きスペースがある場合の、ラベル表示内のテキストとグラフィックを位置合せする方法を指定します。
-
getAlignment
public final Pos getAlignment()
プロパティalignmentの値を取得します。- プロパティの説明:
- ラベル表示内に空きスペースがある場合の、ラベル表示内のテキストとグラフィックを位置合せする方法を指定します。
-
textAlignmentProperty
public final ObjectProperty<TextAlignment> textAlignmentProperty()
テキストが複数行の場合のテキストの行の動作を指定します。グラフィックとテキストに作用するcontentDisplayProperty()
とは異なり、この設定は複数行のテキストのみに、テキスト境界に対して相対的に作用します。
-
setTextAlignment
public final void setTextAlignment(TextAlignment value)
プロパティtextAlignmentの値を設定します。- プロパティの説明:
- テキストが複数行の場合のテキストの行の動作を指定します。グラフィックとテキストに作用する
contentDisplayProperty()
とは異なり、この設定は複数行のテキストのみに、テキスト境界に対して相対的に作用します。
-
getTextAlignment
public final TextAlignment getTextAlignment()
プロパティtextAlignmentの値を取得します。- プロパティの説明:
- テキストが複数行の場合のテキストの行の動作を指定します。グラフィックとテキストに作用する
contentDisplayProperty()
とは異なり、この設定は複数行のテキストのみに、テキスト境界に対して相対的に作用します。
-
textOverrunProperty
public final ObjectProperty<OverrunStyle> textOverrunProperty()
Labeled
のテキストが、テキストのレンダリングに使用できるスペースを超過した場合に使用する動作を指定します。
-
setTextOverrun
public final void setTextOverrun(OverrunStyle value)
プロパティtextOverrunの値を設定します。- プロパティの説明:
Labeled
のテキストが、テキストのレンダリングに使用できるスペースを超過した場合に使用する動作を指定します。
-
getTextOverrun
public final OverrunStyle getTextOverrun()
プロパティtextOverrunの値を取得します。- プロパティの説明:
Labeled
のテキストが、テキストのレンダリングに使用できるスペースを超過した場合に使用する動作を指定します。
-
ellipsisStringProperty
public final StringProperty ellipsisStringProperty()
テキストが切り捨てられた場合に楕円に表示する文字列を指定します。省略記号表 例 "..." ほとんどのロケールのデフォルト値 " . . . " " [...] " "\u2026" Unicodeの省略記号'…' "" 省略記号はなく、切り捨てられた文字列を表示するだけです フォントによっては、必ずしもすべてのUnicode文字がサポートされないことに注意してください。
- 導入されたバージョン:
- JavaFX 2.2
- 関連項目:
getEllipsisString()
、setEllipsisString(String)
-
setEllipsisString
public final void setEllipsisString(String value)
プロパティellipsisStringの値を設定します。- プロパティの説明:
- テキストが切り捨てられた場合に楕円に表示する文字列を指定します。
省略記号表 例 "..." ほとんどのロケールのデフォルト値 " . . . " " [...] " "\u2026" Unicodeの省略記号'…' "" 省略記号はなく、切り捨てられた文字列を表示するだけです フォントによっては、必ずしもすべてのUnicode文字がサポートされないことに注意してください。
- 導入されたバージョン:
- JavaFX 2.2
-
getEllipsisString
public final String getEllipsisString()
プロパティellipsisStringの値を取得します。- プロパティの説明:
- テキストが切り捨てられた場合に楕円に表示する文字列を指定します。
省略記号表 例 "..." ほとんどのロケールのデフォルト値 " . . . " " [...] " "\u2026" Unicodeの省略記号'…' "" 省略記号はなく、切り捨てられた文字列を表示するだけです フォントによっては、必ずしもすべてのUnicode文字がサポートされないことに注意してください。
- 導入されたバージョン:
- JavaFX 2.2
-
wrapTextProperty
public final BooleanProperty wrapTextProperty()
テキストの長さがラベル表示の幅を超える場合に、テキストを別の行に折り返すかどうかをこの変数で示します。
-
setWrapText
public final void setWrapText(boolean value)
プロパティwrapTextの値を設定します。- プロパティの説明:
- テキストの長さがラベル表示の幅を超える場合に、テキストを別の行に折り返すかどうかをこの変数で示します。
-
isWrapText
public final boolean isWrapText()
プロパティwrapTextの値を取得します。- プロパティの説明:
- テキストの長さがラベル表示の幅を超える場合に、テキストを別の行に折り返すかどうかをこの変数で示します。
-
getContentBias
public Orientation getContentBias()
wrapTextがtrueの場合はcontentBiasはHORIZONTALになり、そうでない場合はnullです。- オーバーライド:
getContentBias
、クラス:Node
- 戻り値:
- 幅/高さの依存関係の方向またはnull (依存関係がない場合)
- 関連項目:
Node.isResizable()
、Node.minWidth(double)
、Node.minHeight(double)
、Node.prefWidth(double)
、Node.prefHeight(double)
、Node.maxWidth(double)
、Node.maxHeight(double)
-
fontProperty
public final ObjectProperty<Font> fontProperty()
ラベル表示内のテキストに使用するデフォルト・フォント。 ラベルのテキストがリッチ・テキストである場合、このフォントを使用できるかどうかはリッチ・テキストに埋め込まれたフォント情報に応じて異なりますが、デフォルトのフォントが要求された場合は、常にこのフォントが使用されます。- 関連項目:
getFont()
、setFont(Font)
-
setFont
public final void setFont(Font value)
プロパティfontの値を設定します。- プロパティの説明:
- ラベル表示内のテキストに使用するデフォルト・フォント。 ラベルのテキストがリッチ・テキストである場合、このフォントを使用できるかどうかはリッチ・テキストに埋め込まれたフォント情報に応じて異なりますが、デフォルトのフォントが要求された場合は、常にこのフォントが使用されます。
-
getFont
public final Font getFont()
プロパティfontの値を取得します。- プロパティの説明:
- ラベル表示内のテキストに使用するデフォルト・フォント。 ラベルのテキストがリッチ・テキストである場合、このフォントを使用できるかどうかはリッチ・テキストに埋め込まれたフォント情報に応じて異なりますが、デフォルトのフォントが要求された場合は、常にこのフォントが使用されます。
-
graphicProperty
public final ObjectProperty<Node> graphicProperty()
ラベル表示のオプション・アイコン。 これは、setContentDisplay(javafx.scene.control.ContentDisplay)
を使用して、テキストに対して相対的に配置できます。 この変数用に指定されているノードは、シーングラフのどこにも使用できません。使用した場合、IllegalArgumentException
がスローされます。 詳細は、Node
のクラスの説明を参照してください。- 関連項目:
getGraphic()
、setGraphic(Node)
-
setGraphic
public final void setGraphic(Node value)
プロパティgraphicの値を設定します。- プロパティの説明:
- ラベル表示のオプション・アイコン。 これは、
setContentDisplay(javafx.scene.control.ContentDisplay)
を使用して、テキストに対して相対的に配置できます。 この変数用に指定されているノードは、シーングラフのどこにも使用できません。使用した場合、IllegalArgumentException
がスローされます。 詳細は、Node
のクラスの説明を参照してください。
-
getGraphic
public final Node getGraphic()
プロパティgraphicの値を取得します。- プロパティの説明:
- ラベル表示のオプション・アイコン。 これは、
setContentDisplay(javafx.scene.control.ContentDisplay)
を使用して、テキストに対して相対的に配置できます。 この変数用に指定されているノードは、シーングラフのどこにも使用できません。使用した場合、IllegalArgumentException
がスローされます。 詳細は、Node
のクラスの説明を参照してください。
-
underlineProperty
public final BooleanProperty underlineProperty()
すべてのテキストに下線を付けるかどうか。
-
setUnderline
public final void setUnderline(boolean value)
プロパティunderlineの値を設定します。- プロパティの説明:
- すべてのテキストに下線を付けるかどうか。
-
isUnderline
public final boolean isUnderline()
プロパティunderlineの値を取得します。- プロパティの説明:
- すべてのテキストに下線を付けるかどうか。
-
lineSpacingProperty
public final DoubleProperty lineSpacingProperty()
行間のピクセル単位の空間を指定します。- 導入されたバージョン:
- JavaFX 8.0
- 関連項目:
getLineSpacing()
、setLineSpacing(double)
-
setLineSpacing
public final void setLineSpacing(double value)
プロパティlineSpacingの値を設定します。- プロパティの説明:
- 行間のピクセル単位の空間を指定します。
- 導入されたバージョン:
- JavaFX 8.0
-
getLineSpacing
public final double getLineSpacing()
プロパティlineSpacingの値を取得します。- プロパティの説明:
- 行間のピクセル単位の空間を指定します。
- 導入されたバージョン:
- JavaFX 8.0
-
contentDisplayProperty
public final ObjectProperty<ContentDisplay> contentDisplayProperty()
テキストに対するグラフィックの相対的な位置決めを指定します。
-
setContentDisplay
public final void setContentDisplay(ContentDisplay value)
プロパティcontentDisplayの値を設定します。- プロパティの説明:
- テキストに対するグラフィックの相対的な位置決めを指定します。
-
getContentDisplay
public final ContentDisplay getContentDisplay()
プロパティcontentDisplayの値を取得します。- プロパティの説明:
- テキストに対するグラフィックの相対的な位置決めを指定します。
-
labelPaddingProperty
public final ReadOnlyObjectProperty<Insets> labelPaddingProperty()
ラベル表示のテキストおよびグラフィックのコンテンツ周辺の余白。 labelPaddingはデフォルトではInsets.EMPTYで、nullに設定することはできません。 サブクラスによって、この余白の外側とLabeledの余白の内側にノードが追加される場合があります。 このプロパティは、CSSからのみ設定できます。- 関連項目:
getLabelPadding()
-
getLabelPadding
public final Insets getLabelPadding()
プロパティlabelPaddingの値を取得します。- プロパティの説明:
- ラベル表示のテキストおよびグラフィックのコンテンツ周辺の余白。 labelPaddingはデフォルトではInsets.EMPTYで、nullに設定することはできません。 サブクラスによって、この余白の外側とLabeledの余白の内側にノードが追加される場合があります。 このプロパティは、CSSからのみ設定できます。
-
graphicTextGapProperty
public final DoubleProperty graphicTextGapProperty()
グラフィックとテキストの間の総スペース
-
setGraphicTextGap
public final void setGraphicTextGap(double value)
プロパティgraphicTextGapの値を設定します。- プロパティの説明:
- グラフィックとテキストの間の総スペース
-
getGraphicTextGap
public final double getGraphicTextGap()
プロパティgraphicTextGapの値を取得します。- プロパティの説明:
- グラフィックとテキストの間の総スペース
-
setTextFill
public final void setTextFill(Paint value)
プロパティtextFillの値を設定します。- プロパティの説明:
- テキストを入力するために使用される
Paint
。
-
getTextFill
public final Paint getTextFill()
プロパティtextFillの値を取得します。- プロパティの説明:
- テキストを入力するために使用される
Paint
。
-
textFillProperty
public final ObjectProperty<Paint> textFillProperty()
テキストを入力するために使用されるPaint
。
-
setMnemonicParsing
public final void setMnemonicParsing(boolean value)
プロパティmnemonicParsingの値を設定します。- プロパティの説明:
- テキストの解析を有効/無効にするMnemonicParsingプロパティ。 これがtrueに設定されている場合、Labelのテキストが解析され、テキストにニーモニック解析文字「_」が含まれているかどうかが確認されます。 ニーモニックが検出されると、キーの組合せが後続の文字に基づいて決定され、ニーモニックが追加されます。
Labeledのデフォルト値はfalseですが、一部のコントロールではデフォルトで有効になっています。
-
isMnemonicParsing
public final boolean isMnemonicParsing()
プロパティmnemonicParsingの値を取得します。- プロパティの説明:
- テキストの解析を有効/無効にするMnemonicParsingプロパティ。 これがtrueに設定されている場合、Labelのテキストが解析され、テキストにニーモニック解析文字「_」が含まれているかどうかが確認されます。 ニーモニックが検出されると、キーの組合せが後続の文字に基づいて決定され、ニーモニックが追加されます。
Labeledのデフォルト値はfalseですが、一部のコントロールではデフォルトで有効になっています。
-
mnemonicParsingProperty
public final BooleanProperty mnemonicParsingProperty()
テキストの解析を有効/無効にするMnemonicParsingプロパティ。 これがtrueに設定されている場合、Labelのテキストが解析され、テキストにニーモニック解析文字「_」が含まれているかどうかが確認されます。 ニーモニックが検出されると、キーの組合せが後続の文字に基づいて決定され、ニーモニックが追加されます。Labeledのデフォルト値はfalseですが、一部のコントロールではデフォルトで有効になっています。
-
getInitialAlignment
protected Pos getInitialAlignment()
JavaFX CSSエンジンが初期値を正しく設定するために使用する、このコントロールの初期整列状態を返します。 このメソッドは、最初はPos.CENTER_LEFTを使用するようにオーバーライドされています。- 戻り値:
- このコントロールの初期の整列状態
- 導入されたバージョン:
- 9
-
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
- 戻り値:
- このクラスに関連付けられたCssMetaData。スーパークラスのCssMetaDataを含むことがあります。
- 導入されたバージョン:
- JavaFX 8.0
-
getControlCssMetaData
public List<CssMetaData<? extends Styleable,?>> getControlCssMetaData()
- オーバーライド:
getControlCssMetaData
、クラス:Control
- 戻り値:
- コントロールのCSSでスタイル設定可能なプロパティの変更不可能なリスト
- 導入されたバージョン:
- JavaFX 8.0
-
-