Dimension.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 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 + "]";
- };