WrapperSelectMouseListener.js
资源名称:WorkFlow.rar [点击查看]
上传用户:ahit0551
上传日期:2009-04-15
资源大小:2345k
文件大小:1k
源码类别:
xml/soap/webservice
开发平台:
Java
- // /**
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) xio.name 2006</p>
- * @author xio
- */ function WrapperSelectMouseListener(wrapper) { this.wrapper = wrapper; } WrapperSelectMouseListener.prototype = new MouseListener(); WrapperSelectMouseListener.prototype.onMouseDown = function (e) { this.moved = false; if (e.button != MouseEvent.BUTTON_LEFT) { return; } this.down = true; }; WrapperSelectMouseListener.prototype.onMouseMove = function (e) { if (e.button != MouseEvent.BUTTON_LEFT) { return; } if (this.down) { this.moved = true; } }; WrapperSelectMouseListener.prototype.onMouseUp = function (e) { this.down = false; if (e.button != MouseEvent.BUTTON_LEFT) { return; } var state = this.wrapper.getStateMonitor().getState(); if (state != StateMonitor.SELECT) { return; } if (this.moved) { return; }
- // var viewer = this.wrapper.getViewer(); if (viewer.getUI() == e.srcElement) { this.wrapper.getModel().clearSelectedMetaNodeModels(); this.wrapper.getModel().clearSelectedTransitionModels(); } };