[Tree] sPanel.as
/*
패널 생성 클래스
*/
package treeClass
{
import mx.containers.Panel;
import mx.controls.TextInput;
import mx.controls.Button;
public class sPanel extends Panel
{
public var textinput:TextInput;
public var btn:Button;
public function sPanel():void{
this.x = 310;
this.y = 10;
this.width = 200;
this.height = 155;
this.layout = "absolute";
textinput = new TextInput();
textinput.x = 10;
textinput.y = 28;
btn = new Button();
btn.x = 123;
btn.y = 58;
btn.label = "add";
this.addChild(textinput);
this.addChild(btn);
}
public function nomalPanel():void{
this.x = 10;
this.y = 10;
this.width = 292;
this.height = 331;
this.layout = "absolute";
}
public function setClick(object:Function):void{
this.btn.addEventListener("click", object);
}
}
}