java.awt.Window#getOwnedWindows ( )源码实例Demo

下面列出了java.awt.Window#getOwnedWindows ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ghidra   文件: DataTypeEditorsScreenShots.java
@Test
public void testDialog_Multiple_Match() throws Exception {

	positionListingTop(0x40D3B8);
	DropDownSelectionTextField<?> textField = showTypeChooserDialog();

	triggerText(textField, "undefined");

	DialogComponentProvider dialog = getDialog();
	JComponent component = dialog.getComponent();
	Window dataTypeDialog = windowForComponent(component);
	Window[] popUpWindows = dataTypeDialog.getOwnedWindows();

	List<Component> dataTypeWindows = new ArrayList<>(Arrays.asList(popUpWindows));
	dataTypeWindows.add(dataTypeDialog);

	captureComponents(dataTypeWindows);
	closeAllWindowsAndFrames();
}
 
源代码2 项目: ghidra   文件: DataTypeEditorsScreenShots.java
@Test
public void testDialog_Single_Match() throws Exception {

	positionListingTop(0x40D3B8);
	DropDownSelectionTextField<?> textField = showTypeChooserDialog();
	triggerText(textField, "qword");

	DialogComponentProvider dialog = getDialog();
	JComponent component = dialog.getComponent();
	Window dataTypeDialog = windowForComponent(component);
	Window[] popUpWindows = dataTypeDialog.getOwnedWindows();

	List<Component> dataTypeWindows = new ArrayList<>(Arrays.asList(popUpWindows));
	dataTypeWindows.add(dataTypeDialog);

	captureComponents(dataTypeWindows);

}
 
源代码3 项目: openjdk-jdk9   文件: GUIBrowser.java
public WindowNode(Window win) {
    super(win);
    Window[] wns = win.getOwnedWindows();
    Vector<WindowNode> wwns = new Vector<>();
    for (Window wn : wns) {
        if (propDialog.showAll || wn.isVisible()) {
            wwns.add(new WindowNode(wn));
        }
    }
    wins = new WindowNode[wwns.size()];
    for (int i = 0; i < wwns.size(); i++) {
        wins[i] = wwns.get(i);
    }
    title = win.toString();
    clss = win.getClass().getName();
    BufferedImage image = null;
    try {
        image = new Robot().
                createScreenCapture(new Rectangle(win.getLocationOnScreen(),
                        win.getSize()));
    } catch (AWTException e) {
        e.printStackTrace();
    }
    setComponentImageProvider(new ComponentImageProvider(image, x, y));
}
 
源代码4 项目: openjdk-jdk9   文件: WindowWaiter.java
private static Window getAWindow(Window owner, ComponentChooser cc) {
    if (owner == null) {
        return WindowWaiter.getAWindow(cc);
    } else {
        Window result = null;
        Window[] windows = owner.getOwnedWindows();
        for (Window window : windows) {
            if (cc.checkComponent(window)) {
                return window;
            }
            if ((result = WindowWaiter.getWindow(window, cc)) != null) {
                return result;
            }
        }
        return null;
    }
}
 
源代码5 项目: ghidra   文件: AbstractDockingTest.java
private static boolean isHierarchyShowing(Window w) {

		if (w.isShowing()) {
			return true;
		}

		Window[] children = w.getOwnedWindows();
		for (Window child : children) {
			if (child.isShowing()) {
				return true;
			}
		}

		return false;
	}
 
源代码6 项目: ghidra   文件: AbstractDockingTest.java
private static void windowToString(Window w, int depth, StringBuilder buffy) {

		String title = getDebugTitleForWindow(w);
		String prefix = StringUtils.repeat('\t', depth);
		String visibility = w.isShowing() ? "" : " (not showing)";
		String padded = prefix + title + visibility;
		buffy.append(padded).append('\n');

		Window[] children = w.getOwnedWindows();
		for (Window child : children) {
			windowToString(child, depth + 1, buffy);
		}
	}
 
源代码7 项目: netbeans   文件: NotifyExcPanel.java
private static boolean hasModalDialog(Window w) {
    if (w == null) { // #63830
        return false;
    }
    Window[] ws = w.getOwnedWindows();
    for(int i = 0; i < ws.length; i++) {
        if(ws[i] instanceof Dialog && ((Dialog)ws[i]).isModal() && ws[i].isVisible()) {
            return true;
        } else if(hasModalDialog(ws[i])) {
            return true;
        }
    }
    
    return false;
}
 
源代码8 项目: Bytecoder   文件: DesktopProperty.java
/**
 * Updates the UI of the passed in window and all its children.
 */
private static void updateWindowUI(Window window) {
    SwingUtilities.updateComponentTreeUI(window);
    Window[] ownedWins = window.getOwnedWindows();
    for (Window ownedWin : ownedWins) {
        updateWindowUI(ownedWin);
    }
}
 
源代码9 项目: openjdk-jdk9   文件: Test4319113.java
private static void updateWindowTreeUI(Window window) {
    SwingUtilities.updateComponentTreeUI(window);
    Window[] arrwindow = window.getOwnedWindows();
    int n = arrwindow.length;
    while (--n >= 0) {
        Window window2 = arrwindow[n];
        if (!window2.isDisplayable()) continue;
        Test4319113.updateWindowTreeUI(window2);
    }
}
 
源代码10 项目: gcs   文件: BaseWindow.java
/**
 * @param window The window to check.
 * @return {@code true} if an owned window is showing.
 */
public static boolean hasOwnedWindowsShowing(Window window) {
    if (window != null) {
        for (Window one : window.getOwnedWindows()) {
            if (one.isShowing() && one.getType() != Window.Type.POPUP) {
                return true;
            }
        }
    }
    return false;
}
 
源代码11 项目: jeveassets   文件: TaskDialog.java
private Window getTopWindow(Window in) {
	for (Window window : in.getOwnedWindows()) {
		if (window.isVisible()) {
			return getTopWindow(window);
		}
	}
	return in;
}