View Javadoc
1   package fr.ifremer.dali.ui.swing.content.manage.referential.pmfm.qualitativevalue;
2   
3   /*
4    * #%L
5    * Dali :: 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.dali.dto.referential.pmfm.QualitativeValueDTO;
27  import fr.ifremer.dali.ui.swing.util.table.AbstractDaliRowUIModel;
28  import fr.ifremer.dali.ui.swing.util.table.AbstractDaliTableUIModel;
29  
30  /**
31   * Modele pour la zone des prelevements de l'ecran d'accueil.
32   */
33  public class QualitativeValueUIModel extends AbstractDaliTableUIModel<QualitativeValueDTO, QualitativeValueTableRowModel, QualitativeValueUIModel> {
34  
35      private boolean editable;
36      public static final String PROPERTY_EDITABLE = "editable";
37  
38      private boolean doubleList;
39      public static final String PROPERTY_DOUBLE_LIST = "doubleList";
40      private AbstractDaliRowUIModel parentRowModel = null;
41      public static final String PROPERTY_PARENT_ROW_MODEL = "parentRowModel";
42  
43      /**
44       * Constructor.
45       */
46      public QualitativeValueUIModel() {
47          super();
48      }
49  
50      /**
51       * <p>Getter for the field <code>parentRowModel</code>.</p>
52       *
53       * @return a {@link AbstractDaliRowUIModel} object.
54       */
55      public AbstractDaliRowUIModel getParentRowModel() {
56          return parentRowModel;
57      }
58  
59      /**
60       * <p>Setter for the field <code>parentRowModel</code>.</p>
61       *
62       * @param parentRowModel a {@link AbstractDaliRowUIModel} object.
63       */
64      public void setParentRowModel(AbstractDaliRowUIModel parentRowModel) {
65          this.parentRowModel = parentRowModel;
66          firePropertyChange(PROPERTY_PARENT_ROW_MODEL, null, parentRowModel);
67      }
68  
69      public boolean isEditable() {
70          return editable;
71      }
72  
73      public void setEditable(boolean editable) {
74          this.editable = editable;
75          firePropertyChange(PROPERTY_EDITABLE, null, editable);
76  
77      }
78  
79      public boolean isDoubleList() {
80          return doubleList;
81      }
82  
83      public void setDoubleList(boolean doubleList) {
84          this.doubleList = doubleList;
85          firePropertyChange(PROPERTY_DOUBLE_LIST, null, doubleList);
86      }
87  }