Ejemplo n.º 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();
   }
 }
Ejemplo n.º 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");
   }
 }