Mercurial > ScreenAdjuster
comparison ScreenAdjuster.java @ 6:9e99396a84ef
Whitespace cleanup.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Tue, 14 Jul 2015 16:03:58 +0200 |
| parents | 09dcc2e5058a |
| children |
comparison
equal
deleted
inserted
replaced
| 5:09dcc2e5058a | 6:9e99396a84ef |
|---|---|
| 36 boolean messageBBox = false; | 36 boolean messageBBox = false; |
| 37 | 37 |
| 38 BufferedImage bufferedImage; | 38 BufferedImage bufferedImage; |
| 39 Graphics2D g2; | 39 Graphics2D g2; |
| 40 Rectangle curBounds; | 40 Rectangle curBounds; |
| 41 | 41 |
| 42 enum MessageStatus { TIMEOUT, SHOW, HIDE }; | 42 enum MessageStatus { TIMEOUT, SHOW, HIDE }; |
| 43 | 43 |
| 44 javax.swing.Timer messageTimeout = | 44 javax.swing.Timer messageTimeout = |
| 45 new javax.swing.Timer((int)(TIMEOUT_IN_SECONDS * 1000), this); | 45 new javax.swing.Timer((int)(TIMEOUT_IN_SECONDS * 1000), this); |
| 46 | 46 |
| 51 bufferedImage = new BufferedImage(bounds.width, bounds.height, BufferedImage.TYPE_INT_ARGB); | 51 bufferedImage = new BufferedImage(bounds.width, bounds.height, BufferedImage.TYPE_INT_ARGB); |
| 52 g2 = bufferedImage.createGraphics(); | 52 g2 = bufferedImage.createGraphics(); |
| 53 curBounds = bounds; | 53 curBounds = bounds; |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 ScreenAdjuster(boolean fullScreen) | 57 ScreenAdjuster(boolean fullScreen) |
| 58 { | 58 { |
| 59 messageTimeout.setRepeats(false); | 59 messageTimeout.setRepeats(false); |
| 60 | 60 |
| 61 nextFrame(); | 61 nextFrame(); |
| 382 } | 382 } |
| 383 }; | 383 }; |
| 384 if (messageVisible) { | 384 if (messageVisible) { |
| 385 drawMessage(g2); | 385 drawMessage(g2); |
| 386 } | 386 } |
| 387 ((Graphics2D) g).drawImage(bufferedImage, null, 0, 0); | 387 ((Graphics2D) g).drawImage(bufferedImage, null, 0, 0); |
| 388 } | 388 } |
| 389 | 389 |
| 390 void drawMessage(Graphics2D g2) | 390 void drawMessage(Graphics2D g2) |
| 391 { | 391 { |
| 392 Font font = g2.getFont(); | 392 Font font = g2.getFont(); |
