View Javadoc
1   package fr.ifremer.reefdb.ui.swing.content.manage.filter.program;
2   
3   /*-
4    * #%L
5    * Reef DB :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2022 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  
27  import fr.ifremer.reefdb.dto.enums.FilterTypeValues;
28  import fr.ifremer.reefdb.ui.swing.content.ReefDbMainUI;
29  import fr.ifremer.reefdb.ui.swing.content.manage.filter.FilterUI;
30  import fr.ifremer.reefdb.ui.swing.content.manage.filter.program.element.FilterElementProgramUI;
31  import java.awt.LayoutManager;
32  import jaxx.runtime.JAXXContext;
33  import jaxx.runtime.JAXXObjectDescriptor;
34  import jaxx.runtime.JAXXUtil;
35  import org.apache.commons.logging.Log;
36  import org.apache.commons.logging.LogFactory;
37  
38  public class FilterProgramUI extends FilterUI {
39  
40      /*-----------------------------------------------------------------------*/
41      /*------------------------- Other static fields -------------------------*/
42      /*-----------------------------------------------------------------------*/
43  
44      private static final String $jaxxObjectDescriptor = "H4sIAAAAAAAAAJ1SS0oDQRCtjCaKH0QFCYjgZ985QFYSDY4EFTUYmFVnUjNOmE9b3dHJRjyCR9C9S3eew51XEPECYs9Mvioo9q6r6r16j1cPr5CXBBttHseMOqHyAmT7243GYbONttpBaZMnVESQvZwBhgWzrUFdKtiyagm81IOXKlEgohDDEXS5BjNSdX2U54hKwdo4wpaydDJol2PRoT7rQNRPrHfvb8Zt6+beAIiFVjehraz/hho6mayB4bUULOlNl7zk89DVMsgLXa13PqlVfC7lAQ/wAq5hqgYFwUmTKdj8u+WUI8XHQsG04/kKqW4q2HOIeQ5hgMQI0Wk1Wcdj8krvZ3YUKk3HAh5yF1kGYoIil3jAqun3KPvVTSFS/oKCuWzwtCvQ1MYWEw8s8cVMzeciDUcXstFdX+8PVaLn7N96MCPp6epRjsojWB2LRQfOhoEPE8lZkKeOLisoWt9v5Fi3susofrmOhDDtfqwsPz+9PFb7JwGfuQ0Fc+ICAAA=";
45      private static final Log log = LogFactory.getLog(FilterProgramUI.class);
46      private static final long serialVersionUID = 1L;
47  
48      /*-----------------------------------------------------------------------*/
49      /*--------------------------- Internal states ---------------------------*/
50      /*-----------------------------------------------------------------------*/
51  
52      private boolean allComponentsCreated;
53  
54      /*-----------------------------------------------------------------------*/
55      /*------------------------ Protected components  ------------------------*/
56      /*-----------------------------------------------------------------------*/
57  
58      protected FilterProgramUI filterUI = this;
59  
60      /*-----------------------------------------------------------------------*/
61      /*---------------------------- Constructors  ----------------------------*/
62      /*-----------------------------------------------------------------------*/
63  
64      public FilterProgramUI(ReefDbMainUI param0) {
65          super(param0);
66          $initialize();
67      }
68  
69      public FilterProgramUI(LayoutManager param0, boolean param1) {
70          super(param0 ,param1);
71          $initialize();
72      }
73  
74      public FilterProgramUI(JAXXContext param0, LayoutManager param1, boolean param2) {
75          super(param0 ,param1 ,param2);
76          $initialize();
77      }
78  
79      public FilterProgramUI(boolean param0) {
80          super(param0);
81          $initialize();
82      }
83  
84      public FilterProgramUI(JAXXContext param0, boolean param1) {
85          super(param0 ,param1);
86          $initialize();
87      }
88  
89      public FilterProgramUI() {
90          $initialize();
91      }
92  
93      public FilterProgramUI(JAXXContext param0) {
94          super(param0);
95          $initialize();
96      }
97  
98      public FilterProgramUI(LayoutManager param0) {
99          super(param0);
100         $initialize();
101     }
102 
103     public FilterProgramUI(JAXXContext param0, LayoutManager param1) {
104         super(param0 ,param1);
105         $initialize();
106     }
107 
108     /*-----------------------------------------------------------------------*/
109     /*--------------------------- Statics methods ---------------------------*/
110     /*-----------------------------------------------------------------------*/
111 
112     public static JAXXObjectDescriptor $getJAXXObjectDescriptor() {
113         return JAXXUtil.decodeCompressedJAXXObjectDescriptor($jaxxObjectDescriptor);
114     }
115 
116     /*-----------------------------------------------------------------------*/
117     /*----------------------- Public acessor methods  -----------------------*/
118     /*-----------------------------------------------------------------------*/
119 
120     @Override
121     public FilterElementProgramUI getFilterElementUI() {
122         return (FilterElementProgramUI) super.getFilterElementUI();
123     }
124 
125     /*-----------------------------------------------------------------------*/
126     /*--------------------- Components creation methods ---------------------*/
127     /*-----------------------------------------------------------------------*/
128 
129     @Override
130     protected void createFilterElementUI() {
131         $objectMap.put("filterElementUI", filterElementUI = new FilterElementProgramUI(this));
132         
133         filterElementUI.setName("filterElementUI");
134     }
135 
136     @Override
137     protected void createFilterTypeId() {
138         $objectMap.put("filterTypeId", filterTypeId = FilterTypeValues.PROGRAM.getFilterTypeId());
139     }
140 
141     /*-----------------------------------------------------------------------*/
142     /*------------------------ Internal jaxx methods ------------------------*/
143     /*-----------------------------------------------------------------------*/
144 
145     private void $completeSetup() {
146         allComponentsCreated = true;
147         if (log.isDebugEnabled()) {
148             log.debug(this);
149         }
150     }
151 
152     private void $initialize() {
153         if (allComponentsCreated) {
154             return;
155         }
156         if (log.isDebugEnabled()) {
157             log.debug(this);
158         }
159         $objectMap.put("filterUI", filterUI);
160         // inline creation of filterUI
161         setName("filterUI");
162         
163         $completeSetup();
164     }
165 
166 }