Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8102029

Expose undo/redo functionality on TextInputControl

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7u6
    • Fix Version/s: None
    • Component/s: javafx

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              rbair Richard Bair
              Reporter:
              cschudtjfx Christian Schudt (Inactive)
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: