User feedback (see https://mail.openjdk.org/pipermail/openjfx-discuss/2025-August/000267.html ):
The methods applyStyle and setStyle in RichTextArea should have a boolean undo parameter like replaceText.
Upon further analysis, the 'allowUndo' parameter was a mistake: allowing the application code to disable creating undo/redo entries messes up the internal undo/redo stack.
There is an internal need (UndoableChange), but it should not be exposed via public API.
Whenever the application needs to disable undo/redo functionality (while, for example, building a document from multiple segments), this can be accomplished by calling clearUndoRedo().
One possible issue is the maximum size of the undo/redo stack - currently it is unlimited - but in practice we should probably limit the depth to maybe 100-200 entries (see JDK-8370447 )
The methods applyStyle and setStyle in RichTextArea should have a boolean undo parameter like replaceText.
Upon further analysis, the 'allowUndo' parameter was a mistake: allowing the application code to disable creating undo/redo entries messes up the internal undo/redo stack.
There is an internal need (UndoableChange), but it should not be exposed via public API.
Whenever the application needs to disable undo/redo functionality (while, for example, building a document from multiple segments), this can be accomplished by calling clearUndoRedo().
One possible issue is the maximum size of the undo/redo stack - currently it is unlimited - but in practice we should probably limit the depth to maybe 100-200 entries (see JDK-8370447 )
- csr for
-
JDK-8370909 RichTextArea: remove allowUndo parameter
-
- Finalized
-
- relates to
-
JDK-8351982 ☂ RichTextArea (Incubator) Feedback and Bugs in jfx24
-
- Open
-
-
JDK-8370447 RichTextArea: undo/redo improvements
-
- Open
-
- links to
-
Review(master)
openjdk/jfx/1941