From chatellier@users.labs.libre-entreprise.org Mon Jun 15 00:26:25 2026 From: chatellier@users.labs.libre-entreprise.org To: isis-fish-commits@list.isis-fish.org Subject: [Isis-fish-commits] r2729 - in isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input: . gear Date: Mon, 02 Nov 2009 17:27:43 +0100 Message-ID: <20091102162743.B25A316C00E@labs.libre-entreprise.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2198572252521842236==" --===============2198572252521842236== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: chatellier Date: 2009-11-02 16:27:43 +0000 (Mon, 02 Nov 2009) New Revision: 2729 Added: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/gear/Population= ComboModel.java Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityEdit= orUI.jaxx Log: Utilisation des combo model pour les populations Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/Selectiv= ityEditorUI.jaxx =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityEdi= torUI.jaxx 2009-11-02 16:27:12 UTC (rev 2728) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityEdi= torUI.jaxx 2009-11-02 16:27:43 UTC (rev 2729) @@ -27,7 +27,6 @@ =20 Added: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/gear/Popula= tionComboModel.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/gear/Populatio= nComboModel.java (rev 0) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/gear/Populatio= nComboModel.java 2009-11-02 16:27:43 UTC (rev 2729) @@ -0,0 +1,77 @@ +/* *##% + * Copyright (C) 2009 Code Lutin + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US= A. + *##%*/ + +package fr.ifremer.isisfish.ui.input.gear; + +import java.util.List; + +import javax.swing.DefaultComboBoxModel; + +import fr.ifremer.isisfish.entities.MetierSeasonInfo; +import fr.ifremer.isisfish.entities.Population; + +/** + * Model pour la liste des {@link Population}. + *=20 + * Pas de selection par defaut. + * + * @author chatellier + * @version $Revision$ + *=20 + * Last update : $Date$ + * By : $Author: chatellier $ + */ +public class PopulationComboModel extends DefaultComboBoxModel { + + /** serialVersionUID. */ + private static final long serialVersionUID =3D 6171850179969290032L; + + /** Population list */ + protected List populations; + + /** + * Constructor with species list. + *=20 + * @param populations populations list + */ + public PopulationComboModel(List populations) { + super(); + this.populations =3D populations; + } + + /* + * @see javax.swing.ListModel#getElementAt(int) + */ + @Override + public Object getElementAt(int index) { + return populations.get(index); + } + + /* + * @see javax.swing.ListModel#getSize() + */ + @Override + public int getSize() { + int size =3D 0; + + if (populations !=3D null) { + size =3D populations.size(); + } + return size; + } +} Property changes on: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/inp= ut/gear/PopulationComboModel.java ___________________________________________________________________ Added: svn:keywords + "Author Date Id Revision HeadURL" --===============2198572252521842236==--