annotate src/org/tn5250j/framework/tn5250/Rect.java @ 148:69333ca1563c

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