Public Member Functions | |
void | setScroller (JScrollBar scroll) |
Allows to change the scrollbar. | |
void | paintComponent (Graphics graphics) |
Method that displays the results or debugging information. | |
void | setTopIndexByPixelValue (int pixelValue) |
Calculates were the display of the results will start. | |
int | incrementTopIndex () |
Increments the topIndex by 1. | |
int | decrementTopIndex () |
Decrements the topIndex by 1. | |
Dimension | getPreferredSize () |
Calculates the size it will take to display all Strings in data. | |
int | getUnitHeight () |
Use to see how much to increment the scroller. | |
void | reset () |
Clears the data stored in both debug and nonDebug Vectors. | |
void | logCommand (String[] data) |
logCommand adds the string to the nonDebug Vector. | |
int | logString (String stri) |
Similar to logCommand but this only adds one String not an array. | |
int | logDebugString (String str) |
Similar to logString. | |
void | replaceLog (String str, int index) |
Replaces an entry in data. | |
void | showDebugging () |
Makes the #SSPanel show debugging information. | |
void | hideDebugging () |
Hides debugging information. | |
Static Public Attributes | |
boolean | showDebug = false |
Should the debugging information be shown. | |
final int | MAXLINE = 65 |
How long a line of text display is. | |
Private Attributes | |
int | topIndex = 0 |
Stores where the display of the data or debugging info begins. | |
int | fontHeight |
Font height. | |
JScrollBar | scroller |
The scrollbar the SSPanel manipulates. | |
Vector | data = new Vector() |
This is the active data to displayed, it might be with debugging or not. | |
Vector | debug = new Vector() |
Where all the debuging information is stored. | |
Vector | noDebug = data |
All the data without any debugging. | |
Hashtable | pairs = new Hashtable() |
Since data is stored to places we need a way to pair up information. |
Has different methods to log either results or debugging information. The scroll bar it uses is set up so that it can be moved using the mouse the wheel mouse or the arrows on the keyboard. This class should be repainted everytime something is log-in.
Definition at line 24 of file SSPanel.java.
|
Decrements the topIndex by 1. This method is used to move the window display of the data up. It has boundary checks. Definition at line 138 of file SSPanel.java. References fontHeight, and topIndex. |
|
Calculates the size it will take to display all Strings in data.
Definition at line 150 of file SSPanel.java. References data, and fontHeight. Referenced by hideDebugging(), logCommand(), logDebugString(), logString(), dndtester::DaqPanel::paint(), and showDebugging(). |
|
Use to see how much to increment the scroller.
Definition at line 174 of file SSPanel.java. References fontHeight. Referenced by hideDebugging(), logCommand(), logDebugString(), logString(), dndtester::DaqPanel::paint(), paintComponent(), and showDebugging(). |
|
Hides debugging information. If the rDPanel#showDebugInf is deselected this method is called. Makes data to point to noDebug. And sets showDebug to false. It recalculates the dimensions of the scroller. Definition at line 370 of file SSPanel.java. References data, fontHeight, getPreferredSize(), getUnitHeight(), noDebug, scroller, showDebug, and topIndex. |
|
Increments the topIndex by 1. This method is used to move the window display of the data down. It has boundary checks. Definition at line 123 of file SSPanel.java. References data, fontHeight, and topIndex. |
|
logCommand adds the string to the nonDebug Vector. If the flag for log debugging information is set on then it also adds it to the debug Vector.
Definition at line 197 of file SSPanel.java. References debug, fontHeight, getPreferredSize(), getUnitHeight(), scroller, and topIndex. |
|
Similar to logString. The difference is that it only logs it in debug.
Definition at line 285 of file SSPanel.java. References debug, fontHeight, getPreferredSize(), getUnitHeight(), MAXLINE, scroller, showDebug, and topIndex. |
|
Similar to logCommand but this only adds one String not an array. It make sures that the string is not bigger than MAXLINE otherwise it chops it in chunks of MAXLINE long and that is what logs in.
Definition at line 229 of file SSPanel.java. References data, debug, fontHeight, getPreferredSize(), getUnitHeight(), MAXLINE, noDebug, pairs, scroller, and topIndex. |
|
Method that displays the results or debugging information. It begins drawing text where the topIndex is and continues until no more text fits in the panel. Definition at line 66 of file SSPanel.java. References data, fontHeight, getUnitHeight(), and topIndex. |
|
Replaces an entry in data. Once the outcome of testing some command is known this command can be used to log in the outcome of that command. The index should be a number return by logString or logDebugString.
Definition at line 331 of file SSPanel.java. |
|
Allows to change the scrollbar. But the scrollbar should be added to the sspanel, this is not enforce but it should be followed for proper behavior Definition at line 57 of file SSPanel.java. References scroller. Referenced by dndtester::DaqPanel::DaqPanel(). |
|
Calculates were the display of the results will start. Its given a pixel value and it divides this by the font height to find out where the data display should beging. Definition at line 114 of file SSPanel.java. References fontHeight, and topIndex. Referenced by dndtester::DaqPanel::DaqPanel(). |
|
Makes the #SSPanel show debugging information. If the rDPanel#showDebugInf is selected this method is called. Makes data to point to debug. And sets showDebug to true. It recalculates the dimensions of the scroller. Definition at line 346 of file SSPanel.java. References data, debug, fontHeight, getPreferredSize(), getUnitHeight(), scroller, showDebug, and topIndex. |