/* Generated By:JJTree: Do not edit this line. ASTText.java */

public class ASTText extends SimpleNode 
{
	/*************************************************
	
					Constructors
	
	*************************************************/
	
	public ASTText(int id) 
	{
    	super(id);
  	}

  	public ASTText(drawphase1 p, int id) 
  	{
    	super(p, id);
  	}
  	
  	/*************************************************
	
	Method implemented as part of Node interface 
	
	*************************************************/
  	
  	public void generate()
  	{
  	}
  	
  	/*************************************************
	
	Generates SVG code for outputting text
	
	*************************************************/
  	
  	public String generateSVG()
  	{
  		String output = "";
  		int x1, y1, fontSize;
  		String font = "Verdana";
  		String message;
  		
  		x1 = ((ASTInt) jjtGetChild(0)).val;
  		y1 = ((ASTInt) jjtGetChild(1)).val;
  		fontSize = ((ASTInt) jjtGetChild(2)).val;  		
  		
  		message = ((ASTLiteral) jjtGetChild(3)).name;
  		
  		output = ("<text x=\"" + x1 + "\" y=\"" + y1 + "\" font-family=\"" + font +
  			"\" font-size=\"" + fontSize + "\" fill=\"black\">" + message + 
  			" </text>");
  		
  		System.out.println(message);
  		  			
  		return output;
  	}

}
