Crossfire JXClient, Trunk
|
Public Member Functions | |
TestBuffer (final int maxLines, final int renderWidth, final int fontHeight) | |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.log.Buffer | |
void | addBufferListener (@NotNull final BufferListener listener) |
void | addLine (@NotNull final Line line) |
void | addTextSegment (@NotNull final Line line, @NotNull final String text, final boolean bold, final boolean italic, final boolean underline, @NotNull final FontID fontID, @NotNull final Color color, @NotNull final Color selectionColor) |
void | clear () |
int | coordinateToPosition (final int x, final int y) |
int | getLastCount () |
Line | getLine (final int line) |
Object | getSyncObject () |
String | getText (final int beginSelection, final int endSelection) |
int | getTotalHeight () |
Iterable< Line > | lines (final int line) |
boolean | mergeLines (@NotNull final String text, final int type, final int subtype, @Nullable final Color color) |
void | prune () |
void | removeBufferListener (@NotNull final BufferListener listener) |
void | replaceLine (@NotNull final Line line) |
void | setRenderWidth (final int renderWidth) |
void | setShowSentCommands (final boolean showSentCommands) |
void | setShowTimestamps (final boolean showTimestamps) |
int | size () |
Protected Member Functions | |
int | getSegmentWidth (@NotNull final TextSegment segment, final int characters) |
TextSegment | newTextSegment (@NotNull final String text, final boolean bold, final boolean italic, final boolean underline, @NotNull final FontID fontID, @NotNull final Color color, @NotNull final Color selectionColor) |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.log.Buffer | |
Buffer (final int maxLines, final int renderWidth) | |
Private Attributes | |
final int | fontHeight |
A Buffer implementation for tests.
Definition at line 11 of file TestBuffer.java.
com.realtime.crossfire.jxclient.gui.log.TestBuffer.TestBuffer | ( | final int | maxLines, |
final int | renderWidth, | ||
final int | fontHeight | ||
) |
Creates a new instance.
maxLines | the maximum number of lines the buffer can hold |
renderWidth | the width to render |
fontHeight | the height of the font in pixels |
Definition at line 24 of file TestBuffer.java.
References com.realtime.crossfire.jxclient.gui.log.TestBuffer.fontHeight, com.realtime.crossfire.jxclient.gui.log.Buffer.maxLines, and com.realtime.crossfire.jxclient.gui.log.Buffer.renderWidth.
|
protected |
Returns the width of a prefix of a TextSegment.
segment | the text segment |
characters | the number of characters in the prefix |
Reimplemented from com.realtime.crossfire.jxclient.gui.log.Buffer.
Definition at line 36 of file TestBuffer.java.
|
protected |
Creates a new segment.
text | the text to display |
bold | whether bold face is enabled |
italic | whether italic face is enabled |
underline | whether underlining is enabled |
fontID | the font to use |
color | the color to use |
selectionColor | the selection color to use |
Reimplemented from com.realtime.crossfire.jxclient.gui.log.Buffer.
Definition at line 31 of file TestBuffer.java.
References com.realtime.crossfire.jxclient.gui.log.TestBuffer.fontHeight.
|
private |
The height of the font in pixels.
Definition at line 16 of file TestBuffer.java.
Referenced by com.realtime.crossfire.jxclient.gui.log.TestBuffer.newTextSegment(), and com.realtime.crossfire.jxclient.gui.log.TestBuffer.TestBuffer().