java.awt.peer.WindowPeer Java Examples

The following examples show how to use java.awt.peer.WindowPeer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: D3DGraphicsDevice.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void exitFullScreenExclusive(final int screen, WindowPeer w) {
    if (fsStatus) {
        D3DRenderQueue rq = D3DRenderQueue.getInstance();
        rq.lock();
        try {
            rq.flushAndInvokeNow(new Runnable() {
                public void run() {
                    exitFullScreenExclusiveNative(screen);
                }
            });
        } finally {
            rq.unlock();
        }
    } else {
        super.exitFullScreenExclusive(screen, w);
    }
}
 
Example #2
Source File: D3DGraphicsDevice.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@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);
    }
}
 
Example #3
Source File: D3DGraphicsDevice.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void exitFullScreenExclusive(final int screen, WindowPeer w) {
    if (fsStatus) {
        D3DRenderQueue rq = D3DRenderQueue.getInstance();
        rq.lock();
        try {
            rq.flushAndInvokeNow(new Runnable() {
                public void run() {
                    exitFullScreenExclusiveNative(screen);
                }
            });
        } finally {
            rq.unlock();
        }
    } else {
        super.exitFullScreenExclusive(screen, w);
    }
}
 
Example #4
Source File: D3DGraphicsDevice.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@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);
    }
}
 
Example #5
Source File: D3DGraphicsDevice.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@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);
    }
}
 
Example #6
Source File: D3DGraphicsDevice.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@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);
    }
}
 
Example #7
Source File: Window.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void setSecurityWarningPosition(Window window,
        Point2D point, float alignmentX, float alignmentY)
{
    window.securityWarningPointX = point.getX();
    window.securityWarningPointY = point.getY();
    window.securityWarningAlignmentX = alignmentX;
    window.securityWarningAlignmentY = alignmentY;

    synchronized (window.getTreeLock()) {
        WindowPeer peer = (WindowPeer)window.getPeer();
        if (peer != null) {
            peer.repositionSecurityWarning();
        }
    }
}
 
Example #8
Source File: Window.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private void updateWindow() {
    synchronized (getTreeLock()) {
        WindowPeer peer = (WindowPeer)getPeer();
        if (peer != null) {
            peer.updateWindow();
        }
    }
}
 
Example #9
Source File: Window.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void setModalBlocked(Dialog blocker, boolean blocked, boolean peerCall) {
    this.modalBlocker = blocked ? blocker : null;
    if (peerCall) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.setModalBlocked(blocker, blocked);
        }
    }
}
 
Example #10
Source File: Window.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
final void toFront_NoClientCode() {
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toFront();
        }
        if (isModalBlocked()) {
            modalBlocker.toFront_NoClientCode();
        }
    }
}
 
Example #11
Source File: Window.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
final void toFront_NoClientCode() {
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toFront();
        }
        if (isModalBlocked()) {
            modalBlocker.toFront_NoClientCode();
        }
    }
}
 
Example #12
Source File: Window.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void setSecurityWarningPosition(Window window,
        Point2D point, float alignmentX, float alignmentY)
{
    window.securityWarningPointX = point.getX();
    window.securityWarningPointY = point.getY();
    window.securityWarningAlignmentX = alignmentX;
    window.securityWarningAlignmentY = alignmentY;

    synchronized (window.getTreeLock()) {
        WindowPeer peer = (WindowPeer)window.getPeer();
        if (peer != null) {
            peer.repositionSecurityWarning();
        }
    }
}
 
Example #13
Source File: Window.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public void setSecurityWarningPosition(Window window,
        Point2D point, float alignmentX, float alignmentY)
{
    window.securityWarningPointX = point.getX();
    window.securityWarningPointY = point.getY();
    window.securityWarningAlignmentX = alignmentX;
    window.securityWarningAlignmentY = alignmentY;

    synchronized (window.getTreeLock()) {
        WindowPeer peer = (WindowPeer)window.getPeer();
        if (peer != null) {
            peer.repositionSecurityWarning();
        }
    }
}
 
Example #14
Source File: Window.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
final void toBack_NoClientCode() {
    if(isAlwaysOnTop()) {
        try {
            setAlwaysOnTop(false);
        }catch(SecurityException e) {
        }
    }
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toBack();
        }
    }
}
 
Example #15
Source File: Window.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
final void toFront_NoClientCode() {
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toFront();
        }
        if (isModalBlocked()) {
            modalBlocker.toFront_NoClientCode();
        }
    }
}
 
Example #16
Source File: Window.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
static void updateChildFocusableWindowState(Window w) {
    if (w.getPeer() != null && w.isShowing()) {
        ((WindowPeer)w.getPeer()).updateFocusableWindowState();
    }
    for (int i = 0; i < w.ownedWindowList.size(); i++) {
        Window child = w.ownedWindowList.elementAt(i).get();
        if (child != null) {
            updateChildFocusableWindowState(child);
        }
    }
}
 
