22 package com.realtime.crossfire.jxclient.gui.log;
24 import java.util.List;
25 import org.jetbrains.annotations.NotNull;
86 public void lineAdded() {
92 public void lineReplaced() {
98 public void linesRemoved(@NotNull
final List<Line> lines) {
236 if (lastCanScrollUp != renderState.
canScrollUp()) {
void scrollTo(final int y)
Scrolls to a location.
boolean canScrollUp()
Returns whether scrolling up is possible.
int getTopIndex()
Returns the index of the first line to display.
int getTopIndex()
Returns the first line to render.
boolean mustRepaint
Whether the view has to be repainted even if no other value has changed.
void scrollToBottom(@NotNull final Buffer buffer)
Sets the view area to the bottom-most value.
void linesReplaced(@NotNull final Buffer buffer)
Some lines have been replaced at the end of the buffer.
int lastTopIndex
The first line of buffer to display.
final RenderStateListener renderStateListener
The listener to notify about state changes.
boolean canScrollUp
Whether scrolling up is possible.
int lastTopOffset
The number of pixels to shift the first displayed line.
int lastScrollPos
The position in pixels of the viewable window.
void linesAdded(@NotNull final Buffer buffer)
Some lines have been added to the buffer.
boolean canScrollDown()
Returns whether scrolling down is possible.
int getTopOffset()
Returns the number of pixels to shift the first displayed line.
int getScrollPos()
Returns the location of the view area in pixels.
void linesRemoved(@NotNull final Buffer buffer, @NotNull final Collection< Line > lines)
Some lines have been removed from the buffer.
void addBufferListener(@NotNull final BufferListener listener)
Adds a listener to notify of changes.
final RenderState renderState
The underlying RenderState instance.
Interface for listeners interested in changes of a RenderStateManager instance.
void setHeight(final int height)
Sets the viewable height in pixel.
boolean lastCanScrollDown
The last known result of RenderState#canScrollDown for renderState.
boolean canScrollDown
Whether scrolling down is possible.
boolean lastCanScrollUp
The last known result of RenderState#canScrollUp for renderState.
void setHeight(@NotNull final Buffer buffer, final int h)
Sets the the viewable height in pixel.
int getScrollPos()
Returns the location of the view area in pixels.
void resetScroll()
Resets the scrolling range to default values.
void dispose()
Destroys this instance.
void stateChanged()
Notifies the listener about a state change in the tracked RenderStateManager object.
int getTopOffset()
Returns the number of pixels to shift the first displayed line.
Encapsulates the state for rendering a Buffer instance.
RenderStateManager(@NotNull final RenderStateListener renderStateListener, @NotNull final Buffer buffer)
Creates a new instance.
Manages the contents of the contents of a log window.
void scrollUp(final int dy)
Scrolls up by pixels.
final BufferListener bufferListener
The listener to re-render the window contents after changes.
final Buffer buffer
The rendered buffer.
Interface for listeners for changes of Buffer contents.
Encapsulates the state for a scroll bar.
void scrollTo(@NotNull final Buffer buffer, final int y)
Scrolls to the given pixel location.
void fireChanges()
Notifies listeners of changes.
void removeBufferListener(@NotNull final BufferListener listener)
Removes a listener to be notified of changes.
void scrollDown(final int dy)
Scrolls down by pixels.