EmptyLayout是对LayoutManager接口的空实现,是其他布局管理的基类,如果要对容器内组件进行绝对定位和大小控制,可以使用EmptyLayout
[kml_flashembed movie="http://harryzhxu.googlepages.com/EmptyLayoutTest.swf" height="400" width="500" /]
package
{
import flash.display.Sprite;
import flash.display.StageScaleMode;
import org.aswing.AsWingManager;
import org.aswing.JFrame;
import org.aswing.JButton;
import org.aswing.EmptyLayout;
public class EmptyLayoutTest extends Sprite
{
public function EmptyLayoutTest()
{
AsWingManager.setRoot(this);
var frame:JFrame = new JFrame(this, "EmptyLayoutTest");
frame.getContentPane().setLayout(new EmptyLayout());
var button1:JButton = new JButton("button1");
button1.setSizeWH(80, 30);
button1.setLocationXY(50, 20);
frame.getContentPane().append(button1);
var button2:JButton = new JButton("button2");
button2.setSizeWH(200,150);
button2.setLocationXY(60, 70);
frame.getContentPane().append(button2);
frame.show();
frame.setSizeWH(350, 280);
this.stage.scaleMode = StageScaleMode.NO_SCALE;
}
}
}
评论
哈,是啊,想起来我上次还翻了一下关于如何在FlashDev
harry 发布
哈,是啊,想起来我上次还翻了一下关于如何在FlashDevelop上配置AS3的开发环境http://harryxu.cn/blog/?p=61这里也有一篇刚才去flashdevelop论坛逛了一下,看到这个帖子 估计FlashDevelop3应该在不久之后会发布的吧
很期待哦,呵呵。p.s. iiley 前辈都来俺的blog留言了 :[biggrin]: ,aswing方面还需要你多指教啊 :[tongue]: 。