jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java
changeset 13550 648dd6fa0dee
parent 13234 9437e5985d73
child 13647 de61414bbcf2
equal deleted inserted replaced
13549:d3ec89e4a9ab 13550:648dd6fa0dee
   336         }
   336         }
   337         if (h < MINIMUM_HEIGHT) {
   337         if (h < MINIMUM_HEIGHT) {
   338             h = MINIMUM_HEIGHT;
   338             h = MINIMUM_HEIGHT;
   339         }
   339         }
   340 
   340 
       
   341         if (graphicsConfig instanceof TextureSizeConstraining) {
       
   342             final int maxW = ((TextureSizeConstraining)graphicsConfig).getMaxTextureWidth();
       
   343             final int maxH = ((TextureSizeConstraining)graphicsConfig).getMaxTextureHeight();
       
   344 
       
   345             if (w > maxW) {
       
   346                 w = maxW;
       
   347             }
       
   348             if (h > maxH) {
       
   349                 h = maxH;
       
   350             }
       
   351         }
       
   352 
   341         // Don't post ComponentMoved/Resized and Paint events
   353         // Don't post ComponentMoved/Resized and Paint events
   342         // until we've got a notification from the delegate
   354         // until we've got a notification from the delegate
   343         setBounds(x, y, w, h, op, false, false);
   355         setBounds(x, y, w, h, op, false, false);
   344         // Get updated bounds, so we don't have to handle 'op' here manually
   356         // Get updated bounds, so we don't have to handle 'op' here manually
   345         Rectangle r = getBounds();
   357         Rectangle r = getBounds();
   403         platformWindow.setModalBlocked(blocked);
   415         platformWindow.setModalBlocked(blocked);
   404     }
   416     }
   405 
   417 
   406     @Override
   418     @Override
   407     public void updateMinimumSize() {
   419     public void updateMinimumSize() {
   408         Dimension d = null;
   420         final Dimension min;
   409         if (getTarget().isMinimumSizeSet()) {
   421         if (getTarget().isMinimumSizeSet()) {
   410             d = getTarget().getMinimumSize();
   422             min = getTarget().getMinimumSize();
   411         }
   423             min.width = Math.max(min.width, MINIMUM_WIDTH);
   412         if (d == null) {
   424             min.height = Math.max(min.height, MINIMUM_HEIGHT);
   413             d = new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT);
   425         } else {
   414         }
   426             min = new Dimension(MINIMUM_WIDTH, MINIMUM_HEIGHT);
   415         platformWindow.setMinimumSize(d.width, d.height);
   427         }
       
   428 
       
   429         final int maxW, maxH;
       
   430         if (graphicsConfig instanceof TextureSizeConstraining) {
       
   431             maxW = ((TextureSizeConstraining)graphicsConfig).getMaxTextureWidth();
       
   432             maxH = ((TextureSizeConstraining)graphicsConfig).getMaxTextureHeight();
       
   433         } else {
       
   434             maxW = maxH = Integer.MAX_VALUE;
       
   435         }
       
   436 
       
   437         final Dimension max;
       
   438         if (getTarget().isMaximumSizeSet()) {
       
   439             max = getTarget().getMaximumSize();
       
   440             max.width = Math.min(max.width, maxW);
       
   441             max.height = Math.min(max.height, maxH);
       
   442         } else {
       
   443             max = new Dimension(maxW, maxH);
       
   444         }
       
   445 
       
   446         platformWindow.setSizeConstraints(min.width, min.height, max.width, max.height);
   416     }
   447     }
   417 
   448 
   418     @Override
   449     @Override
   419     public void updateIconImages() {
   450     public void updateIconImages() {
   420         getPlatformWindow().updateIconImages();
   451         getPlatformWindow().updateIconImages();