import java.awt.*;
//----------------------------------------------------------------------
//public class Scale draws Scale on screen
//----------------------------------------------------------------------
public class DopplerScale extends Canvas 
{

	Graphics scaleline;
	public int Scale,counter,ObsLoc,ObsTyp;
	String s;
	public DopplerScale(int Scale)
	{
		this.ObsTyp = 0;
		this.ObsLoc = 500;
		this.Scale = Scale;
		this.repaint();
	
	}
	public void paint(Graphics g)
	{
		Graphics  scaleline = g.create();
		scaleline.setColor(Color.black);
		scaleline.drawLine(0,25,1000,25);
		for (counter=0;counter <= 9;counter++)
		{
			s = Integer.toString(counter * Scale / 10);
			scaleline.drawLine(counter * 100,0,counter * 100,50);
			scaleline.drawString(s,counter * 100 +2+100,15);
			
		}
		if (this.ObsTyp == 1)
			scaleline.setColor(Color.blue);
		else
			scaleline.setColor(Color.green);
		scaleline.drawLine(100+ObsLoc,0,100+ObsLoc,50);

		this.show();
	}
	
}
