01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.ui.client.util;
09:
10: /**
11: * Instances of this class represent a rectangle's size.
12: */
13: public class Size {
14:
15: public static Size newInstance(int x, int y) {
16: return new Size(x, y);
17: }
18:
19: /**
20: * The width.
21: */
22: public int width;
23:
24: /**
25: * The height.
26: */
27: public int height;
28:
29: /**
30: * Creates a new size instance.
31: *
32: * @param width the width
33: * @param height the height
34: */
35: public Size(int width, int height) {
36: this .width = width;
37: this .height = height;
38: }
39:
40: public String toString() {
41: return "height: " + height + ", width: " + width;
42: }
43:
44: }
|