View Javadoc
1   package fr.ifremer.reefdb.ui.swing.content.manage.program.pmfms;
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.configuration.programStrategy.PmfmStrategyDTO;
27  import fr.ifremer.reefdb.ui.swing.util.table.AbstractReefDbTableUIModel;
28  
29  /**
30   * Modele pour la zone des programmes.
31   */
32  public class PmfmsTableUIModel extends AbstractReefDbTableUIModel<PmfmStrategyDTO, PmfmsTableRowModel, PmfmsTableUIModel> {
33  
34      /** Constant <code>PROPERTY_LOADED="loaded"</code> */
35      public static final String PROPERTY_LOADED = "loaded";
36      /** Constant <code>PROPERTY_EDITABLE="editable"</code> */
37      public static final String PROPERTY_EDITABLE = "editable";
38      /** Constant <code>PROPERTY_UP_ALLOWED="upAllowed"</code> */
39      public static final String PROPERTY_UP_ALLOWED = "upAllowed";
40      /** Constant <code>PROPERTY_DOWN_ALLOWED="downAllowed"</code> */
41      public static final String PROPERTY_DOWN_ALLOWED = "downAllowed";
42      private boolean loaded;
43      private boolean editable;
44      private boolean upAllowed;
45      private boolean downAllowed;
46  
47      /**
48       * Constructor.
49       */
50      public PmfmsTableUIModel() {
51          super();
52      }
53  
54      /**
55       * <p>isLoaded.</p>
56       *
57       * @return a boolean.
58       */
59      public boolean isLoaded() {
60          return loaded;
61      }
62  
63      /**
64       * <p>Setter for the field <code>loaded</code>.</p>
65       *
66       * @param loaded a boolean.
67       */
68      public void setLoaded(boolean loaded) {
69          this.loaded = loaded;
70          firePropertyChange(PROPERTY_LOADED, null, loaded);
71      }
72  
73      /**
74       * <p>isEditable.</p>
75       *
76       * @return a boolean.
77       */
78      public boolean isEditable() {
79          return editable;
80      }
81  
82      /**
83       * <p>Setter for the field <code>editable</code>.</p>
84       *
85       * @param editable a boolean.
86       */
87      public void setEditable(boolean editable) {
88          this.editable = editable;
89          firePropertyChange(PROPERTY_EDITABLE, null, editable);
90      }
91  
92      /**
93       * <p>isUpAllowed.</p>
94       *
95       * @return a boolean.
96       */
97      public boolean isUpAllowed() {
98          return upAllowed;
99      }
100 
101     /**
102      * <p>Setter for the field <code>upAllowed</code>.</p>
103      *
104      * @param upAllowed a boolean.
105      */
106     public void setUpAllowed(boolean upAllowed) {
107         this.upAllowed = upAllowed;
108         firePropertyChange(PROPERTY_UP_ALLOWED, null, upAllowed);
109     }
110 
111     /**
112      * <p>isDownAllowed.</p>
113      *
114      * @return a boolean.
115      */
116     public boolean isDownAllowed() {
117         return downAllowed;
118     }
119 
120     /**
121      * <p>Setter for the field <code>downAllowed</code>.</p>
122      *
123      * @param downAllowed a boolean.
124      */
125     public void setDownAllowed(boolean downAllowed) {
126         this.downAllowed = downAllowed;
127         firePropertyChange(PROPERTY_DOWN_ALLOWED, null, downAllowed);
128     }
129 }