Changeset 1112 for trunk/src/org/expeditee/gui
- Timestamp:
- 09/06/18 12:01:26 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/DisplayController.java
r1106 r1112 676 676 public static TwinFramesSide getCurrentSide() 677 677 { 678 678 679 // If the mouse is over the right side of the window and there's a valid frame, 679 680 // we are on the right side. 680 int mouseX = EcosystemManager.getInputManager().getCursorPosition().x; 681 if (isTwinFramesOn() && mouseX >= getTwinFramesSeparatorX() && sideHasFrame(RIGHT)) { 682 return RIGHT; 681 if(isTwinFramesOn()) { 682 int mouseX = EcosystemManager.getInputManager().getCursorPosition().x; 683 if(mouseX >= getTwinFramesSeparatorX() && sideHasFrame(RIGHT)) { 684 return RIGHT; 685 } 683 686 } 684 687 … … 1222 1225 private static void refresh(boolean useInvalidation) 1223 1226 { 1227 Frame currentFrame = getCurrentFrame(); 1228 if(currentFrame == null) { 1229 System.err.println("currentFrame == null"); 1230 return; 1231 } 1232 1224 1233 // Always get the clip as it clears at the same time 1225 1234 Clip clip = _damagedAreas.getClip(); … … 1260 1269 1261 1270 Image image = null; 1262 if ( !useInvalidation || !frameClip.isFullyClipped()) {1263 image = FrameGraphics.getFrameImage( getCurrentFrame(), frameClip, getFramePaintArea().getSize());1271 if (currentFrame != null && (!useInvalidation || !frameClip.isFullyClipped())) { 1272 image = FrameGraphics.getFrameImage(currentFrame, frameClip, getFramePaintArea().getSize()); 1264 1273 } 1265 1274 … … 1271 1280 Clip messageBayClip = null; 1272 1281 1282 AxisAlignedBoxBounds messageBayPaintArea = getMessageBayPaintArea(); 1273 1283 if (useInvalidation) { 1274 messageBayClip = clip.clone().intersectWith( getMessageBayPaintArea());1275 if (!messageBayClip.isFullyClipped()) messageBayClip = new Clip(messageBayClip.getBounds().translate(0, - getMessageBayPaintArea().getMinY()));1284 messageBayClip = clip.clone().intersectWith(messageBayPaintArea); 1285 if (!messageBayClip.isFullyClipped()) messageBayClip = new Clip(messageBayClip.getBounds().translate(0, -messageBayPaintArea.getMinY())); 1276 1286 } 1277 1287 1278 1288 Image image = null; 1279 1289 if (!useInvalidation || !messageBayClip.isFullyClipped()) { 1280 image = MessageBay.getImage(messageBayClip, getMessageBayPaintArea().getSize());1290 image = MessageBay.getImage(messageBayClip, messageBayPaintArea.getSize()); 1281 1291 } 1282 1292 1283 1293 if (image != null) { 1284 g.drawImage(image, getMessageBayPaintArea().getTopLeft(), getMessageBayPaintArea().getSize());1294 g.drawImage(image, messageBayPaintArea.getTopLeft(), messageBayPaintArea.getSize()); 1285 1295 } 1286 1296 } … … 1405 1415 { 1406 1416 try { 1407 if(EcosystemManager.IsEcosystemReady())refresh(_useInvalidation);1417 refresh(_useInvalidation); 1408 1418 } catch (Throwable e) { 1409 1419 e.printStackTrace();
Note:
See TracChangeset
for help on using the changeset viewer.