@Override protected int getRootPaneDecorationStyle() { if ((! isDecorateDialogs()) || ((Dialog) getAWTComponent()).isUndecorated()) { return JRootPane.NONE; } else { return JRootPane.PLAIN_DIALOG; } }
if (HierarchyEvent.HIERARCHY_CHANGED == he.getID() && he.getComponent() instanceof JOptionPane) { final JDialog dlg = (JDialog) SwingUtilities.windowForComponent(he.getChangedParent()); if (dlg != null && !dlg.isUndecorated()) { dlg.setUndecorated(true);
sheet = new JSheet((Frame) window); } else { isUndecorated = ((Dialog) window).isUndecorated(); sheet = new JSheet((Dialog) window);
private static X11.Window getContentWindow(Window w, X11.Display dpy, X11.Window win, Point offset) { if ((w instanceof Frame && !((Frame)w).isUndecorated()) || (w instanceof Dialog && !((Dialog)w).isUndecorated())) { X11 x11 = X11.INSTANCE; X11.WindowByReference rootp = new X11.WindowByReference(); X11.WindowByReference parentp = new X11.WindowByReference(); PointerByReference childrenp = new PointerByReference(); IntByReference countp = new IntByReference(); x11.XQueryTree(dpy, win, rootp, parentp, childrenp, countp); Pointer p = childrenp.getValue(); int[] ids = p.getIntArray(0, countp.getValue()); for (int id : ids) { // TODO: more verification of correct window? X11.Window child = new X11.Window(id); X11.XWindowAttributes xwa = new X11.XWindowAttributes(); x11.XGetWindowAttributes(dpy, child, xwa); offset.x = -xwa.x; offset.y = -xwa.y; win = child; break; } if (p != null) { x11.XFree(p); } } return win; }
private static X11.Window getContentWindow(Window w, X11.Display dpy, X11.Window win, Point offset) { if ((w instanceof Frame && !((Frame)w).isUndecorated()) || (w instanceof Dialog && !((Dialog)w).isUndecorated())) { X11 x11 = X11.INSTANCE; X11.WindowByReference rootp = new X11.WindowByReference(); X11.WindowByReference parentp = new X11.WindowByReference(); PointerByReference childrenp = new PointerByReference(); IntByReference countp = new IntByReference(); x11.XQueryTree(dpy, win, rootp, parentp, childrenp, countp); Pointer p = childrenp.getValue(); int[] ids = p.getIntArray(0, countp.getValue()); for (int id : ids) { // TODO: more verification of correct window? X11.Window child = new X11.Window(id); X11.XWindowAttributes xwa = new X11.XWindowAttributes(); x11.XGetWindowAttributes(dpy, child, xwa); offset.x = -xwa.x; offset.y = -xwa.y; win = child; break; } if (p != null) { x11.XFree(p); } } return win; }
if (parentWindow != null && childWindow != null && childWindow.isUndecorated()) { final WindowListener[] listeners = parentWindow.getWindowListeners(); for (int x = 0; x != listeners.length; x++) {
undecorated = ( ( JDialog ) w ).isUndecorated ();
Window w = (Window) e.getComponent(); if ((w instanceof Frame && !((Frame)w).isUndecorated()) || (w instanceof Dialog && !((Dialog)w).isUndecorated()))