public void deleteColumn(Widget sender) {
    if (sender instanceof ColumnActionHyperlink) {
      DisplayColumnWidget displayColumnWidget =
          (DisplayColumnWidget) sender.getParent().getParent();
      columnPanel.remove(displayColumnWidget);
      dispColMap.remove(sortColMap.remove(displayColumnWidget));
    } else {
      SortColumnWidget sortColumnWidget = (SortColumnWidget) sender.getParent().getParent();
      sortPanel.remove(sortColumnWidget);

      DisplayColumnWidget displayColumnWidget = dispColMap.remove(sortColumnWidget);
      sortColMap.remove(displayColumnWidget);
      displayColumnWidget.setSortOrder(SortField.SORT_NULL);
    }
  }
 private void loadSortFields(Element rootNode, HashMap<String, DisplayColumnWidget> displayCols) {
   NodeList nodes = rootNode.getChildNodes();
   for (int index = 0; index < nodes.getLength(); index++) {
     Node node = nodes.item(index);
     if (node.getNodeType() == Node.ELEMENT_NODE
         && node.getNodeName().equalsIgnoreCase(XmlBuilder.NODE_NAME_FIELD)) {
       Element element = (Element) node;
       DisplayColumnWidget widget =
           displayCols.get(element.getAttribute(XmlBuilder.ATTRIBUTE_NAME_NAME));
       int sortOrder =
           Integer.parseInt(element.getAttribute(XmlBuilder.ATTRIBUTE_NAME_SORT_ORDER));
       widget.setSortOrder(sortOrder);
       changeSortOrder(widget, sortOrder);
     }
   }
 }