Crossfire JXClient, Trunk
Public Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.log.RenderState Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.gui.log.RenderState:
Collaboration graph

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
 

Detailed Description

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.

Author
Andreas Kirschbaum

Definition at line 35 of file RenderState.java.

Member Function Documentation

◆ canScrollDown()

boolean com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown ( )

Returns whether scrolling down is possible.

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.

◆ canScrollUp()

boolean com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp ( )

Returns whether scrolling up is possible.

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.

◆ getHeight()

int com.realtime.crossfire.jxclient.gui.log.RenderState.getHeight ( )

Returns the height of the viewable area.

Returns
the height

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().

Here is the caller graph for this function:

◆ getScrollPos()

int com.realtime.crossfire.jxclient.gui.log.RenderState.getScrollPos ( )

◆ getTopIndex()

int com.realtime.crossfire.jxclient.gui.log.RenderState.getTopIndex ( )

◆ getTopOffset()

int com.realtime.crossfire.jxclient.gui.log.RenderState.getTopOffset ( )

◆ linesAdded()

void com.realtime.crossfire.jxclient.gui.log.RenderState.linesAdded ( @NotNull final Buffer  buffer)

◆ linesRemoved()

void com.realtime.crossfire.jxclient.gui.log.RenderState.linesRemoved ( @NotNull final Buffer  buffer,
@NotNull final Collection< Line lines 
)

◆ linesReplaced()

void com.realtime.crossfire.jxclient.gui.log.RenderState.linesReplaced ( @NotNull final Buffer  buffer)

◆ mustRepaint()

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

false

in the second call (if no other changes happen concurrently).

Returns
whether the view should be repainted

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.

◆ scrollTo()

void com.realtime.crossfire.jxclient.gui.log.RenderState.scrollTo ( @NotNull final Buffer  buffer,
final int  y 
)

◆ scrollToBottom()

void com.realtime.crossfire.jxclient.gui.log.RenderState.scrollToBottom ( @NotNull final Buffer  buffer)

◆ setHeight()

void com.realtime.crossfire.jxclient.gui.log.RenderState.setHeight ( @NotNull final Buffer  buffer,
final int  h 
)

◆ update()

void com.realtime.crossfire.jxclient.gui.log.RenderState.update ( @NotNull final Buffer  buffer,
final int  oldBufferHeight 
)

Member Data Documentation

◆ canScrollDown

boolean com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollDown
private

◆ canScrollUp

boolean com.realtime.crossfire.jxclient.gui.log.RenderState.canScrollUp
private

◆ height

int com.realtime.crossfire.jxclient.gui.log.RenderState.height = 1
private

◆ mustRepaint

boolean com.realtime.crossfire.jxclient.gui.log.RenderState.mustRepaint = true
private

◆ scrollPos

int com.realtime.crossfire.jxclient.gui.log.RenderState.scrollPos
private

◆ sync

final Object com.realtime.crossfire.jxclient.gui.log.RenderState.sync = new Object()
private

◆ topIndex

int com.realtime.crossfire.jxclient.gui.log.RenderState.topIndex
private

◆ topOffset

int com.realtime.crossfire.jxclient.gui.log.RenderState.topOffset = -height
private

The documentation for this class was generated from the following file: