All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Scribble.ScribbleData

java.lang.Object
   |
   +----Scribble.ScribbleData

public class ScribbleData
extends Object
This class contains all the lines that have been drawn so far. It paints them to the screen when the paintLines method is called. It needs a Component to interact with


Constructor Index

 o ScribbleData()
The default constructor, which doesn't offer a lot of functionality
 o ScribbleData(Component)
the other constructor which takes a Component to interact with

Method Index

 o addLine(Line)
Adds a new line to the previously stored lines.
 o clearLines()
Removes all lines from the repository and repaints the screen so that there are no lines on the screen
 o paintLines(Graphics)
Paints the stored lines to the screen
 o setGUI(Component)
Sets the Component to interact with

Constructors

 o ScribbleData
 public ScribbleData()
The default constructor, which doesn't offer a lot of functionality

 o ScribbleData
 public ScribbleData(Component gui)
the other constructor which takes a Component to interact with

Methods

 o setGUI
 public void setGUI(Component gui)
Sets the Component to interact with

 o paintLines
 protected void paintLines(Graphics g)
Paints the stored lines to the screen

 o addLine
 public synchronized void addLine(Line newLine)
Adds a new line to the previously stored lines.

 o clearLines
 public synchronized void clearLines()
Removes all lines from the repository and repaints the screen so that there are no lines on the screen


All Packages  Class Hierarchy  This Package  Previous  Next  Index