}
}
+
+
+
private static void addBasics( final DefaultMutableTreeNode top,
final PhylogenyNode phylogeny_node,
final String name ) {
if ( no_tax > 0 ) {
addSubelement( category, "External nodes without taxonomy", String.valueOf( no_tax ) );
}
- //TODO remove me... maybe make me into a method?
- //for( final Taxonomy taxonomy : distinct_tax.keySet() ) {
- // System.out.println( taxonomy + ": " + distinct_tax.get( taxonomy ) );
- //}
+
}
}
if ( !phylogeny_node.isRoot() ) {
top.add( category );
for( final String key : properties_map.keySet() ) {
final Property prop = properties_map.get( key );
- category.add( new DefaultMutableTreeNode( prop.getRef() + " " + prop.getValue() + " " + prop.getUnit()
+ category.add( new DefaultMutableTreeNode( prop.getRef() + "=" + prop.getValue() + " " + prop.getUnit()
+ " [" + prop.getAppliesTo().toString() + "]" ) );
}
}
private double _max_distance_to_root = -1;
private int _dynamic_hiding_factor = 0;
private boolean _edited = false;
- private Popup _node_desc_popup;
+ private Popup _node_desc_popup;
private JTextArea _rollover_popup;
// private final int _box_size;
// private final int _half_box_size;
else {
sb.append( " " );
}
- sb.append( properties.getProperty( ref ).asText() );
+
+
+ final Property p = properties.getProperty( ref );
+
+ sb.append( getPartAfterColon( p.getRef() ) );
+ sb.append( "=" );
+ sb.append( p.getValue() );
+ if ( !ForesterUtil.isEmpty( p.getUnit() ) ) {
+ sb.append( getPartAfterColon( p.getUnit() ) );
+ }
}
return sb;
}
+
+ final private static String getPartAfterColon( final String s ) {
+ final int i = s.indexOf( ':' );
+ if ( (i < 1) ||( i == ( s.length()-1)) ) {
+ return s;
+ }
+ return s.substring( i + 1, s.length() );
+ }
private double drawTaxonomyImage( final double x, final double y, final PhylogenyNode node, final Graphics2D g ) {
final List<Uri> us = new ArrayList<Uri>();
.getNumberOfDigitsAfterCommaForConfidenceValues() ) ) );
}
}
+ if ( node.getNodeData().isHasProperties() ) {
+ final PropertiesMap properties = node.getNodeData().getProperties();
+ for( final String ref : properties.getPropertyRefs() ) {
+ _popup_buffer.append( "\n" );
+ final Property p = properties.getProperty( ref );
+ _popup_buffer.append( getPartAfterColon( p.getRef() ) );
+ _popup_buffer.append( "=" );
+ _popup_buffer.append( p.getValue() );
+ if ( !ForesterUtil.isEmpty( p.getUnit() ) ) {
+ _popup_buffer.append( getPartAfterColon( p.getUnit() ) );
+ }
+ }
+ }
+
if ( _popup_buffer.length() > 0 ) {
if ( !getConfiguration().isUseNativeUI() ) {
_rollover_popup