Spec-Zone .ru
спецификации, руководства, описания, API
|
@DefaultProperty(value="text") public class Text extends Shape
Text
class определяет узел, который выводит на экран текст. Абзацы разделяются '\n'
и текст обертывается на границах абзаца. import javafx.scene.text.*; Text t = new Text(10, 50, "This is a test"); t.setFont(new Font(20));
import javafx.scene.text.*; Text t = new Text(); text.setFont(new Font(20)); text.setText("First row\nSecond row");
import javafx.scene.text.*; Text t = new Text(); text.setFont(new Font(20)); text.setWrappingWidth(200); text.setTextAlignment(TextAlignment.JUSTIFY) text.setText("The quick brown fox jumps over the lazy dog");
Ввести | Свойство и Описание |
---|---|
ReadOnlyDoubleProperty |
baselineOffset
'Алфавитное' (или римлянин) базовое смещение от layoutBounds.minY расположения узла текста.
|
ObjectProperty<TextBoundsType> |
boundsType
Определяет, как границы текстового узла вычисляются.
|
ObjectProperty<Font> |
шрифт
Определяет шрифт текста.
|
ObjectProperty<FontSmoothingType> |
fontSmoothingType
Определяет требуемый тип сглаживания шрифта: серый или жидкокристаллический дисплей.
|
BooleanProperty |
перечеркнутый
Определяет, если у каждой строки текста должна быть строка через это.
|
ObjectProperty<TextAlignment> |
textAlignment
Определяет горизонтальное выравнивание текста в ограничивающем прямоугольнике.
|
ObjectProperty<VPos> |
textOrigin
Определяет источник текстовой системы координат в локальных координатах.
|
StringProperty |
текст
Определяет текстовую строку, которая должна быть выведена на экран.
|
BooleanProperty |
подчеркивание
Определяет, если у каждой строки текста должна быть строка ниже этого.
|
DoubleProperty |
wrappingWidth
Определяет ограничение width для текста в координатах пространства пользователя, например.
|
DoubleProperty |
x
Определяет X координат текстового источника.
|
DoubleProperty |
y
Определяет координату Y текстового источника.
|
fill, smooth, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, stroke, strokeType, strokeWidth
blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, 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, visible
Конструктор и Описание |
---|
Text()
Создает пустой экземпляр текста.
|
Text(double x, double y, java.lang.String text)
Создает экземпляр текста на данных координатах, содержащих данную строку.
|
Text(java.lang.String text)
Создает экземпляр текста, содержащего данную строку.
|
Модификатор и Тип | Метод и Описание |
---|---|
ReadOnlyDoubleProperty |
baselineOffsetProperty()
'Алфавитное' (или римлянин) базовое смещение от layoutBounds.minY расположения узла текста.
|
ObjectProperty<TextBoundsType> |
boundsTypeProperty()
Определяет, как границы текстового узла вычисляются.
|
ObjectProperty<Font> |
fontProperty()
Определяет шрифт текста.
|
ObjectProperty<FontSmoothingType> |
fontSmoothingTypeProperty()
Определяет требуемый тип сглаживания шрифта: серый или жидкокристаллический дисплей.
|
double |
getBaselineOffset()
Получает значение свойства baselineOffset.
|
TextBoundsType |
getBoundsType()
Получает значение свойства boundsType.
|
Шрифт |
getFont()
Получает значение шрифта свойства.
|
FontSmoothingType |
getFontSmoothingType()
Получает значение свойства fontSmoothingType.
|
java.lang.String |
getText()
Получает значение текста свойства.
|
TextAlignment |
getTextAlignment()
Получает значение свойства textAlignment.
|
VPos |
getTextOrigin()
Получает значение свойства textOrigin.
|
double |
getWrappingWidth()
Получает значение свойства wrappingWidth.
|
double |
getX()
Получает значение свойства x.
|
double |
getY()
Получает значение свойства y.
|
boolean |
isStrikethrough()
Получает значение перечеркнутого свойства.
|
boolean |
isUnderline()
Получает значение подчеркивания свойства.
|
void |
setBoundsType(TextBoundsType value)
Устанавливает значение свойства boundsType.
|
void |
setFont(Font value)
Устанавливает значение шрифта свойства.
|
void |
setFontSmoothingType(FontSmoothingType value)
Устанавливает значение свойства fontSmoothingType.
|
void |
setStrikethrough(boolean value)
Устанавливает значение перечеркнутого свойства.
|
void |
setText(java.lang.String value)
Устанавливает значение текста свойства.
|
void |
setTextAlignment(TextAlignment value)
Устанавливает значение свойства textAlignment.
|
void |
setTextOrigin(VPos value)
Устанавливает значение свойства textOrigin.
|
void |
setUnderline(boolean value)
Устанавливает значение подчеркивания свойства.
|
void |
setWrappingWidth(double value)
Устанавливает значение свойства wrappingWidth.
|
void |
setX(double value)
Устанавливает значение свойства x.
|
void |
setY(double value)
Устанавливает значение свойства y.
|
BooleanProperty |
strikethroughProperty()
Определяет, если у каждой строки текста должна быть строка через это.
|
ObjectProperty<TextAlignment> |
textAlignmentProperty()
Определяет горизонтальное выравнивание текста в ограничивающем прямоугольнике.
|
ObjectProperty<VPos> |
textOriginProperty()
Определяет источник текстовой системы координат в локальных координатах.
|
StringProperty |
textProperty()
Определяет текстовую строку, которая должна быть выведена на экран.
|
BooleanProperty |
underlineProperty()
Определяет, если у каждой строки текста должна быть строка ниже этого.
|
DoubleProperty |
wrappingWidthProperty()
Определяет ограничение width для текста в координатах пространства пользователя, например.
|
DoubleProperty |
xProperty()
Определяет X координат текстового источника.
|
DoubleProperty |
yProperty()
Определяет координату Y текстового источника.
|
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
addEventFilter, addEventHandler, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, 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, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getUserData, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToSceneTransformProperty, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, mouseTransparentProperty, 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, pickOnBoundsProperty, prefHeight, prefWidth, pressedProperty, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, visibleProperty
public final StringProperty textProperty
getText()
, setText(String)
public final DoubleProperty xProperty
getX()
, setX(double)
public final DoubleProperty yProperty
getY()
, setY(double)
public final ObjectProperty<Font> fontProperty
getFont()
, setFont(Font)
public final ObjectProperty<VPos> textOriginProperty
VPos.BASELINE
и VPos.TOP
определите источник верхнего ряда в то время как VPos.BOTTOM
определяет источник нижнего ряда.getTextOrigin()
, setTextOrigin(VPos)
public final ObjectProperty<TextBoundsType> boundsTypeProperty
TextBoundsType
для получения дополнительной информации.getBoundsType()
, setBoundsType(TextBoundsType)
public final DoubleProperty wrappingWidthProperty
> 0
текст будет строкой, обернутой как необходимый удовлетворить это ограничение.getWrappingWidth()
, setWrappingWidth(double)
public final BooleanProperty underlineProperty
isUnderline()
, setUnderline(boolean)
public final BooleanProperty strikethroughProperty
isStrikethrough()
, setStrikethrough(boolean)
public final ObjectProperty<TextAlignment> textAlignmentProperty
getTextAlignment()
, setTextAlignment(TextAlignment)
public final ReadOnlyDoubleProperty baselineOffsetProperty
getBaselineOffset()
public final ObjectProperty<FontSmoothingType> fontSmoothingTypeProperty
getFontSmoothingType()
, setFontSmoothingType(FontSmoothingType)
public Text()
public Text(java.lang.String text)
text
- текст, который будет содержаться в экземпляреpublic Text(double x, double y, java.lang.String text)
x
- горизонтальная позиция текстаy
- вертикальная позиция текстаtext
- текст, который будет содержаться в экземпляреpublic final void setText(java.lang.String value)
public final java.lang.String getText()
public final StringProperty textProperty()
getText()
, setText(String)
public final void setX(double value)
public final double getX()
public final DoubleProperty xProperty()
getX()
, setX(double)
public final void setY(double value)
public final double getY()
public final DoubleProperty yProperty()
getY()
, setY(double)
public final void setFont(Font value)
public final Font getFont()
public final ObjectProperty<Font> fontProperty()
getFont()
, setFont(Font)
public final void setTextOrigin(VPos value)
VPos.BASELINE
и VPos.TOP
определите источник верхнего ряда в то время как VPos.BOTTOM
определяет источник нижнего ряда.public final VPos getTextOrigin()
VPos.BASELINE
и VPos.TOP
определите источник верхнего ряда в то время как VPos.BOTTOM
определяет источник нижнего ряда.public final ObjectProperty<VPos> textOriginProperty()
VPos.BASELINE
и VPos.TOP
определите источник верхнего ряда в то время как VPos.BOTTOM
определяет источник нижнего ряда.getTextOrigin()
, setTextOrigin(VPos)
public final void setBoundsType(TextBoundsType value)
TextBoundsType
для получения дополнительной информации.public final TextBoundsType getBoundsType()
TextBoundsType
для получения дополнительной информации.public final ObjectProperty<TextBoundsType> boundsTypeProperty()
TextBoundsType
для получения дополнительной информации.getBoundsType()
, setBoundsType(TextBoundsType)
public final void setWrappingWidth(double value)
> 0
текст будет строкой, обернутой как необходимый удовлетворить это ограничение.public final double getWrappingWidth()
> 0
текст будет строкой, обернутой как необходимый удовлетворить это ограничение.public final DoubleProperty wrappingWidthProperty()
> 0
текст будет строкой, обернутой как необходимый удовлетворить это ограничение.getWrappingWidth()
, setWrappingWidth(double)
public final void setUnderline(boolean value)
public final boolean isUnderline()
public final BooleanProperty underlineProperty()
isUnderline()
, setUnderline(boolean)
public final void setStrikethrough(boolean value)
public final boolean isStrikethrough()
public final BooleanProperty strikethroughProperty()
isStrikethrough()
, setStrikethrough(boolean)
public final void setTextAlignment(TextAlignment value)
public final TextAlignment getTextAlignment()
public final ObjectProperty<TextAlignment> textAlignmentProperty()
getTextAlignment()
, setTextAlignment(TextAlignment)
public final double getBaselineOffset()
getBaselineOffset
в class Node
public final ReadOnlyDoubleProperty baselineOffsetProperty()
getBaselineOffset()
public final void setFontSmoothingType(FontSmoothingType value)
public final FontSmoothingType getFontSmoothingType()
public final ObjectProperty<FontSmoothingType> fontSmoothingTypeProperty()
getFontSmoothingType()
, setFontSmoothingType(FontSmoothingType)
Copyright (c) 2008, 2012, Oracle и/или его филиалы. Все права защищены. Использование подвергается