Putting it all together
l public class XFigFrontend
l extends SketchPanel
l implements StrokeDataListener
l{
l public XFigFrontend()
l {
l addStrokeDataListener( this );
l }
l
l public void handleStroke( StrokeData stroke_data )
l {
l SimpleClassifier classifier = new SimpleClassifier( stroke_data );
l
l switch( classifier.classify() ) {
l case SimpleClassifier.LINE:
l ...
l }
l }
l
l public void paintComponent( Graphics g )
l {
l }
l}