//package coco;
import java.awt.*;

/*simple component that will show a logfile and extend itself with a line
  whenever a request comes*/
public final class CocoLog extends TextArea implements CocoComponent{
  /*coco id of this component*/
  String id;

  /*state string is the whole logfile text*/
  public String getState(){
    return getText();
  }

  /*invert the above method*/
  public void setState(String s){
    setText(s);
  }
  
  /*introduce myself*/
  public String getCocoId(){
    return id;
  }
  
  /*rename me*/
  public void setCocoId(String s){
    id=s;
  }
  
  /*the only request is to append line*/
  public void request(String s){
    append(s+"\n");
  }
}
