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 | Field and Description |
|---|---|
| private final Region | |
| 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 | addSquiggly(int
start offset for the range start, int end offset for the range end, Color highlight color color)Underlines the specified text range using squiggly line (as typically used by a spell checker). |
| public void | addSquiggly(int
start offset for the range start, int end offset for the range end, String... CSS style names styles)Underlines the specified text range using squiggly line (as typically used by a spell checker), using style names. |
| 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 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 | |
| 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 |
| content | back to summary |
|---|---|
| private final Region content | |
| 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) 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 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.
| |
| addSquiggly | back to summary |
|---|---|
| public void addSquiggly(int start, int end, Color color) Underlines the specified text range using squiggly line (as typically used by a spell checker).
| |
| addSquiggly | back to summary |
|---|---|
| public void addSquiggly(int start, int end, String... styles) Underlines the specified text range using squiggly line (as typically used by a spell checker), using style names.
| |
| 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() | |
| 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.
| |
| 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) | |
| 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() | |