Example usage for com.google.gwt.user.client.ui UIObject isVisible

List of usage examples for com.google.gwt.user.client.ui UIObject isVisible

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui UIObject isVisible.

Prototype

@Override
    public boolean isVisible() 

Source Link

Usage

From source file:com.qualogy.qafe.gwt.client.vo.functions.execute.ToggleExecute.java

License:Apache License

public void execute(BuiltInFunctionGVO builtInFunction) {
    if (builtInFunction instanceof ToggleGVO) {

        if (builtInFunction.getComponents() != null) {
            for (BuiltInComponentGVO builtInComponentGVO : builtInFunction.getComponents()) {

                String component = builtInComponentGVO.getComponentIdUUID();
                List<UIObject> uiObjects = null;
                if (component != null) {
                    uiObjects = RendererHelper.getComponent(component);
                } else {
                    uiObjects = RendererHelper.getNamedComponent(builtInComponentGVO.getComponentName());
                }//from w  w  w.  j  ava  2s.c  o m
                if (uiObjects != null) {
                    for (UIObject uiObject : uiObjects) {
                        if (uiObject.isVisible()) {
                            uiObject.setVisible(false);
                        } else {
                            uiObject.setVisible(true);
                        }
                    }

                }
            }
        }
    }
    FunctionsExecutor.setProcessedBuiltIn(true);

}

From source file:com.qualogy.qafe.gwt.client.vo.handlers.ToggleHandler.java

License:Apache License

private void toggle(ToggleGVO toggleGVO, String appId, String windowId, String eventSessionId) {
    List<BuiltInComponentGVO> builtInComponentGVOs = toggleGVO.getComponents();
    if (builtInComponentGVOs != null) {
        for (BuiltInComponentGVO builtInComponentGVO : builtInComponentGVOs) {
            List<UIObject> uiObjects = null;
            String componentId = builtInComponentGVO.getComponentId();
            if (componentId != null) {
                String componentKey = resolveComponentKey(componentId, appId, windowId, eventSessionId);
                uiObjects = RendererHelper.getComponent(componentKey);
            } else {
                String componentName = builtInComponentGVO.getComponentName();
                String componentKey = resolveComponentKey(componentName, appId, windowId, eventSessionId);
                uiObjects = RendererHelper.getNamedComponent(componentKey);
            }/*ww w.j  a va 2s.  co m*/
            if (uiObjects == null) {
                continue;
            }
            for (UIObject uiObject : uiObjects) {
                boolean currentVisibility = uiObject.isVisible();
                uiObject.setVisible(!currentVisibility);
            }
        }
    }
}

From source file:org.pepstock.jem.gwt.client.commons.UITools.java

License:Open Source License

/**
 * Simple tool to used to know if a Widget is visible, and if it is in foreground 
 * @param object/*www.  j a va 2  s .  c  om*/
 * @return <code>true</code> if the parameter is visible and in foreground
 */
public static boolean isInForegroundVisible(UIObject object) {
    return object.isVisible() && object.getOffsetWidth() > 0 && object.getOffsetHeight() > 0;
}