Example #17
Source File: Window.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
final void toFront_NoClientCode() {
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toFront();
        }
        if (isModalBlocked()) {
            modalBlocker.toFront_NoClientCode();
        }
    }
}
 
Example #18
Source File: Window.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
final void toBack_NoClientCode() {
    if(isAlwaysOnTop()) {
        try {
            setAlwaysOnTop(false);
        }catch(SecurityException e) {
        }
    }
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toBack();
        }
    }
}
 
Example #19
Source File: Window.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void setSecurityWarningPosition(Window window,
        Point2D point, float alignmentX, float alignmentY)
{
    window.securityWarningPointX = point.getX();
    window.securityWarningPointY = point.getY();
    window.securityWarningAlignmentX = alignmentX;
    window.securityWarningAlignmentY = alignmentY;

    synchronized (window.getTreeLock()) {
        WindowPeer peer = (WindowPeer)window.getPeer();
        if (peer != null) {
            peer.repositionSecurityWarning();
        }
    }
}
 
Example #20
Source File: Window.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void setModalBlocked(Dialog blocker, boolean blocked, boolean peerCall) {
    this.modalBlocker = blocked ? blocker : null;
    if (peerCall) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.setModalBlocked(blocker, blocked);
        }
    }
}
 
Example #21
Source File: Window.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
final void toBack_NoClientCode() {
    if(isAlwaysOnTop()) {
        try {
            setAlwaysOnTop(false);
        }catch(SecurityException e) {
        }
    }
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toBack();
        }
    }
}
 
Example #22
Source File: Window.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private void updateWindow() {
    synchronized (getTreeLock()) {
        WindowPeer peer = (WindowPeer)getPeer();
        if (peer != null) {
            peer.updateWindow();
        }
    }
}
 
Example #23
Source File: Window.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public void setSecurityWarningPosition(Window window,
        Point2D point, float alignmentX, float alignmentY)
{
    window.securityWarningPointX = point.getX();
    window.securityWarningPointY = point.getY();
    window.securityWarningAlignmentX = alignmentX;
    window.securityWarningAlignmentY = alignmentY;

    synchronized (window.getTreeLock()) {
        WindowPeer peer = (WindowPeer)window.getPeer();
        if (peer != null) {
            peer.repositionSecurityWarning();
        }
    }
}
 
Example #24
Source File: Window.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void setModalBlocked(Dialog blocker, boolean blocked, boolean peerCall) {
    this.modalBlocker = blocked ? blocker : null;
    if (peerCall) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.setModalBlocked(blocker, blocked);
        }
    }
}
 
Example #25
Source File: Window.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
final void toBack_NoClientCode() {
    if(isAlwaysOnTop()) {
        try {
            setAlwaysOnTop(false);
        }catch(SecurityException e) {
        }
    }
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toBack();
        }
    }
}
 
Example #26
Source File: Window.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
final void toFront_NoClientCode() {
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toFront();
        }
        if (isModalBlocked()) {
            modalBlocker.toFront_NoClientCode();
        }
    }
}
 
Example #27
Source File: Window.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
final void toBack_NoClientCode() {
    if(isAlwaysOnTop()) {
        try {
            setAlwaysOnTop(false);
        }catch(SecurityException e) {
        }
    }
    if (visible) {
        WindowPeer peer = (WindowPeer)this.peer;
        if (peer != null) {
            peer.toBack();
        }
    }
}
 
Example #28
Source File: Window.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static void updateChildFocusableWindowState(Window w) {
    if (w.getPeer() != null && w.isShowing()) {
        ((WindowPeer)w.getPeer()).updateFocusableWindowState();
    }
    for (int i = 0; i < w.ownedWindowList.size(); i++) {
        Window child = w.ownedWindowList.elementAt(i).get();
        if (child != null) {
            updateChildFocusableWindowState(child);
        }
    }
}
 
Example #29
Source File: Window.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private void updateWindow() {
    synchronized (getTreeLock()) {
        WindowPeer peer = (WindowPeer)getPeer();
        if (peer != null) {
            peer.updateWindow();
        }
    }
}
 
Example #30
Source File: Window.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void setSecurityWarningPosition(Window window,
        Point2D point, float alignmentX, float alignmentY)
{
    window.securityWarningPointX = point.getX();
    window.securityWarningPointY = point.getY();
    window.securityWarningAlignmentX = alignmentX;
    window.securityWarningAlignmentY = alignmentY;

    synchronized (window.getTreeLock()) {
        WindowPeer peer = (WindowPeer)window.getPeer();
        if (peer != null) {
            peer.repositionSecurityWarning();
        }
    }
}