dimension.js

来自「xiorkflow工作流源码 是一个java开发的工作流源码」· JavaScript 代码 · 共 52 行

JS
52
字号
/** * <p>Title:  </p> * <p>Description: </p> * <p>Copyright: Copyright (c) xio.name 2006</p> * @author xio */function Dimension(width, height) {    this.width;    this.height;    if (width) {        this.width = width;    }    if (height) {        this.height = height;    }}Dimension.prototype.toString = function () {    return "[Dimension]";};Dimension.prototype.getHeight = function () {    return this.height;};Dimension.prototype.getWidth = function () {    return this.width;};Dimension.prototype.getSize = function () {    return this;};Dimension.prototype.setHeight = function (height) {    if (height) {        this.height = height;    }};Dimension.prototype.setWidth = function (width) {    if (width) {        this.width = width;    }};Dimension.prototype.setSize = function (width, height) {    if (width) {        this.width = width;    }    if (height) {        this.height = height;    }};Dimension.prototype.toString = function () {    return "[width=" + this.width + ",height=" + this.height + "]";};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?