Mercurial > hg > Applications > TreeVNC
annotate src/viewer_swing/java/com/glavsoft/viewer/FbRectangle.java @ 551:e912db2ab778
fix RetinaDisplay API for java9 and above
author | e165729 <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 29 Jan 2020 00:25:42 +0900 |
parents | 8d636adb292c |
children | b37ae3e512cc |
rev | line source |
---|---|
458 | 1 package com.glavsoft.viewer; |
2 | |
3 import java.awt.Rectangle; | |
4 | |
5 /** | |
6 * Created by one on 6/23/16. | |
7 */ | |
8 public class FbRectangle extends Rectangle { | |
9 int retinaScale; | |
10 int xfb; | |
11 int yfb; | |
12 int screenNumber; | |
551
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
13 boolean isRetina; |
458 | 14 |
551
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
15 public FbRectangle(int x, int y, int width, int height, int screenNumber, int scale, boolean isRetina) { |
458 | 16 super(x, y, width, height); |
17 this.screenNumber = screenNumber; | |
18 this.retinaScale = scale; | |
551
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
19 this.isRetina = isRetina; |
458 | 20 this.xfb = x; |
21 this.yfb = y; | |
22 } | |
23 | |
24 public int getRetinaScale() { | |
25 return retinaScale; | |
26 } | |
27 | |
28 public void setRetinaScale(int retinaScale) { | |
29 this.retinaScale = retinaScale; | |
30 } | |
31 | |
32 public int getXfb() { | |
33 return xfb; | |
34 } | |
35 | |
36 public void setXfb(int xfb) { | |
37 this.xfb = xfb; | |
38 } | |
39 | |
40 public int getYfb() { | |
41 return yfb; | |
42 } | |
43 | |
44 public void setYfb(int yfb) { | |
45 this.yfb = yfb; | |
46 } | |
47 | |
48 public int getScreenNumber() { | |
49 return screenNumber; | |
50 } | |
51 | |
52 public void setScreenNumber(int screenNumber) { | |
53 this.screenNumber = screenNumber; | |
54 } | |
466 | 55 |
551
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
56 public boolean getIsRetina() { |
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
57 return this.isRetina; |
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
58 } |
e912db2ab778
fix RetinaDisplay API for java9 and above
e165729 <e165729@ie.u-ryukyu.ac.jp>
parents:
466
diff
changeset
|
59 |
466 | 60 @Override |
61 public String toString() { | |
62 return "FRectangle(x="+x+",y="+y+",xFb="+xfb+",yFb="+yfb+",w="+width+",h="+height+")"; | |
63 } | |
458 | 64 } |