}     if (objectType.equals(PropertyNames.ASSET_OBJECT)) { String isDirectObject = (String)node.getAttributeValue(PropertyNames.ASSET_IS_DIRECT_OBJECT);   if (isDirectObject != null && isDirectObject.equals("true")) objectType = PropertyNames.DIRECT_OBJECT;
  public void postFilter(CSMARTFrame frame, CSMARTGraph graph) {    preFilter = false;    if (!displayFilter())      return; // user cancelled or no agents selected, do nothing    // get names of nodes to show, hide, and ignore    Vector nodes = graph.vectorOfElements(GrappaConstants.NODE);    Vector showNames = new Vector();    Vector hideNames = new Vector();    Vector ignoreNames = new Vector();    // this puts all nodes in either showNames, hideNames or ignoreNames    for (int i = 0; i < nodes.size(); i++) {      Node node = (Node)nodes.elementAt(i);      String nodeName = node.getName();      String agentName =        (String)node.getAttributeValue(PropertyNames.PLAN_OBJECT_AGENT_NAME);      if (agentName == null || !agentsSelected.contains(agentName)) {        ignoreNames.addElement(nodeName);        continue;      }      String objectType =	(String)node.getAttributeValue(PropertyNames.OBJECT_TYPE);      if (objectType == null) {        showNames.addElement(nodeName);	continue;      }      // special case direct objects      // TODO: if an asset is a direct object and also      // the object of an allocation, then treating it as simply      // a direct object is incorrect      if (objectType.equals(PropertyNames.ASSET_OBJECT)) {	String isDirectObject =	  (String)node.getAttributeValue(PropertyNames.ASSET_IS_DIRECT_OBJECT);        //	if (isDirectObject == null)        //	  continue;	if (isDirectObject != null && isDirectObject.equals("true"))	  objectType = PropertyNames.DIRECT_OBJECT;      }      if (ignoreObjectTypes.contains(objectType))	ignoreNames.addElement(nodeName);      else if (hideObjectTypes.contains(objectType))	hideNames.addElement(nodeName);      else         showNames.addElement(nodeName);    } // end filtering nodes          if (showNames.size() == 0)      return; // no nodes selected    // create a new graph from the selected nodes    // first copy the current graph    CSMARTGraph newGraph = new CSMARTGraph(graph, "Filtered Graph");    // remove any edges previously created when nodes were hidden    newGraph.deletePseudoEdges();    // ensure that the shown nodes and their edges are visible    for (int i = 0; i < showNames.size(); i++)      newGraph.showNamedNodes(showNames);    // hide the nodes, patch together their in/out links, and    // hide the original edges    newGraph.hideNamedNodes(hideNames);    // ignore the specified nodes    // delete the nodes and DELETE their in/out links    newGraph.removeNamedNodesAndLinks(ignoreNames);    // redo the layout now that we have the correct nodes    newGraph.doLayout();        // create a new frame for the new graph    // and create a new filter with the values from this filter    // i.e. the new filter will display the object types    // shown/ignored/hidden in the accompanying frame    new ULPlanFrame(NamedFrame.PLAN, newGraph, 		    new ULPlanFilter(communityToAgents,                                      agentsSelected,				     showObjectTypes, hideObjectTypes,				     ignoreObjectTypes));  }