private void toggle(ToggleGVO toggleGVO, WindowActivity activity) { List<BuiltInComponentGVO> builtInComponents = toggleGVO.getComponents(); if (builtInComponents == null) { return; } for (BuiltInComponentGVO builtInComponentGVO : builtInComponents) { List<UIObject> widgets = getWidgets(builtInComponentGVO, activity); if (QAMLUtil.isEmpty(widgets)) { continue; } for (UIObject widget : widgets) { if (widget instanceof HasVisibility) { HasVisibility hasVisibility = (HasVisibility)widget; boolean visible = hasVisibility.isVisible(); hasVisibility.setVisible(!visible); } } } }
public ClassTreePresenter(GWTReflectionServiceAsync rpcService, ObjectConfigurationMap objectConfigurationMap, String baseClassName, Display view) { this.display = view; setRootNodePresenter(new ClassTreeNodePresenter(rpcService, objectConfigurationMap, baseClassName, display.createRootView(baseClassName))); if (getRootNodePresenter().getDisplay() instanceof HasVisibility) { ((HasVisibility) getRootNodePresenter().getDisplay()).setVisible(true); } bind(); }
@Override public boolean accepts(HasVisibility handler, Object event) { return handler.isVisible(); }