Example usage for com.jgoodies.common.collect ArrayListModel add

List of usage examples for com.jgoodies.common.collect ArrayListModel add

Introduction

In this page you can find the example usage for com.jgoodies.common.collect ArrayListModel add.

Prototype

@Override
    public final boolean add(E e) 

Source Link

Usage

From source file:ro.catalin.prata.testflightuploader.view.TFUploader.java

License:Apache License

/**
 * Updates the list of teams/*from w  w  w.  j a va 2s.c  o m*/
 *
 * @param teams list of teams to be displayed on the screen
 */
public void updateListOfTeams(ArrayList<Team> teams) {

    // create a new list model
    ArrayListModel<String> model = new ArrayListModel<String>();

    for (Team team : teams) {
        // add all the teams in the list model
        model.add(team.getName());
    }

    // set the new model containing the new team
    teamList.setModel(model);

}