代码:
public class MyGroupUI extends GroupUI
{
public function MyGroupUI(network:Network, group:Group){
super(network, group);
}
override protected function drawContent(graphics:Graphics):void{
if(!group.expanded){
super.drawContent(graphics);
return;
}
var rect:Rectangle = this.bodyRect;
rect.inflate(rect.width * 0.2, rect.height * 0.2);
Utils.drawImage(graphics, 'subnetwork_image', rect.x, rect.y, rect.width, rect.height, null, Consts.STRETCH_FILL);
}
}
public class MyGroupUI extends GroupUI
{
public function MyGroupUI(network:Network, group:Group){
super(network, group);
}
override protected function drawContent(graphics:Graphics):void{
if(!group.expanded){
super.drawContent(graphics);
return;
}
var rect:Rectangle = this.bodyRect;
rect.inflate(rect.width * 0.2, rect.height * 0.2);
Utils.drawImage(graphics, 'subnetwork_image', rect.x, rect.y, rect.width, rect.height, null, Consts.STRETCH_FILL);
}
}