Esempio n. 1
0
 public void setResizable(boolean resizable) {
   int fs = winAttr.functions;
   if (!isResizable() && resizable) {
     insets = currentInsets = new Insets(0, 0, 0, 0);
     resetWMSetInsets();
     if (!isEmbedded()) {
       setReparented(false);
     }
     winAttr.isResizable = resizable;
     if ((fs & MWM_FUNC_ALL) != 0) {
       fs &= ~(MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE);
     } else {
       fs |= (MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE);
     }
     winAttr.functions = fs;
     XWM.setShellResizable(this);
   } else if (isResizable() && !resizable) {
     insets = currentInsets = new Insets(0, 0, 0, 0);
     resetWMSetInsets();
     if (!isEmbedded()) {
       setReparented(false);
     }
     winAttr.isResizable = resizable;
     if ((fs & MWM_FUNC_ALL) != 0) {
       fs |= (MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE);
     } else {
       fs &= ~(MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE);
     }
     winAttr.functions = fs;
     XWM.setShellNotResizable(this, dimensions, dimensions.getScreenBounds(), false);
   }
 }