}
  public void actionPerformed(ActionEvent ae) {    Object source = ae.getSource();    String unitName;    String unitDBUID=null;    Node selectedNode=null;    DBUIDNode curNode=null;    if(source instanceof AwareMenuItem){      AwareMenuItem ami=(AwareMenuItem)source;      unitName=ami.getUnitName();      unitDBUID=ami.getUnitDBUID();      selectedNode=ami.getNode();    }else{      return;    }    if(selectedNode==null){      System.err.println("NewJTreeTable: Selected Node is null.");      return;    }    if(selectedNode instanceof DBUIDNode){      curNode=(DBUIDNode)selectedNode;    }    if (debug)      System.out.println ("NewJTreeTable.actionPerformed - source is " + source + 						  "\n\tcommand " + ae.getActionCommand());    if (ae.getActionCommand ().equals ("showFilterDialog")) {      makeFilterDialogVisible();    }else if(ae.getActionCommand().equals("displayAssetRoute")){      if(curNode==null ||	 curNode.getType()!=UIDGenerator.ASSET_INSTANCE)	return;      String dbuid=taskModel.getDBUID(curNode);      shell.showRouteView(new 	AssetInstanceRequest(curNode.getDisplayName(),			     dbuid));    }else if(ae.getActionCommand().equals("displayCarrierRoute")){      if(curNode==null ||	 curNode.getType()!=UIDGenerator.CARRIER_INSTANCE)	return;      String dbuid=taskModel.getDBUID(curNode);      CarrierInstanceRequest cir;      if(unitDBUID==null){	cir = new CarrierInstanceRequest(curNode.getDisplayName(),					 dbuid);      }else{	cir = new CarrierInstanceRequest(curNode.getDisplayName(),					 dbuid, unitDBUID);      }      shell.showRouteView(cir);    }else if(ae.getActionCommand().equals("showTPFDD")){      FilterClauses filterClauses = new FilterClauses ();      if(unitDBUID!=null)	filterClauses.addUnitDBUID (unitDBUID);      boolean useFilter=false;      if(curNode!=null){	int type=curNode.getType();	switch(type){	case UIDGenerator.CARRIER_PROTOTYPE:	  filterClauses.addCarrierType(taskModel.getDBUID(curNode));	  useFilter=true;	  break;	case UIDGenerator.CARRIER_INSTANCE:	  filterClauses.addCarrierInstance(taskModel.getDBUID(curNode));	  useFilter=true;	  break;	case UIDGenerator.ASSET_PROTOTYPE:	  if(taskModel instanceof AssetModel)	    //This is an awful hack because the AssetModel uses the wrong type.	    filterClauses.addCarrierType(taskModel.getDBUID(curNode));	  else	    filterClauses.addCargoType(taskModel.getDBUID(curNode));	  useFilter=true;	  break;	case UIDGenerator.ASSET_INSTANCE:	  filterClauses.addCargoInstance(taskModel.getDBUID(curNode));	  useFilter=true;	  break;	}      }      shell.showTPFDDView(filterClauses, useFilter, false);    }else if(ae.getActionCommand().equals("showCarrierTPFDD")){      if(curNode!=null){	FilterClauses filterClauses = new FilterClauses ();	if(completeAssetFilterClause(filterClauses, curNode)){	  shell.showTPFDDView (filterClauses, false, true);	}      }    }else if(ae.getActionCommand().equals("displayDetails")){      if(curNode!=null){	String dbuid=taskModel.getDBUID(curNode);	if(curNode.getType()==UIDGenerator.LEG){	  AssetDetailRequest adr = new LegAssetDetailRequest(dbuid);	  shell.showAssetDetailView(adr);	}else if(curNode.getType()==UIDGenerator.ASSET_INSTANCE){	  AssetDetailRequest adr = new AssetAssetDetailRequest(dbuid);	  shell.showAssetDetailView(adr);	}else if(curNode.getType()==UIDGenerator.CARRIER_INSTANCE){	  CarrierDetailRequest cdr=new CarrierDetailRequest(dbuid);	  shell.showCarrierDetailView(cdr);	}      }    }else{      System.out.println ("NewJTreeTable.actionPerformed - unknown command");    }  }