1 package com.calipso.reportgenerator.common; 2 3 15 16 18 import java.awt.Dimension ; 19 import java.awt.Point ; 20 21 27 public class AbsoluteConstraints implements java.io.Serializable { 28 29 static final long serialVersionUID = 5261460716622152494L; 30 31 32 public int x; 33 34 public int y; 35 36 public int width = -1; 37 38 public int height = -1; 39 40 43 public AbsoluteConstraints(Point pos) { 44 this (pos.x, pos.y); 45 } 46 47 51 public AbsoluteConstraints(int x, int y) { 52 this.x = x; 53 this.y = y; 54 } 55 56 61 public AbsoluteConstraints(Point pos, Dimension size) { 62 this.x = pos.x; 63 this.y = pos.y; 64 if (size != null) { 65 this.width = size.width; 66 this.height = size.height; 67 } 68 } 69 70 78 public AbsoluteConstraints(int x, int y, int width, int height) { 79 this.x = x; 80 this.y = y; 81 this.width = width; 82 this.height = height; 83 } 84 85 86 public int getX () { 87 return x; 88 } 89 90 91 public int getY () { 92 return y; 93 } 94 95 98 public int getWidth () { 99 return width; 100 } 101 102 105 public int getHeight () { 106 return height; 107 } 108 109 public String toString () { 110 return super.toString () +" [x="+x+", y="+y+", width="+width+", height="+height+"]"; 111 } 112 113 } 114 115 | Popular Tags |