Java 类javax.swing.plaf.basic.BasicPopupMenuUI 实例源码

项目:jdk8u-jdk    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:openjdk-jdk10    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:openjdk9    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:jdk8u_jdk    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:infobip-open-jdk-8    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:jdk8u-dev-jdk    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:jdk7-jdk    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:openjdk-source-code-learn    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:OLD-OpenJDK8    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:JAVA_UNIT    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:openjdk-jdk7u-jdk    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:openjdk-icedtea7    文件:bug6495920.java   
public void thirdValidate() throws Exception {
    Field key = BasicPopupMenuUI.class.getDeclaredField("MOUSE_GRABBER_KEY");
    key.setAccessible(true);

    Object grabber = AppContext.getAppContext().get(key.get(null));
    if (grabber == null) {
        throw new Exception("cannot find a mouse grabber in app's context");
    }

    Field field = grabber.getClass().getDeclaredField("grabbedWindow");
    field.setAccessible(true);

    Object window = field.get(grabber);
    if (window != null) {
        throw new Exception("interaction with GNOME is crippled");
    }
}
项目:PasswordSafe    文件:CPopup.java   
public void updateUI()
{
    setUI(new BasicPopupMenuUI());
}
项目:cn1    文件:JPopupMenuTest.java   
public void testSetGetUI() {
    assertNotNull("ui is returned ", popup.getUI());
    PopupMenuUI ui = new BasicPopupMenuUI();
    popup.setUI(ui);
    assertSame("ui is returned ", ui, popup.getUI());
}
项目:freeVM    文件:JPopupMenuTest.java   
public void testSetGetUI() {
    assertNotNull("ui is returned ", popup.getUI());
    PopupMenuUI ui = new BasicPopupMenuUI();
    popup.setUI(ui);
    assertSame("ui is returned ", ui, popup.getUI());
}
项目:freeVM    文件:JPopupMenuTest.java   
public void testSetGetUI() {
    assertNotNull("ui is returned ", popup.getUI());
    PopupMenuUI ui = new BasicPopupMenuUI();
    popup.setUI(ui);
    assertSame("ui is returned ", ui, popup.getUI());
}