dragablepanel.js
来自「采用bs结构的不错的java工作流」· JavaScript 代码 · 共 38 行
JS
38 行
/**
* <p>Title: DragablePanel</p>
* <p>Description: 使用左坐标、上坐标定位。</p>
* <p>Copyright: Copyright (c) xio.name 2006</p>
* @author xio
*/function DragablePanel(ui, container) { this.base = Panel; this.base(ui); this.setPosition("absolute"); this.setCursor(Cursor.MOVE); this.container = container; this.addMouseListener(new DragablePanelMouseListener(this, container));}DragablePanel.prototype = new Panel();DragablePanel.prototype.toString = function () { return "[Component,Panel,DragablePanel]";};///** * */function DragablePanelMouseListener(source, container) { this.source = source; this.container = container;}DragablePanelMouseListener.prototype = new MouseListener();DragablePanelMouseListener.prototype.onMouseDown = function (e) { var theButton = e.button; if (theButton == Browser.BUTTON_LEFT) { this.container.setDragSource(this.source); this.container.setDragCoord(Toolkit.getContainerCoord(e, this.container)); }};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?