edu.mit.sketch.ui
Interface Paintable

All Known Subinterfaces:
GeometricObject, NonTerminal, SequenceTerminal, Terminal

public interface Paintable

All the objects who want to be Paintable must implement this interface.


Method Summary
 String getType()
          Returns the type of this NonTerminal
 void paint()
          Draw the objects
 void paint(Graphics g)
          Draw the objects using the given graphics context.
 void paintOriginal(Graphics g)
          This method is used to paint the original data points that forms this GeometricObject
 void setGraphicsContext(Graphics g)
          Set graphics context for this Paintable object.
 

Method Detail

setGraphicsContext

public void setGraphicsContext(Graphics g)
Set graphics context for this Paintable object. Must be set at least once before doing any drawing.

paint

public void paint()
Draw the objects

paint

public void paint(Graphics g)
Draw the objects using the given graphics context.

getType

public String getType()
Returns the type of this NonTerminal

paintOriginal

public void paintOriginal(Graphics g)
This method is used to paint the original data points that forms this GeometricObject