-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
7u6
Hi,
I needed to call the undo/redo functionality on a TextInputControl.
What I ended up was doing this:
((TextInputControlBehavior)((TextInputControlSkin)textArea.getSkin()).getBehavior()).callAction("Undo");
This uses internal classes.
I suggest to add those methods to the control, so that I can use:
textArea.undo();
However, I don't know, if this contradicts the Control/Skin/Behavior concept.
Maybe another solution is to put the Behaviors in the public package and add an undo/redo method to it, so that you don't have to callAction with a String value.
Other functions like copy/paste could be useful as well.
See this thread:
https://forums.oracle.com/forums/thread.jspa?threadID=2438759&tstart=0
I needed to call the undo/redo functionality on a TextInputControl.
What I ended up was doing this:
((TextInputControlBehavior)((TextInputControlSkin)textArea.getSkin()).getBehavior()).callAction("Undo");
This uses internal classes.
I suggest to add those methods to the control, so that I can use:
textArea.undo();
However, I don't know, if this contradicts the Control/Skin/Behavior concept.
Maybe another solution is to put the Behaviors in the public package and add an undo/redo method to it, so that you don't have to callAction with a String value.
Other functions like copy/paste could be useful as well.
See this thread:
https://forums.oracle.com/forums/thread.jspa?threadID=2438759&tstart=0