1 package fr.ifremer.reefdb.ui.swing.content.manage.referential.taxon.taxonsDialog; 2 3 /* 4 * #%L 5 * Reef DB :: UI 6 * $Id:$ 7 * $HeadURL:$ 8 * %% 9 * Copyright (C) 2014 - 2015 Ifremer 10 * %% 11 * This program is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Affero General Public License as published by 13 * the Free Software Foundation, either version 3 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU Affero General Public License 22 * along with this program. If not, see <http://www.gnu.org/licenses/>. 23 * #L% 24 */ 25 26 import fr.ifremer.reefdb.dto.referential.TaxonDTO; 27 import fr.ifremer.reefdb.dto.referential.TaxonGroupDTO; 28 import fr.ifremer.quadrige3.ui.swing.model.AbstractEmptyUIModel; 29 30 import java.util.List; 31 32 /** 33 * Created by Ludovic on 24/11/2015. 34 */ 35 public class TaxonsDialogUIModel extends AbstractEmptyUIModel<TaxonsDialogUIModel> { 36 37 /** Constant <code>PROPERTY_TAXON_GROUP="taxonGroup"</code> */ 38 public static final String PROPERTY_TAXON_GROUP = "taxonGroup"; 39 /** Constant <code>PROPERTY_TAXONS="taxons"</code> */ 40 public static final String PROPERTY_TAXONS = "taxons"; 41 /** Constant <code>PROPERTY_EDITABLE="editable"</code> */ 42 public static final String PROPERTY_EDITABLE = "editable"; 43 private TaxonGroupDTO taxonGroup; 44 private List<TaxonDTO> taxons; 45 private boolean editable; 46 47 /** 48 * <p>Getter for the field <code>taxonGroup</code>.</p> 49 * 50 * @return a {@link fr.ifremer.reefdb.dto.referential.TaxonGroupDTO} object. 51 */ 52 public TaxonGroupDTO getTaxonGroup() { 53 return taxonGroup; 54 } 55 56 /** 57 * <p>Setter for the field <code>taxonGroup</code>.</p> 58 * 59 * @param taxonGroup a {@link fr.ifremer.reefdb.dto.referential.TaxonGroupDTO} object. 60 */ 61 public void setTaxonGroup(TaxonGroupDTO taxonGroup) { 62 this.taxonGroup = taxonGroup; 63 firePropertyChange(PROPERTY_TAXON_GROUP, null, taxonGroup); 64 } 65 66 /** 67 * <p>Getter for the field <code>taxons</code>.</p> 68 * 69 * @return a {@link java.util.List} object. 70 */ 71 public List<TaxonDTO> getTaxons() { 72 return taxons; 73 } 74 75 /** 76 * <p>Setter for the field <code>taxons</code>.</p> 77 * 78 * @param taxons a {@link java.util.List} object. 79 */ 80 public void setTaxons(List<TaxonDTO> taxons) { 81 this.taxons = taxons; 82 firePropertyChange(PROPERTY_TAXONS, null, taxons); 83 } 84 85 /** 86 * <p>isEditable.</p> 87 * 88 * @return a boolean. 89 */ 90 public boolean isEditable() { 91 return editable; 92 } 93 94 /** 95 * <p>Setter for the field <code>editable</code>.</p> 96 * 97 * @param editable a boolean. 98 */ 99 public void setEditable(boolean editable) { 100 this.editable = editable; 101 firePropertyChange(PROPERTY_EDITABLE, null, editable); 102 } 103 }