dimension.js

来自「这是一个关于java的JSP页面中使用象Swing组件的一个库文件.」· JavaScript 代码 · 共 55 行

JS
55
字号
function uiUtil_Dimension(left, top, width, height) {  this._super();  this.__left = left;  this.__top = top;  this.__width = width;  this.__height = height;  this.__right = null;  this.__bottom = null;}uiUtil_Dimension = uiUtil_Object.declareClass(uiUtil_Dimension, uiUtil_Object);uiUtil_Dimension.prototype.getWidth = function() {  return this.__width;};uiUtil_Dimension.prototype.getHeight = function() {  return this.__height;};uiUtil_Dimension.prototype.getLeft = function() {  return this.__left;};uiUtil_Dimension.prototype.getRight = function() {  if (this.__right == null) {    this.__right = this.__left + this.__width;  }  return this.__right;};uiUtil_Dimension.prototype.getTop = function() {  return this.__top;};uiUtil_Dimension.prototype.getBottom = function() {  if (this.__bottom == null) {    this.__bottom = this.__top + this.__height;  }  return this.__bottom;};uiUtil_Dimension.prototype.toString = function() {  return this.getClassName() + " [" +      " x=" + this.__left +      " y=" + this.__top +      " width=" + this.__width +      " height=" + this.__height +      " ]";};uiUtil_Dimension.prototype.equals = function(obj) {  if (this == obj) {    return true;  }  if (!(obj instanceof uiUtil_Dimension)) {    return false;  }  return (this.__left == obj.__left) &&      (this.__top == obj.__top) &&      (this.__width == obj.__width) &&      (this.__height == obj.__height);};

⌨️ 快捷键说明

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