All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class eh.eh_DebugListModel

java.lang.Object
   |
   +----eh.eh_DebugListModel

public class eh_DebugListModel
extends Object

eh_DebugListModel manages the buffering of lines of debug output in order to display them without a significant performance overhead. Debug output is placed in a StringBuffer, which is then added to a PlainDocument that drives the display itself. The StringBuffer and PlainDocument live herein.


Variable Index

 o DebugBoxMaxChars
The maximum number of characters the debug box will hold.
 o DebugBoxTrimSize
Once the debug box has reached its maximum size, this number of characters will be trimmed from its start.
 o DebugBuffer
 o DebugDocument
Document into which debug information is to be placed for display.

Constructor Index

 o eh_DebugListModel()

Method Index

 o add(String)
Add InputString to debug output.
 o checkCapacity()
If the debug box has reached its designated capacity, trim it by removing a chunk from the beginning.
 o getDebugBoxMaxChars()
 o getDebugDocument()
 o refreshScreen()
Move the buffered output to the screen.
 o setDebugBoxMaxChars(int)

Variables

 o DebugBuffer
 protected StringBuffer DebugBuffer
 o DebugDocument
 protected PlainDocument DebugDocument
Document into which debug information is to be placed for display.

 o DebugBoxMaxChars
 protected int DebugBoxMaxChars
The maximum number of characters the debug box will hold. Once this limit is reached, a chunk is removed from the front.

 o DebugBoxTrimSize
 protected int DebugBoxTrimSize
Once the debug box has reached its maximum size, this number of characters will be trimmed from its start.

Constructors

 o eh_DebugListModel
 public eh_DebugListModel()

Methods

 o add
 public void add(String InputString)
Add InputString to debug output.

Parameters:
InputString - The string to output
 o refreshScreen
 protected void refreshScreen()
Move the buffered output to the screen.

 o checkCapacity
 protected void checkCapacity()
If the debug box has reached its designated capacity, trim it by removing a chunk from the beginning. The size of the chunk to remove is such that we end up with 10% less than capacity.

 o setDebugBoxMaxChars
 public void setDebugBoxMaxChars(int InputMaxLines)
 o getDebugDocument
 public PlainDocument getDebugDocument()
 o getDebugBoxMaxChars
 public int getDebugBoxMaxChars()

All Packages  Class Hierarchy  This Package  Previous  Next  Index