Typically, a TextCell contains a TextFlow with styled text (and possibly inline Nodes). It is also possible to create a TextCell containing a single Region (which can be a Node of any complexity, even including a different instance of RichTextArea). These Regions will be presented as is, and, for editable models, would not be editable via the RichTextArea mechanisms.
Each visible TextCell will be resized horizontally to fill the available width and then resized vertically according to its preferred size for that width.
| Modifier and Type | Class and Description |
|---|---|
| private static class | TextCell.
Decoration run spans multiple segments. |
| private static class | TextCell.
keeps track of coalesced decorated runs |
| Modifier and Type | Field and Description |
|---|---|
| private List | |
| private final Region | |
| private TextCell. | |
| private boolean | |
| private double | |
| private final int | |
| private double | |
| private double |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | addHighlight(int
start offset for the range start, int end offset for the range end, Color highlight color color)Highlights the specified text range. |
| public void | addHighlight(int
start offset for the range start, int end offset for the range end, String... CSS style names styles)Highlights the specified text range, using style names. |
| public void | |
| public void | addWavyUnderline(int
start offset for the range start, int end offset for the range end, Color highlight color color)Underlines the specified text range with wavy underline (as typically used by a spell checker). |
| public void | addWavyUnderline(int
start offset for the range start, int end offset for the range end, String... CSS style names styles)Underlines the specified text range with wavy underline (as typically used by a spell checker), using style names. |
| public void | |
| private void | |
| public void | |
| public double | |
| private TextFlow | |
| public PathElement[] | Returns: the array of path elements translated to the target coordinatesthe Region that provides the target frame of reference target, int the character index charIndex, boolean the character bias leading)Returns the |
| public double | |
| public double | |
| public final Region | |
| public final int | |
| public double | Returns: the line spacingReturns line spacing if the content is a |
| public PathElement[] | Returns: the array of path elements translated to the target coordinatesthe Region that provides the target frame of reference target, int the start offset start, int the end offset end)Returns the |
| public int | |
| private RangeInfo | |
| public PathElement[] | Returns: the array of path elements translated to the target coordinatesthe Region that provides the target frame of reference target, int the start offset start, int the end offset end)Returns the |
| public double | Returns: y coordinate relative to originValid only when cell is obtained from the arrangement. |
| public boolean | |
| public Integer | |
| public Integer | Returns: the line offsetthe line index line)Returns the line end offset of the given line index. |
| public Integer | Returns: the line indexthe character offset offset)Returns the line index of the given character offset. |
| public Integer | Returns: the line start offsetthe line index line)Returns the line start offset of the given line index. |
| public void | requestLayout()
Overrides javafx. Requests a layout pass to be performed before the next scene is rendered. |
| public void | |
| public void | |
| public void | |
| pack-priv void | setPosition(double y, double height)
sets cell position along the y axis of this cell in VFlow coordinates |
| private static TextFlow | |
| public void |
| clients | back to summary |
|---|---|
| private List<RequiresComplexLayout> clients | |
| content | back to summary |
|---|---|
| private final Region content | |
| decorator | back to summary |
|---|---|
| private TextCell. | |
| embedsNode | back to summary |
|---|---|
| private boolean embedsNode | |
| height | back to summary |
|---|---|
| private double height | |
| index | back to summary |
|---|---|
| private final int index | |
| width | back to summary |
|---|---|
| private double width | |
| y | back to summary |
|---|---|
| private double y | |
| TextCell | back to summary |
|---|---|
| public TextCell(int index, Region content, boolean embedsNode) Creates a text cell with the specified
| |
| TextCell | back to summary |
|---|---|
| public TextCell(int index) Creates a text cell with
| |
| add | back to summary |
|---|---|
| public void add(Node node) Adds a non-text node to the text flow.
| |
| addBoxOutline | back to summary |
|---|---|
| public void addBoxOutline(FxPathBuilder b, double x, double w, double h) | |
| addHighlight | back to summary |
|---|---|
| public void addHighlight(int start, int end, Color color) Highlights the specified text range.
| |
| addHighlight | back to summary |
|---|---|
| public void addHighlight(int start, int end, String... styles) Highlights the specified text range, using style names.
| |
| addTextSegment | back to summary |
|---|---|
| public void addTextSegment(Text t) Adds a text segment to the text flow.
| |
| addWavyUnderline | back to summary |
|---|---|
| public void addWavyUnderline(int start, int end, Color color) Underlines the specified text range with wavy underline (as typically used by a spell checker).
| |
| addWavyUnderline | back to summary |
|---|---|
| public void addWavyUnderline(int start, int end, String... styles) Underlines the specified text range with wavy underline (as typically used by a spell checker), using style names.
| |
| applyDecorations | back to summary |
|---|---|
| public void applyDecorations() Applies decorations in a consistent order (sorted by style name). | |
| checkClient | back to summary |
|---|---|
| private void checkClient(Node n) | |
| decorateRun | back to summary |
|---|---|
| public void decorateRun(int length, StyleAttribute<?> a, CellContext. | |
| findHitCandidate | back to summary |
|---|---|
| public double findHitCandidate(double py, boolean down) | |
| flow | back to summary |
|---|---|
| private TextFlow flow() | |
| getCaretShape | back to summary |
|---|---|
| public PathElement[] getCaretShape(Region target, int charIndex, boolean leading) Returns the
| |
| getCellHeight | back to summary |
|---|---|
| public double getCellHeight() Valid only when cell is obtained from the arrangement.
| |
| getCellWidth | back to summary |
|---|---|
| public double getCellWidth() | |
| getContent | back to summary |
|---|---|
| public final Region getContent() Returns the content of this cell.
| |
| getIndex | back to summary |
|---|---|
| public final int getIndex() Returns the model index for this text cell.
| |
| getLineSpacing | back to summary |
|---|---|
| public double getLineSpacing() Returns line spacing if the content is a
| |
| getRangeShape | back to summary |
|---|---|
| public PathElement[] getRangeShape(Region target, int start, int end) Returns the
| |
| getTextLength | back to summary |
|---|---|
| public int getTextLength() Returns the length of text in this cell. A cell containing a non-text content will return 0.
| |
| getTextRange | back to summary |
|---|---|
| private RangeInfo getTextRange() | |
| getUnderlineShape | back to summary |
|---|---|
| public PathElement[] getUnderlineShape(Region target, int start, int end) Returns the
| |
| getY | back to summary |
|---|---|
| public double getY() Valid only when cell is obtained from the arrangement.
| |
| isInsideText | back to summary |
|---|---|
| public boolean isInsideText(double x, double y, boolean down) | |
| lineEdge | back to summary |
|---|---|
| public Integer lineEdge(boolean start, int caretIndex, int caretOffset) | |
| lineEnd | back to summary |
|---|---|
| public Integer lineEnd(int line) Returns the line end offset of the given line index.
| |
| lineForOffset | back to summary |
|---|---|
| public Integer lineForOffset(int offset) Returns the line index of the given character offset.
| |
| lineStart | back to summary |
|---|---|
| public Integer lineStart(int line) Returns the line start offset of the given line index.
| |
| requestLayout | back to summary |
|---|---|
| public void requestLayout() Overrides javafx. Doc from javafx. Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation. If this parent is either a scene root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestParentLayout will be invoked.
| |
| setBullet | back to summary |
|---|---|
| public void setBullet(String bullet) Sets the bullet decoration by adding a Label with the specified character. | |
| setCellWidth | back to summary |
|---|---|
| public void setCellWidth(double w) | |
| setParagraphAttributes | back to summary |
|---|---|
| public void setParagraphAttributes(StyleAttributeMap a, double defaultInterval) | |
| setPosition | back to summary |
|---|---|
| pack-priv void setPosition(double y, double height) sets cell position along the y axis of this cell in VFlow coordinates | |
| textFlow | back to summary |
|---|---|
| private static TextFlow textFlow() | |
| updateVFlowContext | back to summary |
|---|---|
| public void updateVFlowContext(VFlow f) | |
| Modifier and Type | Field and Description |
|---|---|
| public int | |
| public final int | |
| public final String | |
| public final CellContext. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| end | back to summary |
|---|---|
| public int end | |
| start | back to summary |
|---|---|
| public final int start | |
| styleName | back to summary |
|---|---|
| public final String styleName | |
| type | back to summary |
|---|---|
| public final CellContext. | |
| DecorationRun | back to summary |
|---|---|
| public DecorationRun(CellContext. | |
| extend | back to summary |
|---|---|
| public void extend(int length) | |
| Modifier and Type | Field and Description |
|---|---|
| private HashMap | |
| private final TextFlow | |
| private int | |
| private int | |
| private final ArrayList | |
| private static Comparator |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public ArrayList |
| byType | back to summary |
|---|---|
| private HashMap<StyleAttribute<?>, TextCell. | |
| flow | back to summary |
|---|---|
| private final TextFlow flow | |
| lastCount | back to summary |
|---|---|
| private int lastCount | |
| offset | back to summary |
|---|---|
| private int offset | |
| runs | back to summary |
|---|---|
| private final ArrayList<TextCell. | |
| sorter | back to summary |
|---|---|
| private static Comparator<TextCell. | |
| Decorator | back to summary |
|---|---|
| public Decorator(TextFlow flow) | |
| addRun | back to summary |
|---|---|
| public void addRun(int length, StyleAttribute<?> a, CellContext. | |
| getSortedRuns | back to summary |
|---|---|
| public ArrayList | |