Package com.sun.javafx.scene.text
Interface TextLayout
public interface TextLayout
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionReturns the (logical) bounds of the layout minX is always zero minY is the ascent of the first line (negative) width the width of the widest line height the sum of all lines height Note that this width is different the wrapping width!boolean
setBoundsType
(int type) Sets the bounds type for the TextLayout.boolean
setContent
(String string, Object font) Sets the content for the TextLayout.boolean
setLineSpacing
(float spacing) Sets the line spacing for the TextLayout.boolean
setWrapWidth
(float wrapWidth) Sets the wrap width for the TextLayout.
-
Field Details
-
FLAGS_LINES_VALID
static final int FLAGS_LINES_VALID- See Also:
-
FLAGS_ANALYSIS_VALID
static final int FLAGS_ANALYSIS_VALID- See Also:
-
FLAGS_HAS_TABS
static final int FLAGS_HAS_TABS- See Also:
-
FLAGS_HAS_BIDI
static final int FLAGS_HAS_BIDI- See Also:
-
FLAGS_HAS_COMPLEX
static final int FLAGS_HAS_COMPLEX- See Also:
-
FLAGS_HAS_EMBEDDED
static final int FLAGS_HAS_EMBEDDED- See Also:
-
FLAGS_HAS_CJK
static final int FLAGS_HAS_CJK- See Also:
-
FLAGS_WRAPPED
static final int FLAGS_WRAPPED- See Also:
-
FLAGS_RTL_BASE
static final int FLAGS_RTL_BASE- See Also:
-
FLAGS_CACHED_UNDERLINE
static final int FLAGS_CACHED_UNDERLINE- See Also:
-
FLAGS_CACHED_STRIKETHROUGH
static final int FLAGS_CACHED_STRIKETHROUGH- See Also:
-
FLAGS_LAST
static final int FLAGS_LAST- See Also:
-
ANALYSIS_MASK
static final int ANALYSIS_MASK- See Also:
-
ALIGN_LEFT
static final int ALIGN_LEFT- See Also:
-
ALIGN_CENTER
static final int ALIGN_CENTER- See Also:
-
ALIGN_RIGHT
static final int ALIGN_RIGHT- See Also:
-
ALIGN_JUSTIFY
static final int ALIGN_JUSTIFY- See Also:
-
ALIGN_MASK
static final int ALIGN_MASK- See Also:
-
DIRECTION_LTR
static final int DIRECTION_LTR- See Also:
-
DIRECTION_RTL
static final int DIRECTION_RTL- See Also:
-
DIRECTION_DEFAULT_LTR
static final int DIRECTION_DEFAULT_LTR- See Also:
-
DIRECTION_DEFAULT_RTL
static final int DIRECTION_DEFAULT_RTL- See Also:
-
DIRECTION_MASK
static final int DIRECTION_MASK- See Also:
-
BOUNDS_CENTER
static final int BOUNDS_CENTER- See Also:
-
BOUNDS_MASK
static final int BOUNDS_MASK- See Also:
-
TYPE_TEXT
static final int TYPE_TEXT- See Also:
-
TYPE_UNDERLINE
static final int TYPE_UNDERLINE- See Also:
-
TYPE_STRIKETHROUGH
static final int TYPE_STRIKETHROUGH- See Also:
-
TYPE_BASELINE
static final int TYPE_BASELINE- See Also:
-
TYPE_TOP
static final int TYPE_TOP- See Also:
-
TYPE_BEARINGS
static final int TYPE_BEARINGS- See Also:
-
-
Method Details
-
setContent
Sets the content for the TextLayout. Shorthand for single span text (no rich text).- Returns:
- returns true is the call modifies the layout internal state.
-
setWrapWidth
boolean setWrapWidth(float wrapWidth) Sets the wrap width for the TextLayout.- Returns:
- returns true is the call modifies the layout internal state.
-
setLineSpacing
boolean setLineSpacing(float spacing) Sets the line spacing for the TextLayout.- Returns:
- returns true is the call modifies the layout internal state.
-
setBoundsType
boolean setBoundsType(int type) Sets the bounds type for the TextLayout.- Returns:
- returns true is the call modifies the layout internal state.
-
getBounds
BaseBounds getBounds()Returns the (logical) bounds of the layout minX is always zero minY is the ascent of the first line (negative) width the width of the widest line height the sum of all lines height Note that this width is different the wrapping width!- Returns:
- the layout bounds
-