RichTextArea.
The side decorations Nodes are added to either left or right side of each paragraph. Each side node will be resized to the height of the corresponding paragraph. The width of all the side nodes, in order to avoid complicated layout process, would be determined by the following process:
getPrefWidth method returns a value greater than 0, that will be the width of all the side nodes.
getMeasurementNode(int) method is called.
The preferred width of the Node returned will be used to size all other nodes for that side.
| Modifier and Type | Method and Description |
|---|---|
| public Node | Returns: the measurementNodethe paragraph index at the top of the viewable area index)Returns the special measurement node to use for sizing the pane that holds the side decorations. |
| public Node | Returns: new instanceNodethe paragraph index index)Creates a Node to be added to the layout to the right or to the left of the given paragraph. |
| public double | Returns: the preferred widthwidth of the view viewWidth)Returns the width to size the pane which hosts the side decoration |
| getMeasurementNode | back to summary |
|---|---|
| public Node getMeasurementNode(int index) Returns the special measurement node to use for sizing the pane that holds the side decorations.
This method will only be called if
| |
| getNode | back to summary |
|---|---|
| public Node getNode(int index) Creates a Node to be added to the layout to the right or to the left of the given paragraph.
This method may return
| |
| getPrefWidth | back to summary |
|---|---|
| public double getPrefWidth(double viewWidth) Returns the width to size the pane which hosts the side decoration
When return value is 0 or negative, an alternative method to size the side pane hosting the decoration
will be used: a special measurement
| |