类sun.awt.windows.WWindowPeer源码实例Demo

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

源代码1 项目: dragonwell8_jdk   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码2 项目: dragonwell8_jdk   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码3 项目: TencentKona-8   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码4 项目: TencentKona-8   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码5 项目: jdk8u60   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码6 项目: jdk8u60   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码7 项目: openjdk-jdk8u   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码8 项目: openjdk-jdk8u   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码9 项目: openjdk-jdk8u-backup   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码10 项目: openjdk-jdk8u-backup   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码11 项目: openjdk-jdk9   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = AWTAccessor.getComponentAccessor()
                                         .getPeer(realFSWindow);
    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码12 项目: openjdk-jdk9   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = acc.getPeer(realFSWindow);
        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer) acc.getPeer(realFSWindow)).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码13 项目: jdk8u-jdk   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码14 项目: jdk8u-jdk   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码15 项目: hottub   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码16 项目: hottub   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码17 项目: openjdk-8-source   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码18 项目: openjdk-8-source   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码19 项目: openjdk-8   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码20 项目: openjdk-8   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码21 项目: jdk8u_jdk   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码22 项目: jdk8u_jdk   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码23 项目: jdk8u-jdk   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码24 项目: jdk8u-jdk   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码25 项目: jdk8u-dev-jdk   文件: D3DGraphicsDevice.java
@Override
protected void enterFullScreenExclusive(final int screen, WindowPeer wp)
{
    final WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();

    D3DRenderQueue rq = D3DRenderQueue.getInstance();
    rq.lock();
    try {
        rq.flushAndInvokeNow(new Runnable() {
            public void run() {
                long hwnd = wpeer.getHWnd();
                if (hwnd == 0l) {
                    // window is disposed
                    fsStatus = false;
                    return;
                }
                fsStatus = enterFullScreenExclusiveNative(screen, hwnd);
            }
        });
    } finally {
        rq.unlock();
    }
    if (!fsStatus) {
        super.enterFullScreenExclusive(screen, wp);
    }
}
 
源代码26 项目: jdk8u-dev-jdk   文件: D3DGraphicsDevice.java
@Override
protected void addFSWindowListener(Window w) {
    // if the window is not a toplevel (has an owner) we have to use the
    // real toplevel to enter the full-screen mode with (4933099).
    if (!(w instanceof Frame) && !(w instanceof Dialog) &&
        (realFSWindow = getToplevelOwner(w)) != null)
    {
        ownerOrigBounds = realFSWindow.getBounds();
        WWindowPeer fp = (WWindowPeer)realFSWindow.getPeer();

        ownerWasVisible = realFSWindow.isVisible();
        Rectangle r = w.getBounds();
        // we use operations on peer instead of component because calling
        // them on component will take the tree lock
        fp.reshape(r.x, r.y, r.width, r.height);
        fp.setVisible(true);
    } else {
        realFSWindow = w;
    }

    fsWindowWasAlwaysOnTop = realFSWindow.isAlwaysOnTop();
    ((WWindowPeer)realFSWindow.getPeer()).setAlwaysOnTop(true);

    fsWindowListener = new D3DFSWindowAdapter();
    realFSWindow.addWindowListener(fsWindowListener);
}
 
源代码27 项目: dragonwell8_jdk   文件: D3DGraphicsDevice.java
@Override
protected void removeFSWindowListener(Window w) {
    realFSWindow.removeWindowListener(fsWindowListener);
    fsWindowListener = null;

    /**
     * Bug 4933099: There is some funny-business to deal with when this
     * method is called with a Window instead of a Frame.  See 4836744
     * for more information on this.  One side-effect of our workaround
     * for the problem is that the owning Frame of a Window may end
     * up getting resized during the fullscreen process.  When we
     * return from fullscreen mode, we should resize the Frame to
     * its original size (just like the Window is being resized
     * to its original size in GraphicsDevice).
     */
    WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
    if (wpeer != null) {
        if (ownerOrigBounds != null) {
            // if the window went into fs mode before it was realized it
            // could have (0,0) dimensions
            if (ownerOrigBounds.width  == 0) ownerOrigBounds.width  = 1;
            if (ownerOrigBounds.height == 0) ownerOrigBounds.height = 1;
            wpeer.reshape(ownerOrigBounds.x,     ownerOrigBounds.y,
                          ownerOrigBounds.width, ownerOrigBounds.height);
            if (!ownerWasVisible) {
                wpeer.setVisible(false);
            }
            ownerOrigBounds = null;
        }
        if (!fsWindowWasAlwaysOnTop) {
            wpeer.setAlwaysOnTop(false);
        }
    }

    realFSWindow = null;
}
 
