View Javadoc
1   package fr.ifremer.dali.ui.swing.content.home.survey;
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.data.survey.SurveyDTO;
27  import fr.ifremer.dali.ui.swing.content.home.HomeUIModel;
28  import fr.ifremer.dali.ui.swing.util.table.AbstractDaliTableUIModel;
29  
30  /**
31   * Model pour le tableau des observations.
32   */
33  public class SurveysTableUIModel extends AbstractDaliTableUIModel<SurveyDTO, SurveysTableRowModel, SurveysTableUIModel> {
34  
35      private HomeUIModel mainUIModel;
36  
37      private boolean selectedSurveyEditable;
38      /** Constant <code>PROPERTY_SELECTED_SURVEY_EDITABLE="selectedSurveyEditable"</code> */
39      public static final String PROPERTY_SELECTED_SURVEY_EDITABLE = "selectedSurveyEditable";
40  
41      private boolean samplingOperationsLoading;
42      /** Constant <code>PROPERTY_SAMPLING_OPERATIONS_LOADING="samplingOperationsLoading"</code> */
43      public static final String PROPERTY_SAMPLING_OPERATIONS_LOADING = "samplingOperationsLoading";
44  
45      /**
46       * Constructor.
47       */
48      public SurveysTableUIModel() {
49          super();
50      }
51  
52      /**
53       * <p>Getter for the field <code>mainUIModel</code>.</p>
54       *
55       * @return a {@link fr.ifremer.dali.ui.swing.content.home.HomeUIModel} object.
56       */
57      public HomeUIModel getMainUIModel() {
58          return mainUIModel;
59      }
60  
61      /**
62       * <p>Setter for the field <code>mainUIModel</code>.</p>
63       *
64       * @param mainUIModel a {@link fr.ifremer.dali.ui.swing.content.home.HomeUIModel} object.
65       */
66      public void setMainUIModel(HomeUIModel mainUIModel) {
67          this.mainUIModel = mainUIModel;
68      }
69  
70      /**
71       * <p>isSamplingOperationsLoading.</p>
72       *
73       * @return a boolean.
74       */
75      public boolean isSamplingOperationsLoading() {
76          return samplingOperationsLoading;
77      }
78  
79      /**
80       * <p>Setter for the field <code>samplingOperationsLoading</code>.</p>
81       *
82       * @param samplingOperationsLoading a boolean.
83       */
84      public void setSamplingOperationsLoading(boolean samplingOperationsLoading) {
85          this.samplingOperationsLoading = samplingOperationsLoading;
86          firePropertyChange(PROPERTY_SAMPLING_OPERATIONS_LOADING, null, samplingOperationsLoading);
87      }
88  
89      /**
90       * <p>isSelectedSurveyEditable.</p>
91       *
92       * @return a boolean.
93       */
94      public boolean isSelectedSurveyEditable() {
95          return selectedSurveyEditable;
96      }
97  
98      /**
99       * <p>Setter for the field <code>selectedSurveyEditable</code>.</p>
100      *
101      * @param selectedSurveyEditable a boolean.
102      */
103     public void setSelectedSurveyEditable(boolean selectedSurveyEditable) {
104         this.selectedSurveyEditable = selectedSurveyEditable;
105         firePropertyChange(PROPERTY_SELECTED_SURVEY_EDITABLE, null, selectedSurveyEditable);
106     }
107 }