Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jsynedit
Class UndoComponent

    java.lang.Object
      jsynedit.UndoComponent

All Implemented Interfaces:
  java.util.EventListener, javax.swing.event.UndoableEditListener

    public class UndoComponent

extends java.lang.Object
implements javax.swing.event.UndoableEditListener

Field Summary
`static int` | `MAX_UNDOLIMIT`
`static long` | `SEQUENCE_DELAY`

Constructor Summary
`UndoComponent()`

Method Summary
`int` | `getLimit()` Gets the maximum number of sequences UndoComponent will hold.
`long` | `getSequenceDelay()` Gets the delay authorized between two text transformations for a single undo/redo operation.
`boolean` | `getTextModified()` Indicates if operations has been performed on text after last undo/redo operation
`void` | `redo()` Redo last undone change.
`void` | `reset()` Empty the UndoComponent
`void` | `setLimit(int limit)` Sets the maximum number of sequences UndoComponent will hold.
`void` | `setSequenceDelay(long delay)` Modifies the delay between two text transformations.
`void` | `setTextModified(boolean val)` Forces UndoComponent to perform as if text has been modified (val is true) or hasn't been modified (val is false) after last undo/redo operation.
`void` | `undo()` Undo last change.
`void` | `undoableEditHappened(javax.swing.event.UndoableEditEvent e)` Executed each time UndoableEditEvent happened.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SEQUENCE_DELAY

    public static final long SEQUENCE_DELAY

See Also:
  Constant Field Values

### MAX_UNDOLIMIT

    public static final int MAX_UNDOLIMIT

See Also:
  Constant Field Values

Constructor Detail

### UndoComponent

    public UndoComponent()

Method Detail

### undoableEditHappened

    public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)

  Executed each time UndoableEditEvent happened.

  Specified by:
    `undoableEditHappened` in interface `javax.swing.event.UndoableEditListener`

### undo

    public void undo()

  Undo last change.

### redo

    public void redo()

  Redo last undone change.

### reset

    public void reset()

  Empty the UndoComponent

### getTextModified

    public boolean getTextModified()

  Indicates if operations has been performed on text after last undo/redo operation

  Returns:
    true if text has been modified.

### setTextModified

    public void setTextModified(boolean val)

  Forces UndoComponent to perform as if text has been modified (val is true) or hasn't been modified (val is false) after last undo/redo operation.

  Parameters:
    `val` -

### getSequenceDelay

    public long getSequenceDelay()

  Gets the delay authorized between two text transformations for a single undo/redo operation. This delay started after last operation and reset when a new transformation occurs. Default value is 500 ms.

  Returns:
    the maximum delay in milliseconds before creation of another undo/redo operation

### setSequenceDelay

    public void setSequenceDelay(long delay)

  Modifies the delay between two text transformations.

  Parameters:
    `delay` - the delay in milliseconds

### getLimit

    public int getLimit()

  Gets the maximum number of sequences UndoComponent will hold.

  Returns:
    the limit size
  See Also:
    `UndoManager.getLimit()`

### setLimit

    public void setLimit(int limit)

  Sets the maximum number of sequences UndoComponent will hold.

  Parameters:
    `limit` - the limit size
  See Also:
    `UndoManager.setLimit(int)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.