类sun.awt.WindowIDProvider源码实例Demo

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

源代码1 项目: dragonwell8_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();
}
 
源代码2 项目: TencentKona-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();
}
 
源代码3 项目: jdk8u60   文件: 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();
}
 
源代码4 项目: openjdk-jdk8u   文件: 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();
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: 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();
}
 
源代码6 项目: openjdk-jdk9   文件: 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();
}
 
源代码7 项目: 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();
}
 
源代码8 项目: hottub   文件: 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();
}
 
源代码9 项目: openjdk-8-source   文件: 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();
}
 
源代码10 项目: openjdk-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();
}
 
源代码11 项目: 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();
}
 
源代码12 项目: 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();
}
 
源代码13 项目: 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();
}
 
 类所在包
 类方法
 同包方法