Java 类sun.awt.WindowIDProvider 实例源码

项目:jdk8u-jdk    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:openjdk-jdk10    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    WindowIDProvider pid = (WindowIDProvider)acc.getPeer(client);
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:openjdk9    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    final ComponentAccessor acc = AWTAccessor.getComponentAccessor();
    WindowIDProvider pid = (WindowIDProvider)acc.getPeer(client);
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:jdk8u_jdk    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:lookaside_java-1.8.0-openjdk    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:infobip-open-jdk-8    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:jdk8u-dev-jdk    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:jdk7-jdk    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:openjdk-source-code-learn    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:OLD-OpenJDK8    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:JAVA_UNIT    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:openjdk-jdk7u-jdk    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}
项目:openjdk-icedtea7    文件:TestXEmbedServer.java   
public void addClient() {
    client = new Canvas() {
            public void paint(Graphics g) {
                super.paint(g);
            }
        };
    client.setBackground(new Color(30, 220, 40));
    clientCont.add(client);
    clientCont.validate();
    WindowIDProvider pid = (WindowIDProvider)client.getPeer();
    log.fine("Added XEmbed server(Canvas) with X window ID " + pid.getWindow());
    Rectangle toFocusBounds = toFocus.getBounds();
    toFocusBounds.setLocation(toFocus.getLocationOnScreen());
    f.validate();

    // KDE doesn't accept clicks on title as activation - click below title
    Rectangle fbounds = f.getBounds();
    fbounds.y += f.getInsets().top;
    fbounds.height -= f.getInsets().top;

    Process proc = startClient(new Rectangle[] {fbounds, dummy.getBounds(), toFocusBounds,
                                                new Rectangle(b_modal.getLocationOnScreen(), b_modal.getSize()),
                                                new Rectangle(10, 130, 20, 20)}, pid.getWindow());
    new ClientWatcher(client, proc, clientCont).start();
}