protected Node lastNode=null;
public void selectionChanged(SelectionNodeEvent e) {
if (assignResourcesDialog != null)
assignResourcesDialog.selectionChanged(e);
Node currentNode=e.getCurrentNode();
Object currentImpl=currentNode.getImpl();
setButtonState(currentImpl,currentFrame.getProject());
// if on resource view, hide task info and vice versa. Otherwise just show it
if (lastNode!=null&&taskInformationDialog!=null&&(lastNode.getImpl() instanceof Task||lastNode.getImpl() instanceof Assignment)&¤tNode.getImpl() instanceof Resource){
taskInformationDialog.setVisible(false);
doInformationDialog(false);
} else if (lastNode!=null&&resourceInformationDialog!=null&&lastNode.getImpl() instanceof Resource&&(currentNode.getImpl() instanceof Task||currentNode.getImpl() instanceof Assignment)){
resourceInformationDialog.setVisible(false);
doInformationDialog(false);
}else{
if (taskInformationDialog != null)
taskInformationDialog.selectionChanged(e);