public class ScrollingModelImpl extends java.lang.Object implements ScrollingModelEx
| Constructor and Description |
|---|
ScrollingModelImpl(EditorImpl editor) |
| Modifier and Type | Method and Description |
|---|---|
void |
accumulateViewportChanges()
Asks current model to avoid changing viewport position and just remember it instead.
|
void |
addScrollRequestListener(ScrollRequestListener scrollRequestListener,
Disposable parentDisposable) |
void |
addVisibleAreaListener(VisibleAreaListener listener) |
void |
beforeModalityStateChanged() |
void |
disableAnimation() |
void |
dispose() |
void |
enableAnimation() |
void |
finishAnimation() |
void |
flushViewportChanges()
Does nothing if
ScrollingModelEx.accumulateViewportChanges() is called before it or if no requests for viewport location
change arrived since the last time ScrollingModelEx.accumulateViewportChanges() is called. |
javax.swing.JScrollBar |
getHorizontalScrollBar() |
int |
getHorizontalScrollOffset() |
javax.swing.JScrollBar |
getVerticalScrollBar() |
int |
getVerticalScrollOffset() |
java.awt.Rectangle |
getVisibleArea() |
java.awt.Rectangle |
getVisibleAreaOnScrollingFinished() |
boolean |
isAnimationEnabled() |
boolean |
isScrollingNow() |
void |
removeVisibleAreaListener(VisibleAreaListener listener) |
void |
runActionOnScrollingFinished(java.lang.Runnable action) |
void |
scroll(int hOffset,
int vOffset) |
void |
scrollHorizontally(int scrollOffset) |
void |
scrollTo(LogicalPosition pos,
ScrollType scrollType) |
void |
scrollToCaret(ScrollType scrollType) |
void |
scrollVertically(int scrollOffset) |
public ScrollingModelImpl(EditorImpl editor)
public java.awt.Rectangle getVisibleArea()
getVisibleArea in interface ScrollingModelpublic java.awt.Rectangle getVisibleAreaOnScrollingFinished()
getVisibleAreaOnScrollingFinished in interface ScrollingModelpublic void scrollToCaret(ScrollType scrollType)
scrollToCaret in interface ScrollingModelpublic void scrollTo(LogicalPosition pos, ScrollType scrollType)
scrollTo in interface ScrollingModelpublic void runActionOnScrollingFinished(java.lang.Runnable action)
runActionOnScrollingFinished in interface ScrollingModelpublic boolean isAnimationEnabled()
public void disableAnimation()
disableAnimation in interface ScrollingModelpublic void enableAnimation()
enableAnimation in interface ScrollingModelpublic javax.swing.JScrollBar getVerticalScrollBar()
public javax.swing.JScrollBar getHorizontalScrollBar()
public int getVerticalScrollOffset()
getVerticalScrollOffset in interface ScrollingModelpublic int getHorizontalScrollOffset()
getHorizontalScrollOffset in interface ScrollingModelpublic void scrollVertically(int scrollOffset)
scrollVertically in interface ScrollingModelpublic void scrollHorizontally(int scrollOffset)
scrollHorizontally in interface ScrollingModelpublic void scroll(int hOffset,
int vOffset)
scroll in interface ScrollingModelpublic void addVisibleAreaListener(VisibleAreaListener listener)
addVisibleAreaListener in interface ScrollingModelpublic void removeVisibleAreaListener(VisibleAreaListener listener)
removeVisibleAreaListener in interface ScrollingModelpublic void finishAnimation()
public void dispose()
public void beforeModalityStateChanged()
public boolean isScrollingNow()
public void accumulateViewportChanges()
ScrollingModelExScrollingModelEx.flushViewportChanges() processing.accumulateViewportChanges in interface ScrollingModelExpublic void flushViewportChanges()
ScrollingModelExScrollingModelEx.accumulateViewportChanges() is called before it or if no requests for viewport location
change arrived since the last time ScrollingModelEx.accumulateViewportChanges() is called.
Applies remembered viewport location change request to the editor.flushViewportChanges in interface ScrollingModelExpublic void addScrollRequestListener(ScrollRequestListener scrollRequestListener, Disposable parentDisposable)