类sun.awt.AWTAccessor.WindowAccessor源码实例Demo

下面列出了怎么用sun.awt.AWTAccessor.WindowAccessor的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified() && !rootOwner.isActive()) {
        rootOwner.execute(CWrapper.NSWindow::orderFront);
    }

    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码2 项目: TencentKona-8   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified() && !rootOwner.isActive()) {
        rootOwner.execute(CWrapper.NSWindow::orderFront);
    }

    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码3 项目: openjdk-jdk8u   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified() && !rootOwner.isActive()) {
        rootOwner.execute(CWrapper.NSWindow::orderFront);
    }

    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码4 项目: openjdk-jdk8u-backup   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified()) {
        rootOwner.execute(CWrapper.NSWindow::orderFront);
    }
    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码5 项目: openjdk-jdk9   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified()) {
        rootOwner.execute(CWrapper.NSWindow::orderFront);
    }
    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码6 项目: jdk8u-jdk   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified()) {
        CWrapper.NSWindow.orderFront(rootOwner.getNSWindowPtr());
    }
    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码7 项目: jdk8u-jdk   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    CWrapper.NSWindow.orderFront(pw.getNSWindowPtr());
                } else {
                    CWrapper.NSWindow.orderWindow(pw.getNSWindowPtr(), CWrapper.NSWindow.NSWindowAbove,
                            pw.owner.getNSWindowPtr());
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
源代码8 项目: jdk8u_jdk   文件: CPlatformWindow.java
private void orderAboveSiblings() {
    // Recursively pop up the windows from the very bottom, (i.e. root owner) so that
    // the windows are ordered above their nearest owner; ancestors of the window,
    // which is going to become 'main window', are placed above their siblings.
    CPlatformWindow rootOwner = getRootOwner();
    if (rootOwner.isVisible() && !rootOwner.isIconified() && !rootOwner.isActive()) {
        rootOwner.execute(CWrapper.NSWindow::orderFront);
    }

    // Do not order child windows of iconified owner.
    if (!rootOwner.isIconified()) {
        final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();
        orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target));
    }
}
 
源代码9 项目: dragonwell8_jdk   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    pw.execute(CWrapper.NSWindow::orderFront);
                } else {
                    pw.owner.execute(ownerPtr -> {
                        pw.execute(ptr -> {
                            CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
                        });
                    });
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
源代码10 项目: TencentKona-8   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    pw.execute(CWrapper.NSWindow::orderFront);
                } else {
                    pw.owner.execute(ownerPtr -> {
                        pw.execute(ptr -> {
                            CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
                        });
                    });
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
源代码11 项目: openjdk-jdk8u   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    pw.execute(CWrapper.NSWindow::orderFront);
                } else {
                    pw.owner.execute(ownerPtr -> {
                        pw.execute(ptr -> {
                            CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
                        });
                    });
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
源代码12 项目: openjdk-jdk8u-backup   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    pw.execute(CWrapper.NSWindow::orderFront);
                } else {
                    pw.owner.execute(ownerPtr -> {
                        pw.execute(ptr -> {
                            CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
                        });
                    });
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
源代码13 项目: openjdk-jdk9   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    pw.execute(CWrapper.NSWindow::orderFront);
                } else {
                    pw.owner.execute(ownerPtr -> {
                        pw.execute(ptr -> {
                            CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
                        });
                    });
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
源代码14 项目: jdk8u_jdk   文件: CPlatformWindow.java
private void orderAboveSiblingsImpl(Window[] windows) {
    ArrayList<Window> childWindows = new ArrayList<Window>();

    final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
    final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor();

    // Go through the list of windows and perform ordering.
    for (Window w : windows) {
        boolean iconified = false;
        final Object p = componentAccessor.getPeer(w);
        if (p instanceof LWWindowPeer) {
            CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow();
            iconified = isIconified();
            if (pw != null && pw.isVisible() && !iconified) {
                // If the window is one of ancestors of 'main window' or is going to become main by itself,
                // the window should be ordered above its siblings; otherwise the window is just ordered
                // above its nearest parent.
                if (pw.isOneOfOwnersOrSelf(this)) {
                    pw.execute(CWrapper.NSWindow::orderFront);
                } else {
                    pw.owner.execute(ownerPtr -> {
                        pw.execute(ptr -> {
                            CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr);
                        });
                    });
                }
                pw.applyWindowLevel(w);
            }
        }
        // Retrieve the child windows for each window from the list except iconified ones
        // and store them for future use.
        // Note: we collect data about child windows even for invisible owners, since they may have
        // visible children.
        if (!iconified) {
            childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w)));
        }
    }
    // If some windows, which have just been ordered, have any child windows, let's start new iteration
    // and order these child windows.
    if (!childWindows.isEmpty()) {
        orderAboveSiblingsImpl(childWindows.toArray(new Window[0]));
    }
}
 
 类所在包
 类方法
 同包方法