View Javadoc
1   package fr.ifremer.dali.ui.swing.content.observation.photo;
2   
3   import fr.ifremer.quadrige3.core.dao.technical.Images;
4   import fr.ifremer.quadrige3.core.dao.technical.enumeration.EnumValue;
5   
6   import static org.nuiton.i18n.I18n.n;
7   import static org.nuiton.i18n.I18n.t;
8   
9   /**
10   * @author peck7 on 18/06/2019.
11   */
12  public enum PhotoViewType implements EnumValue {
13  
14      VIEW_DIAPO("DIAPO", n("dali.photo.type.diaporama"), Images.ImageType.DIAPO),
15      VIEW_THUMBNAIL("THUMBNAIL", n("dali.photo.type.thumbnail"), Images.ImageType.THUMBNAIL);
16  
17      private final String code;
18      private final String i18nLabel;
19      private final Images.ImageType imageType;
20  
21  
22      PhotoViewType(String code, String i18nLabel, Images.ImageType imageType) {
23          this.code = code;
24          this.i18nLabel = i18nLabel;
25          this.imageType = imageType;
26      }
27  
28      @Override
29      public String getCode() {
30          return code;
31      }
32  
33      @Override
34      public String getLabel() {
35          return t(i18nLabel);
36      }
37  
38      public Images.ImageType getImageType() {
39          return imageType;
40      }
41  }