ToggleButtonModel.js
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:1k
源码类别:
xml/soap/webservice
开发平台:
Java
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) xio.name 2006</p>
- * @author xio
- */ function ToggleButtonModel(enabled, pressed, pressed) { this.base = ButtonModel; this.base(enabled, pressed);
- // if (pressed != null) { this.setPressed(pressed); } else { this.setPressed(false); } // this.buttonGroup = null; } ToggleButtonModel.prototype = new ButtonModel(); ToggleButtonModel.prototype.setPressed = function (pressed) { var group = this.getGroup(); if (group != null) { group.setPressed(this, pressed); pressed = group.isPressed(this); } if (this.isPressed() == pressed) { return; } this.pressed = pressed; this.notifyObservers(ToggleButtonModel.PRESSED_CHANGED_PROPERTY); }; ToggleButtonModel.prototype.isPressed = function () { return this.pressed; }; ToggleButtonModel.prototype.setGroup = function (buttonGroup) { this.buttonGroup = buttonGroup; }; ToggleButtonModel.prototype.getGroup = function () { return this.buttonGroup; };
- //静态变量 ToggleButtonModel.PRESSED_CHANGED_PROPERTY = "TOGGLE_BUTTON_PRESSED_CHANGED";