public class EditorScrollingPositionKeeper extends java.lang.Object implements Disposable
savePosition()
method should be called before the operation, to save scrolling position, and
restorePosition(boolean)
method - after the operation, to restore the position.Modifier and Type | Class and Description |
---|---|
static class |
EditorScrollingPositionKeeper.ForDocument
Same as
EditorScrollingPositionKeeper , but tracking all editors for a given document. |
Disposable.Parent
Constructor and Description |
---|
EditorScrollingPositionKeeper(Editor editor) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Usually not invoked directly, see class javadoc.
|
static void |
perform(Document document,
boolean stopAnimation,
java.lang.Runnable runnable)
Performs given operation, restoring scrolling position in all document's editors afterwards.
|
static void |
perform(Editor editor,
boolean stopAnimation,
java.lang.Runnable operation)
Performs given operation, restoring editor scrolling position afterwards.
|
void |
restorePosition(boolean stopAnimation) |
void |
savePosition() |
public EditorScrollingPositionKeeper(Editor editor)
public void savePosition()
public void restorePosition(boolean stopAnimation)
public void dispose()
Disposable
dispose
in interface Disposable
public static void perform(Editor editor, boolean stopAnimation, java.lang.Runnable operation)
public static void perform(Document document, boolean stopAnimation, java.lang.Runnable runnable)