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"); } }
public void updateUI() { setUI(new BasicPopupMenuUI()); }
public void testSetGetUI() { assertNotNull("ui is returned ", popup.getUI()); PopupMenuUI ui = new BasicPopupMenuUI(); popup.setUI(ui); assertSame("ui is returned ", ui, popup.getUI()); }