org.problets.lib.io.output.text
Class ScrollableLinedTextDraw

java.lang.Object
  extended by org.problets.lib.io.output.text.LinedTextDraw
      extended by org.problets.lib.io.output.text.ScrollableLinedTextDraw
All Implemented Interfaces:
ScrollConstants

public class ScrollableLinedTextDraw
extends LinedTextDraw
implements ScrollConstants

Draws text on a lined background in the panel provided within a scrollable "window", complete with vertical scroll bar control.

Author:
Amruth Kumar

Field Summary
 
Fields inherited from interface org.problets.lib.io.output.ScrollConstants
BOTTOM_FOCUS, TOP_FOCUS
 
Constructor Summary
ScrollableLinedTextDraw()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 int paintComponent(java.awt.Graphics g, int xStart, int yStart, int codeWidth, java.awt.Font regFont)
          Version to be used when ScrollableLinedTextDraw is called to add to existing panel
 void respond(int xCoord, int yCoord)
          Responds if the mouse was clicked corresponding to the top or bottom scroller.
 void setFocusPolicy(int inPolicy)
          Sets the policy for the focus of the View - whether it should be focused on the top or the bottom
 void update(java.util.Vector inContent)
          Update the content to be displayed and reset the controls needed to display it
 
Methods inherited from class org.problets.lib.io.output.text.LinedTextDraw
paintComponent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrollableLinedTextDraw

public ScrollableLinedTextDraw()
Method Detail

paintComponent

public int paintComponent(java.awt.Graphics g,
                          int xStart,
                          int yStart,
                          int codeWidth,
                          java.awt.Font regFont)
Version to be used when ScrollableLinedTextDraw is called to add to existing panel


respond

public void respond(int xCoord,
                    int yCoord)
Responds if the mouse was clicked corresponding to the top or bottom scroller. xCoord is currently ignored.


update

public void update(java.util.Vector inContent)
Update the content to be displayed and reset the controls needed to display it


setFocusPolicy

public void setFocusPolicy(int inPolicy)
Sets the policy for the focus of the View - whether it should be focused on the top or the bottom


main

public static void main(java.lang.String[] args)