Package com.google.gwt.json.client

Examples of com.google.gwt.json.client.JSONString.stringValue()


    attributeJsObj = childObj.get("title");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "title", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("className");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "className", attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkAnimation.NAME);
    if(attributeJsObj != null && (attributeBooleanObj = attributeJsObj.isBoolean()) != null)
      ((HasVkAnimation)widget).setAnimationEnabled(attributeBooleanObj.booleanValue());
    attributeJsObj = childObj.get(HasVkSwitchNumberedWidget.NAME);
    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
View Full Code Here


    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
      ((HasVkSwitchNumberedWidget)widget).showWidget((int)attributeNumberObj.doubleValue());
   
    attributeJsObj = childObj.get(HasVkBeforeSelectionHandler.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkBeforeSelectionHandler)widget).addBeforeSelectionHandler(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkSelectionHandler.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkSelectionHandler)widget).addSelectionHandler(attributeStringObj.stringValue());
  }
  @Override
View Full Code Here

    attributeJsObj = childObj.get(HasVkBeforeSelectionHandler.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkBeforeSelectionHandler)widget).addBeforeSelectionHandler(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkSelectionHandler.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkSelectionHandler)widget).addSelectionHandler(attributeStringObj.stringValue());
  }
  @Override
  public Widget deepClone(Widget sourceWidget, Widget targetWidget) {
    boolean isVkDesignerMode = VkStateHelper.getInstance().isDesignerMode();
    if(sourceWidget instanceof IVkPanel && targetWidget instanceof IVkPanel)
View Full Code Here

    for(int i = 0; i < childrenArray.size(); i++)
    {
      JSONObject childObj = childrenArray.get(i).isObject();
      JSONObject childWidgetObj = childObj.get("child").isObject();
      JSONString widgetName = childWidgetObj.get("widgetName").isString();
      Widget widget = VkStateHelper.getInstance().getEngine().getWidget(widgetName.stringValue());
      VkStateHelper.getInstance().getEngine().addWidget(widget, ((IVkPanel)parent));
      ((VkStackPanel)parent).setHeaderHtml(((VkStackPanel)parent).getWidgetCount() - 1, childObj.get("headerHtml").isString().stringValue());
      VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(((IVkWidget)widget).getWidgetName()).buildWidget(childWidgetObj, widget);
    }
    addAttributes(jsonObj, parent);
View Full Code Here

  @Override
  protected void addAttributes(JSONObject childObj, Widget widget) {
    JSONString attributeStringObj;
    JSONValue attributeJsObj = childObj.get("style");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "style", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("title");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "title", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("className");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
View Full Code Here

    JSONValue attributeJsObj = childObj.get("style");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "style", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("title");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "title", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("className");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "className", attributeStringObj.stringValue());
    JSONNumber attributeNumberObj;
    attributeJsObj = childObj.get(HasVkSwitchNumberedWidget.NAME);
View Full Code Here

    attributeJsObj = childObj.get("title");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "title", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("className");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "className", attributeStringObj.stringValue());
    JSONNumber attributeNumberObj;
    attributeJsObj = childObj.get(HasVkSwitchNumberedWidget.NAME);
    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
      ((HasVkSwitchNumberedWidget)widget).showWidget((int)attributeNumberObj.doubleValue());
  }
View Full Code Here

    {
      JSONObject childObj = childrenArray.get(i).isObject();
      if(childObj == null)
        return;
      JSONString widgetName = childObj.get("widgetName").isString();
      Widget widget = VkStateHelper.getInstance().getEngine().getWidget(widgetName.stringValue());
      VkStateHelper.getInstance().getEngine().addWidget(widget, ((IVkPanel)parent));
      VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(((IVkWidget)widget).getWidgetName()).buildWidget(childObj, widget);
    }
  }
}
View Full Code Here

    {
      JSONObject childObj = childrenArray.get(i).isObject();
      if(childObj == null)
        return;
      JSONString widgetName = childObj.get("widgetName").isString();
      Widget widget = VkStateHelper.getInstance().getEngine().getWidget(widgetName.stringValue());
      VkStateHelper.getInstance().getEngine().addWidget(widget, ((IVkPanel)parent));
      VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(((IVkWidget)widget).getWidgetName()).buildWidget(childObj, widget);
    }
    addAttributes(jsonObj, parent);//apply attribute when the widget hierarchy is ready
  }
View Full Code Here

    JSONString attributeStringObj;
    JSONNumber attributeNumberObj;
    JSONBoolean attributeBooleanObj;
    JSONValue attributeJsObj = childObj.get("style");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      VkDesignerUtil.setCssText(widget, attributeStringObj.stringValue());
    attributeJsObj = childObj.get("title");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "title", attributeStringObj.stringValue());
    attributeJsObj = childObj.get("id");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.