View Javadoc
1   package fr.ifremer.reefdb.ui.swing.content.observation.photo;
2   
3   /*-
4    * #%L
5    * Reef DB :: UI
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2019 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.quadrige3.core.dao.technical.Images;
28  import fr.ifremer.quadrige3.core.dao.technical.enumeration.EnumValue;
29  
30  import static org.nuiton.i18n.I18n.n;
31  import static org.nuiton.i18n.I18n.t;
32  
33  /**
34   * @author peck7 on 18/06/2019.
35   */
36  public enum PhotoViewType implements EnumValue {
37  
38      VIEW_DIAPO("DIAPO", n("reefdb.photo.type.diaporama"), Images.ImageType.DIAPO),
39      VIEW_THUMBNAIL("THUMBNAIL", n("reefdb.photo.type.thumbnail"), Images.ImageType.THUMBNAIL);
40  
41      private final String code;
42      private final String i18nLabel;
43      private final Images.ImageType imageType;
44  
45  
46      PhotoViewType(String code, String i18nLabel, Images.ImageType imageType) {
47          this.code = code;
48          this.i18nLabel = i18nLabel;
49          this.imageType = imageType;
50      }
51  
52      @Override
53      public String getCode() {
54          return code;
55      }
56  
57      @Override
58      public String getLabel() {
59          return t(i18nLabel);
60      }
61  
62      public Images.ImageType getImageType() {
63          return imageType;
64      }
65  }