源代码28 项目: dragonwell8_jdk   文件: Win32GraphicsDevice.java
@Override
public synchronized void setDisplayMode(DisplayMode dm) {
    if (!isDisplayChangeSupported()) {
        super.setDisplayMode(dm);
        return;
    }
    if (dm == null || (dm = getMatchingDisplayMode(dm)) == null) {
        throw new IllegalArgumentException("Invalid display mode");
    }
    if (getDisplayMode().equals(dm)) {
        return;
    }
    Window w = getFullScreenWindow();
    if (w != null) {
        WWindowPeer peer = (WWindowPeer)w.getPeer();
        configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(),
            dm.getBitDepth(), dm.getRefreshRate());
        // resize the fullscreen window to the dimensions of the new
        // display mode
        Rectangle screenBounds = getDefaultConfiguration().getBounds();
        w.setBounds(screenBounds.x, screenBounds.y,
                    dm.getWidth(), dm.getHeight());
        // Note: no call to replaceSurfaceData is required here since
        // replacement will be caused by an upcoming display change event
    } else {
        throw new IllegalStateException("Must be in fullscreen mode " +
                                        "in order to set display mode");
    }
}
 
源代码29 项目: TencentKona-8   文件: D3DGraphicsDevice.java
@Override
protected void removeFSWindowListener(Window w) {
    realFSWindow.removeWindowListener(fsWindowListener);
    fsWindowListener = null;

    /**
     * Bug 4933099: There is some funny-business to deal with when this
     * method is called with a Window instead of a Frame.  See 4836744
     * for more information on this.  One side-effect of our workaround
     * for the problem is that the owning Frame of a Window may end
     * up getting resized during the fullscreen process.  When we
     * return from fullscreen mode, we should resize the Frame to
     * its original size (just like the Window is being resized
     * to its original size in GraphicsDevice).
     */
    WWindowPeer wpeer = (WWindowPeer)realFSWindow.getPeer();
    if (wpeer != null) {
        if (ownerOrigBounds != null) {
            // if the window went into fs mode before it was realized it
            // could have (0,0) dimensions
            if (ownerOrigBounds.width  == 0) ownerOrigBounds.width  = 1;
            if (ownerOrigBounds.height == 0) ownerOrigBounds.height = 1;
            wpeer.reshape(ownerOrigBounds.x,     ownerOrigBounds.y,
                          ownerOrigBounds.width, ownerOrigBounds.height);
            if (!ownerWasVisible) {
                wpeer.setVisible(false);
            }
            ownerOrigBounds = null;
        }
        if (!fsWindowWasAlwaysOnTop) {
            wpeer.setAlwaysOnTop(false);
        }
    }

    realFSWindow = null;
}
 
源代码30 项目: TencentKona-8   文件: Win32GraphicsDevice.java
@Override
public synchronized void setDisplayMode(DisplayMode dm) {
    if (!isDisplayChangeSupported()) {
        super.setDisplayMode(dm);
        return;
    }
    if (dm == null || (dm = getMatchingDisplayMode(dm)) == null) {
        throw new IllegalArgumentException("Invalid display mode");
    }
    if (getDisplayMode().equals(dm)) {
        return;
    }
    Window w = getFullScreenWindow();
    if (w != null) {
        WWindowPeer peer = (WWindowPeer)w.getPeer();
        configDisplayMode(screen, peer, dm.getWidth(), dm.getHeight(),
            dm.getBitDepth(), dm.getRefreshRate());
        // resize the fullscreen window to the dimensions of the new
        // display mode
        Rectangle screenBounds = getDefaultConfiguration().getBounds();
        w.setBounds(screenBounds.x, screenBounds.y,
                    dm.getWidth(), dm.getHeight());
        // Note: no call to replaceSurfaceData is required here since
        // replacement will be caused by an upcoming display change event
    } else {
        throw new IllegalStateException("Must be in fullscreen mode " +
                                        "in order to set display mode");
    }
}
 
 类所在包
 类方法
 同包方法