Package org.w3c.dom

Examples of org.w3c.dom.Document.createElement()


            }
          }
        } else {
          String name = (String) dataModel.getValue("name"), type = null;

          Element propertyNode = document.createElement("property");
          propertyNode.setAttribute("name", name);

          switch (((Integer) dataModel.getValue("type.index")).intValue()) {
            case IDX_ISTRING :
              type = "istring";
View Full Code Here


    TreeItem items[] = (TreeItem[]) dataModel.getValue("tree.selected");
    TreeItem item = items[0];
    WidgetUserObject parentObject = (WidgetUserObject) item.getUserObject();
    Document document = parentObject.element.getOwnerDocument();

    Element childWidget = document.createElement("widget");
    childWidget.setAttribute("class", className);
    if (preset != null)
      childWidget.setAttribute("preset", preset);

    TreeItem newNode = new TreeItem(item, null);
View Full Code Here

    String type = dataModel.getValue("type").toString();
    borderNode.setAttribute("border", type);
    Document document = borderNode.getOwnerDocument();

    if (type.equals("empty")) {
      Element top = document.createElement("top");
      top.appendChild(document.createTextNode((String) dataModel.getValue("empty_top")));
      borderNode.appendChild(top);

      Element bottom = document.createElement("bottom");
      bottom.appendChild(document.createTextNode((String) dataModel.getValue("empty_bottom")));
View Full Code Here

    if (type.equals("empty")) {
      Element top = document.createElement("top");
      top.appendChild(document.createTextNode((String) dataModel.getValue("empty_top")));
      borderNode.appendChild(top);

      Element bottom = document.createElement("bottom");
      bottom.appendChild(document.createTextNode((String) dataModel.getValue("empty_bottom")));
      borderNode.appendChild(bottom);

      Element left = document.createElement("left");
      left.appendChild(document.createTextNode((String) dataModel.getValue("empty_left")));
View Full Code Here

      Element bottom = document.createElement("bottom");
      bottom.appendChild(document.createTextNode((String) dataModel.getValue("empty_bottom")));
      borderNode.appendChild(bottom);

      Element left = document.createElement("left");
      left.appendChild(document.createTextNode((String) dataModel.getValue("empty_left")));
      borderNode.appendChild(left);

      Element right = document.createElement("right");
      right.appendChild(document.createTextNode((String) dataModel.getValue("empty_right")));
View Full Code Here

      Element left = document.createElement("left");
      left.appendChild(document.createTextNode((String) dataModel.getValue("empty_left")));
      borderNode.appendChild(left);

      Element right = document.createElement("right");
      right.appendChild(document.createTextNode((String) dataModel.getValue("empty_right")));
      borderNode.appendChild(right);
    } else if (type.equals("titled")) {
      Element title = document.createElement("title");
      title.appendChild(document.createTextNode((String) dataModel.getValue("titled_title")));
View Full Code Here

      Element right = document.createElement("right");
      right.appendChild(document.createTextNode((String) dataModel.getValue("empty_right")));
      borderNode.appendChild(right);
    } else if (type.equals("titled")) {
      Element title = document.createElement("title");
      title.appendChild(document.createTextNode((String) dataModel.getValue("titled_title")));
      borderNode.appendChild(title);
    }

    PropertyTableRow row = (PropertyTableRow) editorModel.getValue("row");
View Full Code Here

    Document document = propertyNode.getOwnerDocument();

    if (value instanceof Dimension) {
      Dimension dimension = (Dimension) value;

      Element widthNode = document.createElement("width");
      Element heightNode = document.createElement("height");
      propertyNode.appendChild(widthNode);
      propertyNode.appendChild(heightNode);
      widthNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getWidth())));
      heightNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getHeight())));
View Full Code Here

    if (value instanceof Dimension) {
      Dimension dimension = (Dimension) value;

      Element widthNode = document.createElement("width");
      Element heightNode = document.createElement("height");
      propertyNode.appendChild(widthNode);
      propertyNode.appendChild(heightNode);
      widthNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getWidth())));
      heightNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getHeight())));
    } else {
View Full Code Here

      widthNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getWidth())));
      heightNode.appendChild(document.createTextNode(String.valueOf((int) dimension.getHeight())));
    } else {
      Point point = (Point) value;

      Element xNode = document.createElement("x");
      Element yNode = document.createElement("y");
      propertyNode.appendChild(xNode);
      propertyNode.appendChild(yNode);
      xNode.appendChild(document.createTextNode(String.valueOf(point.x)));
      yNode.appendChild(document.createTextNode(String.valueOf(point.y)));
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.