Package com.google.gwt.json.client

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


                if (key == null)
                    throw new DecodingException("Expected an entry key field not found");
                JSONString k = key.isString();
                if (k == null)
                    throw new DecodingException("Expected an entry key to be a string, but was given: " + value);
                rc.put(keyEncoder.decode(k.stringValue()), valueEncoder.decode(entry.get("value")));
            }
            return rc;
        }
        default:
            throw new UnsupportedOperationException("The encoding style is not yet supported: " + style.name());
View Full Code Here


          .addMenuItem(tree, item.get("html").isString().stringValue(), item.get("js").isString().stringValue());
      else if(item.containsKey("child"))
      {
        JSONObject childObj = item.get("child").isObject();
        JSONString widgetName = childObj.get("widgetName").isString();
        Widget widget = VkStateHelper.getInstance().getEngine().getWidget(widgetName.stringValue());
        VkStateHelper.getInstance().getEngine().addWidget(widget, ((IVkPanel)tree));
        VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(((IVkWidget)widget).getWidgetName()).buildWidget(childObj, widget);
        //addAttributes(childObj, widget);
      }
      else if(item.get("separator") == null)
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());
      dockPanel.add(widget, getDirectionConstant((int)childObj.get("direction").isNumber().doubleValue()));
      dockPanel.setCellHorizontalAlignment(dockPanel.getWidgetCount() - 1, childObj.get("horizontalAlignment").isString().stringValue());
      dockPanel.setCellVerticalAlignment(dockPanel.getWidgetCount() - 1, childObj.get("verticalAlignment").isString().stringValue());
      //addAttributes(childWidgetObj, widget);
      VkStateHelper.getInstance().getWidgetEngineMapping().getEngineMap().get(((IVkWidget)widget).getWidgetName()).buildWidget(childWidgetObj, widget);
View Full Code Here

    JSONString attributeStringObj;
    JSONNumber attributeNumberObj;
    JSONBoolean attributeBooleanObj;
    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());
    attributeJsObj = childObj.get(HasVkText.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
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());
    attributeJsObj = childObj.get(HasVkText.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkText)widget).setText(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkAccessKey.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
View Full Code Here

    attributeJsObj = childObj.get("className");
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      DOM.setElementAttribute(widget.getElement(), "className", attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkText.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkText)widget).setText(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkAccessKey.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkAccessKey)widget).setAccessKey(attributeStringObj.stringValue().charAt(0));
    attributeJsObj = childObj.get(HasVkTabIndex.NAME);
    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
View Full Code Here

    attributeJsObj = childObj.get(HasVkText.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkText)widget).setText(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkAccessKey.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkAccessKey)widget).setAccessKey(attributeStringObj.stringValue().charAt(0));
    attributeJsObj = childObj.get(HasVkTabIndex.NAME);
    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
      ((HasVkTabIndex)widget).setTabIndex((int)attributeNumberObj.isNumber().doubleValue());
    attributeJsObj = childObj.get(HasVkHtml.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
View Full Code Here

    attributeJsObj = childObj.get(HasVkTabIndex.NAME);
    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
      ((HasVkTabIndex)widget).setTabIndex((int)attributeNumberObj.isNumber().doubleValue());
    attributeJsObj = childObj.get(HasVkHtml.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkHtml)widget).setHTML(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkEnabled.NAME);
    if(attributeJsObj != null && (attributeBooleanObj = attributeJsObj.isBoolean()) != null)
      ((HasVkEnabled)widget).setEnabled(attributeBooleanObj.booleanValue());
    attributeJsObj = childObj.get(HasVkWordWrap.NAME);
    if(attributeJsObj != null && (attributeBooleanObj = attributeJsObj.isBoolean()) != null)
View Full Code Here

    attributeJsObj = childObj.get(HasVkWordWrap.NAME);
    if(attributeJsObj != null && (attributeBooleanObj = attributeJsObj.isBoolean()) != null)
      ((HasVkWordWrap)widget).setWordWrap(attributeBooleanObj.booleanValue());
    attributeJsObj = childObj.get(HasVkDirection.NAME);
    if(attributeJsObj != null && (attributeStringObj = attributeJsObj.isString()) != null)
      ((HasVkDirection)widget).setDirection(attributeStringObj.stringValue());
    attributeJsObj = childObj.get(HasVkMaxLength.NAME);
    if(attributeJsObj != null && (attributeNumberObj = attributeJsObj.isNumber()) != null)
      ((HasVkMaxLength)widget).setMaxLength((int)attributeNumberObj.doubleValue());
    /*attributeJsObj = childObj.get(HasVkHorizontalAlignment.NAME);
    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.