import java.util.Enumeration;


public abstract class FeatureDrafter1 extends Drafter
{

    //[1
    protected void drawLineSegment(LineSegment segment)
    {
       Enumeration        points;
       Point              p;
       

       // Get an Enumeration of the Point objects
       points = segment.points();

       // Get one end point
       p = (Point)points.nextElement();

       // Move the pen to the end point
       moveTo(p);

       // Get the other end point
       p = (Point)points.nextElement();

       // Draw a line to the other end point
       drawTo(p);
    }
    //]1


    //[2
    protected void drawCurve(PiecewiseLinearCurve curve)
    {
       Enumeration        points;
       Point              p;
       

       // Get an Enumeration of the Point objects
       points = curve.points();

       // Get one end point
       p = (Point)points.nextElement();

       // Move the pen to the end point
       moveTo(p);

       // Get and draw a line to each of the remaining break points
       while (points.hasMoreElements())
       {
          // Get the other end Point
          p = (Point)points.nextElement();

          // Draw a line to the other end Point
          drawTo(p);
       }
    }
    //]2




    //[3
    protected void drawPolygon(Polygon polygon)
    {
       Enumeration        points;
       Point              p;
       

       // Get an Enumeration of the Point objects
       points = polygon.points();

       // Get one end point
       p = (Point)points.nextElement();

       // Move the pen to the end point
       moveTo(p);

       // Get and draw a line to each of the remaining break points
       while (points.hasMoreElements())
       {
          // Get the other end Point
          p = (Point)points.nextElement();

          // Draw a line to the other end Point
          drawTo(p);
       }
    }
    //]3




}
