@Override public int countRenderableChildren(MUIElement element) { if (!(element instanceof MElementContainer<?>)) { return 0; } @SuppressWarnings("unchecked") MElementContainer<MUIElement> container = (MElementContainer<MUIElement>) element; int count = 0; List<MUIElement> kids = container.getChildren(); for (MUIElement kid : kids) { if (kid.isToBeRendered()) { count++; } } if (element instanceof MPerspective) { MPerspective perspective = (MPerspective) element; for (MWindow window : perspective.getWindows()) { if (window.isToBeRendered()) { count++; } } } return count; }
protected boolean someAreVisible(List<MWindow> windows) { for (MWindow win : windows) { if (win.isToBeRendered() && win.isVisible() && win.getWidget() != null) { return true; } } return false; }