All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lphystudio.app.graphicalmodelpanel.viewer.TaxaComponent Maven / Gradle / Ivy

The newest version!
package lphystudio.app.graphicalmodelpanel.viewer;

import lphy.base.evolution.Taxa;
import lphy.base.evolution.Taxon;

import javax.swing.*;

public class TaxaComponent extends JLabel {

    public TaxaComponent(Taxa taxa) {
        Taxon[] taxonArray = taxa.getTaxonArray();

        boolean hasSpecies = taxonArray[0].getSpecies() != null && taxonArray[0].getSpecies() != taxonArray[0].getName();

        StringBuilder builder = new StringBuilder();
        builder.append("");

        if (hasSpecies) {
            builder.append("");
        }
        builder.append("");

        for (Taxon taxon : taxonArray) {
            builder.append("");
            if (hasSpecies) {
                builder.append("");
            }
            builder.append("");
        }

        builder.append("
TaxaSpeciesAge
"); builder.append(taxon.getName()); builder.append(""); builder.append(taxon.getSpecies()); builder.append(""); builder.append(taxon.getAge()); builder.append("
"); setText(builder.toString()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy