comparison src/org/tn5250j/framework/tn5250/Rect.java @ 3:e8d2a24e85c6 tn5250

adding tn5250 files
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 12:11:10 -0700
parents
children b29b39f386a4
comparison
equal deleted inserted replaced
2:a01665cb683d 3:e8d2a24e85c6
1 /**
2 * $Id: Rect.java 1092 2011-01-16 20:27:56Z master_jaf $
3 *
4 * Title: tn5250J
5 * Copyright: Copyright (c) 2001,2009
6 * Company:
7 * @author: master_jaf
8 *
9 * Description:
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
14 * any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this software; see the file COPYING. If not, write to
23 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
24 * Boston, MA 02111-1307 USA
25 *
26 */
27 package org.tn5250j.framework.tn5250;
28
29
30 /**
31 * Simplified rectangle class. Very much similar like java.awt.Rectangle,
32 * but we want to decouple the packages ...
33 */
34 public class Rect {
35
36 /* default */ int x;
37 /* default */ int y;
38 /* default */ int height;
39 /* default */ int width;
40
41 /**
42 * @param rect
43 */
44 public void setBounds(Rect rect) {
45 setBounds(rect.x, rect.y, rect.width, rect.height);
46 }
47
48 /**
49 * @param x the new X coordinate for the upper-left corner of this rectangle
50 * @param y the new Y coordinate for the upper-left corner of this rectangle
51 * @param width the new width for this rectangle
52 * @param height the new height for this rectangle
53 */
54 public void setBounds(int x, int y, int width, int height) {
55 this.x = x;
56 this.y = y;
57 this.width = width;
58 this.height = height;
59 }
60
61 }