trait History extends Observable
Undo-redo management.
Notifies observers when canUndo, canRedo, undoName, or redoName change.
- Alphabetic
- By Inheritance
- History
- Observable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def add(edit: NamedEdit): Unit
Add another edit to the history.
Add another edit to the history. Unless merging is blocked, it tries to merge this edit with the most recent edit. Afterwards, the internal merge-block flag is cleared.
- abstract def blockMerge(): Unit
Disallow the merging of the next edit to be added.
Disallow the merging of the next edit to be added. This can be used to avoid merging edits if the editor component was temporarily unfocused, for example.
- abstract def canRedo: Boolean
Whether there are edits that can be redone, and thus whether
redoandredoNamemay be called. - abstract def canUndo: Boolean
Whether there are undoable edits and thus
undoandundoNamemay be called. - abstract def capture[A](name: String, document: Document, terminal: Terminal)(block: => A): A
Creates an automatic edit from tracing events on a document and terminal.
Creates an automatic edit from tracing events on a document and terminal. The edit, if not empty, will be added to the history before returning.
- name
the name of the resulting edit
- document
the document to temporarily trace
- terminal
the terminal to temporarily trace
- block
an action that produces events as a side effect. These events will make up the edit.
- abstract def clear(): Unit
Clears the history, removing all edits.
Clears the history, removing all edits. Afterwards,
canUndoandcanRedowill returnfalse. - abstract def redo(): Unit
Throws an exception if
!canRedo - abstract def redoName: String
Throws an exception if
!canRedo - abstract def undo(): Unit
Throws an exception if
!canUndo - abstract def undoName: String
Throws an exception if
!canUndo
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def notifyObservers(): Unit
- Definition Classes
- Observable
- def onChange(action: => Unit): Unit
- Definition Classes
- Observable
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()