/** * Convenience method -- always returns the first Distribution. * * @return Distribution */ public Distribution getDistribution() { return getDistribution( 0 ); }
public boolean isHasDistribution() { return ( ( ( getDistributions() != null ) && ( getDistributions().size() > 0 ) ) && ( ( !ForesterUtil .isEmpty( getDistribution().getDesc() ) ) || ( ( getDistribution().getPoints() != null ) && ( getDistribution().getPoints().size() > 0 ) ) || ( ( getDistribution() .getPolygons() != null ) && ( getDistribution().getPolygons().size() > 0 ) ) ) ); }
return false; d = n.getNodeData().getDistribution(); if ( !d.getDesc().equals( "Hirschweg 38" ) ) { return false; return false; d = n.getNodeData().getDistribution( 1 ); if ( !d.getDesc().equals( "San Diego" ) ) { return false; d = n.getNodeData().getDistribution( 0 ); if ( d.getPoints().size() != 3 ) { return false; d = n.getNodeData().getDistribution(); if ( !d.getDesc().equals( "Hirschweg 38" ) ) { return false; d = n.getNodeData().getDistribution( 1 ); if ( !d.getDesc().equals( "San Diego" ) ) { return false; d = n.getNodeData().getDistribution( 0 ); if ( d.getPoints().size() != 3 ) { return false;
private List<Point> obtainPoints() { ForesterUtil.ensurePresenceOfDistribution( getMyNode() ); Distribution d = getMyNode().getNodeData().getDistribution(); if ( d.getPoints() == null ) { d = new Distribution( d.getDesc(), new ArrayList<Point>(), d.getPolygons() ); getMyNode().getNodeData().setDistribution( d ); } final List<Point> ps = d.getPoints(); if ( ps.isEmpty() ) { ps.add( new Point() ); } else if ( ps.get( 0 ) == null ) { ps.set( 0, new Point() ); } return ps; }
_popup_buffer.append( "\n" ); _popup_buffer.append( node.getNodeData().getDistribution().asSimpleText() );
final Distribution d = getMyNode().getNodeData().getDistribution(); getMyNode().getNodeData().setDistribution( new Distribution( value, d.getPoints(), d.getPolygons() ) ); break;
private void createNodes( final DefaultMutableTreeNode top, final PhylogenyNode phylogeny_node ) { if ( !phylogeny_node.getNodeData().isHasTaxonomy() ) { phylogeny_node.getNodeData().addTaxonomy( new Taxonomy() ); } if ( !phylogeny_node.getNodeData().isHasSequence() ) { phylogeny_node.getNodeData().addSequence( new Sequence() ); } if ( !phylogeny_node.getNodeData().isHasDistribution() ) { phylogeny_node.getNodeData().addDistribution( new Distribution( "" ) ); } if ( !phylogeny_node.getNodeData().isHasReference() ) { phylogeny_node.getNodeData().addReference( new Reference( "" ) ); } addBasics( top, phylogeny_node, NodePanel.BASIC ); addTaxonomy( top, phylogeny_node.getNodeData().getTaxonomy(), NodePanel.TAXONOMY ); addSequence( top, phylogeny_node.getNodeData().getSequence(), NodePanel.SEQUENCE ); if ( !phylogeny_node.isExternal() ) { addEvents( top, phylogeny_node.getNodeData().getEvent(), NodePanel.EVENTS ); } addDate( top, phylogeny_node.getNodeData().getDate(), NodePanel.DATE ); addDistribution( top, phylogeny_node.getNodeData().getDistribution(), NodePanel.DISTRIBUTION ); addReference( top, phylogeny_node.getNodeData().getReference(), NodePanel.LIT_REFERENCE ); // addProperties( top, phylogeny_node.getNodeData().getProperties(), "Properties" ); }
addDistribution( top, phylogeny_node.getNodeData().getDistribution(), DISTRIBUTION );