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 ScrollingModel
public java.awt.Rectangle getVisibleAreaOnScrollingFinished()
getVisibleAreaOnScrollingFinished
in interface ScrollingModel
public void scrollToCaret(ScrollType scrollType)
scrollToCaret
in interface ScrollingModel
public void scrollTo(LogicalPosition pos, ScrollType scrollType)
scrollTo
in interface ScrollingModel
public void runActionOnScrollingFinished(java.lang.Runnable action)
runActionOnScrollingFinished
in interface ScrollingModel
public boolean isAnimationEnabled()
public void disableAnimation()
disableAnimation
in interface ScrollingModel
public void enableAnimation()
enableAnimation
in interface ScrollingModel
public javax.swing.JScrollBar getVerticalScrollBar()
public javax.swing.JScrollBar getHorizontalScrollBar()
public int getVerticalScrollOffset()
getVerticalScrollOffset
in interface ScrollingModel
public int getHorizontalScrollOffset()
getHorizontalScrollOffset
in interface ScrollingModel
public void scrollVertically(int scrollOffset)
scrollVertically
in interface ScrollingModel
public void scrollHorizontally(int scrollOffset)
scrollHorizontally
in interface ScrollingModel
public void scroll(int hOffset, int vOffset)
scroll
in interface ScrollingModel
public void addVisibleAreaListener(VisibleAreaListener listener)
addVisibleAreaListener
in interface ScrollingModel
public void removeVisibleAreaListener(VisibleAreaListener listener)
removeVisibleAreaListener
in interface ScrollingModel
public void finishAnimation()
public void dispose()
public void beforeModalityStateChanged()
public boolean isScrollingNow()
public void accumulateViewportChanges()
ScrollingModelEx
ScrollingModelEx.flushViewportChanges()
processing.accumulateViewportChanges
in interface ScrollingModelEx
public void flushViewportChanges()
ScrollingModelEx
ScrollingModelEx.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 ScrollingModelEx
public void addScrollRequestListener(ScrollRequestListener scrollRequestListener, Disposable parentDisposable)