protected String getLabel(Node node) {
        String prefix = " ";
        String suffix = " ";
        if (attribute.equalsIgnoreCase(TAXON_NAMES)) {
            return prefix+tree.getTaxon(node).getName()+suffix;
        }

        if( tree instanceof RootedTree ) {
            final RootedTree rtree = (RootedTree) tree;

            if (attribute.equalsIgnoreCase(NODE_HEIGHTS) ) {
                return prefix+getFormattedValue(rtree.getHeight(node))+suffix;
            } else if (attribute.equalsIgnoreCase(BRANCH_LENGTHS) ) {
                return prefix+getFormattedValue(rtree.getLength(node))+suffix;
            }
        }

        final Object value = node.getAttribute(attribute);
        if (value != null) {
            if (value instanceof Double) {
                return prefix+formatter.getFormattedValue((Double) value)+suffix;
            }
            if(value instanceof Date){
                DateFormat format = new SimpleDateFormat("dd MMM yyyy h:mm a");
                return  prefix+format.format((Date)value)+suffix;
            }
            String s = value.toString();
            //limit node labels to 15 chars (plus ...)
            //if(s.length() > 15)
            //    return s.substring(0,15)+"...";
            return prefix+s+suffix;
        }
        return null;
    }