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

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

  public ASTText(drawphase2 p, int id) {
    super(p, id);
  }
  
  public String getType()
  {
    return "Text";
  }  

  /*-----------------------------------------------*/
  /* Returns text in svg format                    */
  /*-----------------------------------------------*/
  public String getString()
  {
    String colour = getColour();
    int offsetX = getOffsetX();
    int offsetY = getOffsetY();
    String message = "";
    String inputMsg = ((ASTString) jjtGetChild(3)).val;
    
    /* removes " " from the surrounding string */
    message = inputMsg.substring(1,inputMsg.length()-1); 

    return "  <text x=\"" + (((ASTInt) jjtGetChild(0)).val+offsetX) +
                "\" y=\"" + (((ASTInt) jjtGetChild(1)).val+offsetY) +
                "\" font-size=\"" + ((ASTInt) jjtGetChild(2)).val +
                "\" fill=\"" + colour + "\">" + message +
             "</text>";
  }
}
