package awt; import java.awt.*; import java.awt.event.*; import java.util.Vector; public class TextPanel extends Panel { private String [][] text;
Fresh text will overwrite text[fresh] Line fresh-1 is shown at bottom of screen; at this line, characters are added |
Don't show the last scrollbackLines lines |
Chop string into words |
Calculate height in pixels |
paint line with top pixelheight ypos |
Add color switch |
Add CR, then full line |
Add CR, then full line |
if idx=0, return last line added if idx=1, return line before last line added if idx = 2, return line before that line, etc etc if idx = getCapacity()-1, return oldest line |