/*
   * (non-Javadoc)
   * @see org.ow2.proactive_grid_cloud_portal.rm.client.Listeners.NodeSelectedListener#nodeSelected(org.ow2.proactive_grid_cloud_portal.rm.client.NodeSource.Host.Node)
   */
  public void nodeSelected(Node node) {
    DetailViewerRecord dv = new DetailViewerRecord();

    dv.setAttribute("nodeUrl", node.getNodeUrl());
    dv.setAttribute(
        "nodeState",
        node.getNodeState().toString() + " since " + JSUtil.getTime(node.getTimeStamp()));
    dv.setAttribute("nodeProvider", node.getNodeProvider());
    dv.setAttribute("nodeOwner", node.getNodeOwner());
    dv.setAttribute("hostName", node.getHostName());
    dv.setAttribute("sourceName", node.getSourceName());
    dv.setAttribute("vmName", node.getVmName());
    dv.setAttribute("description", "<pre>" + node.getDescription() + "</pre>");

    this.nodeDetails.setData(new DetailViewerRecord[] {dv});
    this.nodeLabel.setIcon(node.getNodeState().getIcon());

    this.label.hide();
    this.nsCanvas.hide();
    this.hostCanvas.hide();
    this.nodeCanvas.show();

    this.selNode = node;
    this.selHost = null;
    this.selNS = null;
  }