@Override
  void readChildConstraints(final Element constraintsElement, final LwComponent component) {
    // Read Grid constraints
    final Element gridElement = LwXmlReader.getChild(constraintsElement, "grid");
    if(gridElement != null){
      final GridConstraints constraints=new GridConstraints();

      constraints.setRow(LwXmlReader.getRequiredInt(gridElement, "row"));
      constraints.setColumn(LwXmlReader.getRequiredInt(gridElement, "column"));
      constraints.setRowSpan(LwXmlReader.getRequiredInt(gridElement, "row-span"));
      constraints.setColSpan(LwXmlReader.getRequiredInt(gridElement, "col-span"));
      constraints.setVSizePolicy(LwXmlReader.getRequiredInt(gridElement, "vsize-policy"));
      constraints.setHSizePolicy(LwXmlReader.getRequiredInt(gridElement, "hsize-policy"));
      constraints.setAnchor(LwXmlReader.getRequiredInt(gridElement, "anchor"));
      constraints.setFill(LwXmlReader.getRequiredInt(gridElement, "fill"));
      constraints.setIndent(LwXmlReader.getOptionalInt(gridElement, UIFormXmlConstants.ATTRIBUTE_INDENT, 0));
      constraints.setUseParentLayout(LwXmlReader.getOptionalBoolean(gridElement, UIFormXmlConstants.ATTRIBUTE_USE_PARENT_LAYOUT, false));

      // minimum size
      final Element minSizeElement = LwXmlReader.getChild(gridElement, "minimum-size");
      if (minSizeElement != null) {
        constraints.myMinimumSize.width = LwXmlReader.getRequiredInt(minSizeElement, "width");
        constraints.myMinimumSize.height = LwXmlReader.getRequiredInt(minSizeElement, "height");
      }

      // preferred size
      final Element prefSizeElement = LwXmlReader.getChild(gridElement, "preferred-size");
      if (prefSizeElement != null) {
        constraints.myPreferredSize.width = LwXmlReader.getRequiredInt(prefSizeElement, "width");
        constraints.myPreferredSize.height = LwXmlReader.getRequiredInt(prefSizeElement, "height");
      }

      // maximum size
      final Element maxSizeElement = LwXmlReader.getChild(gridElement, "maximum-size");
      if (maxSizeElement != null) {
        constraints.myMaximumSize.width = LwXmlReader.getRequiredInt(maxSizeElement, "width");
        constraints.myMaximumSize.height = LwXmlReader.getRequiredInt(maxSizeElement, "height");
      }

      component.getConstraints().restore(constraints);
    }
  }
@Override
  void readChildConstraints(final Element constraintsElement, final LwComponent component)