Crossfire JXClient, Trunk
|
Public Member Functions | |
boolean | canScrollDown () |
boolean | canScrollUp () |
int | getHeight () |
int | getScrollPos () |
int | getTopIndex () |
int | getTopOffset () |
void | linesAdded (@NotNull final Buffer buffer) |
void | linesRemoved (@NotNull final Buffer buffer, @NotNull final Collection< Line > lines) |
void | linesReplaced (@NotNull final Buffer buffer) |
boolean | mustRepaint () |
void | scrollTo (@NotNull final Buffer buffer, final int y) |
void | scrollToBottom (@NotNull final Buffer buffer) |
void | setHeight (@NotNull final Buffer buffer, final int h) |
void | update (@NotNull final Buffer buffer, final int oldBufferHeight) |
Private Attributes | |
boolean | canScrollDown |
boolean | canScrollUp |
int | height = 1 |
boolean | mustRepaint = true |
int | scrollPos |
final Object | sync = new Object() |
int | topIndex |
int | topOffset = -height |
Encapsulates the state for a scroll bar. The first line shown is the line index topIndex. If topOffset is non-zero, it should be shifted by this number of pixels. The current scrolling position is scrollPos.
Definition at line 35 of file RenderState.java.
boolean com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown | ( | ) |
Returns whether scrolling down is possible.
Definition at line 245 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, and com.realtime.crossfire.jxclient.gui.log.RenderState.sync.
boolean com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp | ( | ) |
Returns whether scrolling up is possible.
Definition at line 235 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp, and com.realtime.crossfire.jxclient.gui.log.RenderState.sync.
int com.realtime.crossfire.jxclient.gui.log.RenderState.getHeight | ( | ) |
Returns the height of the viewable area.
Definition at line 195 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.height, and com.realtime.crossfire.jxclient.gui.log.RenderState.sync.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateManager.getHeight().
int com.realtime.crossfire.jxclient.gui.log.RenderState.getScrollPos | ( | ) |
Returns the location of the view area in pixels.
Definition at line 225 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos, and com.realtime.crossfire.jxclient.gui.log.RenderState.sync.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.checkState(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.fireChanges(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.getScrollPos(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.scrollDown(), and com.realtime.crossfire.jxclient.gui.log.RenderStateManager.scrollUp().
int com.realtime.crossfire.jxclient.gui.log.RenderState.getTopIndex | ( | ) |
Returns the index of the first line to display.
Definition at line 205 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.sync, and com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.checkState(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.fireChanges(), and com.realtime.crossfire.jxclient.gui.log.RenderStateManager.getTopIndex().
int com.realtime.crossfire.jxclient.gui.log.RenderState.getTopOffset | ( | ) |
Returns the number of pixels to shift the first displayed line.
Definition at line 215 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.sync, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.checkState(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.fireChanges(), and com.realtime.crossfire.jxclient.gui.log.RenderStateManager.getTopOffset().
void com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded | ( | @NotNull final Buffer | buffer | ) |
Some lines have been added to the buffer.
buffer | the displayed buffer |
Definition at line 130 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.sync, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.RenderStateTestRec().
void com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved | ( | @NotNull final Buffer | buffer, |
@NotNull final Collection< Line > | lines | ||
) |
Some lines have been removed from the buffer.
buffer | the displayed buffer |
lines | the number of lines that have been removed |
Definition at line 161 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp, com.realtime.crossfire.jxclient.gui.log.RenderState.height, com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos, com.realtime.crossfire.jxclient.gui.log.RenderState.sync, com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.RenderStateTestRec().
void com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced | ( | @NotNull final Buffer | buffer | ) |
Some lines have been replaced at the end of the buffer.
buffer | the displayed buffer |
Definition at line 147 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.sync, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.RenderStateTestRec().
boolean com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint | ( | ) |
Returns whether the view should be repainted even if no other values have changed. This function resets the flag; calling the function twice returns
in the second call (if no other changes happen concurrently).
Definition at line 258 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint, and com.realtime.crossfire.jxclient.gui.log.RenderState.sync.
void com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo | ( | @NotNull final Buffer | buffer, |
final int | y | ||
) |
Scrolls to the given pixel location.
buffer | the displayed buffer |
y | the new location |
Definition at line 271 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp, com.realtime.crossfire.jxclient.gui.log.RenderState.height, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos, com.realtime.crossfire.jxclient.gui.log.RenderState.sync, com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateManager.scrollDown(), com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.scrollTo(), and com.realtime.crossfire.jxclient.gui.log.RenderStateManager.scrollUp().
void com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom | ( | @NotNull final Buffer | buffer | ) |
Sets the view area to the bottom-most value.
buffer | the displayed buffer |
Definition at line 301 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp, com.realtime.crossfire.jxclient.gui.log.RenderState.height, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos, com.realtime.crossfire.jxclient.gui.log.RenderState.sync, com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.resetScroll(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
void com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight | ( | @NotNull final Buffer | buffer, |
final int | h | ||
) |
Sets the viewable height in pixel.
buffer | the displayed buffer |
h | the viewable height |
Definition at line 88 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp, com.realtime.crossfire.jxclient.gui.log.RenderState.height, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.sync, com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateTestRec.RenderStateTestRec(), and com.realtime.crossfire.jxclient.gui.log.RenderStateManager.setHeight().
void com.realtime.crossfire.jxclient.gui.log.RenderState.update | ( | @NotNull final Buffer | buffer, |
final int | oldBufferHeight | ||
) |
Updates the internal state after the buffer has changed.
buffer | the buffer |
oldBufferHeight | the buffer height before the change |
Definition at line 110 of file RenderState.java.
References com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown, com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp, com.realtime.crossfire.jxclient.gui.log.RenderState.height, com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos, com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.sync, com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex, and com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateManager.update().
|
private |
Whether scrolling down is possible.
Definition at line 76 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateManager.canScrollDown(), com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.fireChanges(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
Whether scrolling up is possible.
Definition at line 71 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateManager.canScrollUp(), com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp(), com.realtime.crossfire.jxclient.gui.log.RenderStateManager.fireChanges(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
The height of the viewable area.
Definition at line 46 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderState.getHeight(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
Whether the view has to be repainted even if no other value has changed.
Definition at line 81 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderStateManager.fireChanges(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced(), com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
The location of the view area relative to the buffer's total height.
Definition at line 66 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderState.getScrollPos(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
Synchronization object for accesses to all fields.
Definition at line 41 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown(), com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp(), com.realtime.crossfire.jxclient.gui.log.RenderState.getHeight(), com.realtime.crossfire.jxclient.gui.log.RenderState.getScrollPos(), com.realtime.crossfire.jxclient.gui.log.RenderState.getTopIndex(), com.realtime.crossfire.jxclient.gui.log.RenderState.getTopOffset(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced(), com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
The first line to display in the viewable area. It is shifted by topOffset pixels.
Definition at line 52 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderState.getTopIndex(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().
|
private |
The number of pixels to shift the first displayed line (topIndex. Positive values shift up, negative shift down. Its value is either between zero and less than the height of line topIndex, or it is negative if the rendered buffer does not contain enough lines to fill the view area.
Definition at line 61 of file RenderState.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.RenderState.getTopOffset(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved(), com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo(), com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom(), com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight(), and com.realtime.crossfire.jxclient.gui.log.RenderState.update().