Пример #1
0
 public void xSetBounds(int x, int y, int width, int height) {
   if (getWindow() == 0) {
     insLog.warning("Attempt to resize uncreated window");
     throw new IllegalStateException("Attempt to resize uncreated window");
   }
   insLog.fine(
       "Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height);
   if (width <= 0) {
     width = 1;
   }
   if (height <= 0) {
     height = 1;
   }
   XToolkit.awtLock();
   try {
     XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), getWindow(), x, y, width, height);
   } finally {
     XToolkit.awtUnlock();
   }
 }
Пример #2
0
 static void checkSecurity() {
   if (XToolkit.isSecurityWarningEnabled() && XToolkit.isToolkitThread()) {
     StackTraceElement stack[] = (new Throwable()).getStackTrace();
     log.warning(stack[1] + ": Security violation: calling user code on toolkit thread");
   }
 }