Flex——命令管理,Undo来Redo去
前言
Undo,Redo是编辑环境里常见的并且非常重要的功能,下面介绍【命令模式】在Flex/AS3下的实现。
ICommand接口
定义ICommand接口,其中Execute和UnExecute是相反的2个操作,Title属性用于命令显示,例如显示在操作历史列表里。
package cwn.wb.ui.core.command
{
import cwn.core.IDispose;
public
interface ICommand extends IDispose
{
function
get Title():String
function Execute():void
function UnExecute():void
}
}
CommandBase基类
CommandBase类主要实现ICommand接口,所有Command类都将继承CommandBase类。
package cwn.wb.ui.core.command
{
import cwn.core.IDispose;
public
class CommandBase implements ICommand
{
public
function CommandBase()
{
}
//===================ICommand========================
protected
var _Title:String;
public
function
get Title():String
{
return _Title;
}
public
function Execute():void
{
throw
new Error("Not implementation.");
}
pub
相关文档:
--------web.xml文件
<listener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</listener>
--------Java代码
public class GetSeesion {
/**
* 设置session
* */
public ......
Top 10 things new Flex developers should know
By Michael Portuesi | Published: November 27, 2009
While helping a coworker get started with Flash and Flex development, I thought it would be a good time to cover the list of things that I have found pretty essential to know about Flex development, co ......
//获得屏幕的分辨率
var x:Number=Capabilities.screenResolutionX;
var y:Number=Capabilities.screenResolutionY;
Alert.show("x="+x+"y="+y);
第二种方法
Alert.show(stage.fullScreenWidth+"=="+stage.fullScreenHeight);
//获得stage(工作区)的宽、高
Alert.show(stage.stageWidth+"=="+stage.stageHei ......
性能测试是一项浩大的工程,若你只想随便找台机器装上ld后,造几条数据,弄几个并发用户简单跑一下出来结果就可以万事大吉了,那你就大错特错了!(这样得出的测试结果没有任何价值和意义,当然更无法依此评估出你贵公司系统的性能了。
性能测试真正开始执行之前 ......