View Javadoc
1   package fr.ifremer.dali.ui.swing.content.manage.campaign.menu;
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.SearchDateDTO;
27  import fr.ifremer.dali.ui.swing.content.manage.referential.menu.DefaultReferentialMenuUIModel;
28  
29  import java.util.Date;
30  
31  public class CampaignsMenuUIModel extends DefaultReferentialMenuUIModel {
32  
33      public static final String PROPERTY_SEARCH_START_DATE = "searchStartDate";
34      public static final String PROPERTY_SEARCH_END_DATE = "searchEndDate";
35  
36      private SearchDateDTO searchStartDate;
37      private SearchDateDTO searchEndDate;
38  
39      private Date startDate1;
40      private Date startDate2;
41      private Date endDate1;
42      private Date endDate2;
43  
44      public SearchDateDTO getSearchStartDate() {
45          return searchStartDate;
46      }
47  
48      public void setSearchStartDate(SearchDateDTO searchStartDate) {
49          this.searchStartDate = searchStartDate;
50          firePropertyChange(PROPERTY_SEARCH_START_DATE, null, searchStartDate);
51      }
52  
53      public SearchDateDTO getSearchEndDate() {
54          return searchEndDate;
55      }
56  
57      public void setSearchEndDate(SearchDateDTO searchEndDate) {
58          this.searchEndDate = searchEndDate;
59          firePropertyChange(PROPERTY_SEARCH_END_DATE, null, searchEndDate);
60      }
61  
62      public Date getStartDate1() {
63          return startDate1;
64      }
65  
66      public void setStartDate1(Date startDate1) {
67          this.startDate1 = startDate1;
68      }
69  
70      public Date getStartDate2() {
71          return startDate2;
72      }
73  
74      public void setStartDate2(Date startDate2) {
75          this.startDate2 = startDate2;
76      }
77  
78      public Date getEndDate1() {
79          return endDate1;
80      }
81  
82      public void setEndDate1(Date endDate1) {
83          this.endDate1 = endDate1;
84      }
85  
86      public Date getEndDate2() {
87          return endDate2;
88      }
89  
90      public void setEndDate2(Date endDate2) {
91          this.endDate2 = endDate2;
92      }
93  
94      /** {@inheritDoc} */
95      @Override
96      public void clear() {
97          super.clear();
98          setName(null);
99          setSearchStartDate(null);
100         setSearchEndDate(null);
101         setStartDate1(null);
102         setStartDate2(null);
103         setEndDate1(null);
104         setEndDate2(null);
105     }
106 }