extensions/net.sf.basedb.thumbnails/trunk/src/net/sf/basedb/thumbnails/ThumbnailSize.java

Code
Comments
Other
Rev Date Author Line
3401 15 Jun 15 nicklas 1 package net.sf.basedb.thumbnails;
3401 15 Jun 15 nicklas 2
3401 15 Jun 15 nicklas 3 /**
3401 15 Jun 15 nicklas 4   The size of the thumbnail to create. We define
3401 15 Jun 15 nicklas 5   four different sizes: SMALL, MEDIUM, LARGE and
3401 15 Jun 15 nicklas 6   XLARGE, starting at 80x60 pixesl and then adding 
6048 12 Nov 20 nicklas 7   another 80x60 per size up to 400x300.
3401 15 Jun 15 nicklas 8   
3401 15 Jun 15 nicklas 9   @author nicklas
3401 15 Jun 15 nicklas 10   @since 1.0
3401 15 Jun 15 nicklas 11 */
3401 15 Jun 15 nicklas 12 public enum ThumbnailSize
3401 15 Jun 15 nicklas 13 {
3401 15 Jun 15 nicklas 14   SMALL(80, 60, 5000),
3401 15 Jun 15 nicklas 15   MEDIUM(160, 120, 10000),
3401 15 Jun 15 nicklas 16   LARGE(240, 180, 20000),
6048 12 Nov 20 nicklas 17   XLARGE(320, 240, 30000),
6048 12 Nov 20 nicklas 18   XXLARGE(400, 300, 40000);
3401 15 Jun 15 nicklas 19   
3401 15 Jun 15 nicklas 20   public final int WIDTH;
3401 15 Jun 15 nicklas 21   public final int HEIGHT;
3401 15 Jun 15 nicklas 22   public final int MEMORY;
3401 15 Jun 15 nicklas 23   
3401 15 Jun 15 nicklas 24   private ThumbnailSize(int width, int height, int memory)
3401 15 Jun 15 nicklas 25   {
3401 15 Jun 15 nicklas 26     this.WIDTH = width;
3401 15 Jun 15 nicklas 27     this.HEIGHT = height;
3401 15 Jun 15 nicklas 28     this.MEMORY = memory;
3401 15 Jun 15 nicklas 29   }
3401 15 Jun 15 nicklas 30   
3401 15 Jun 15 nicklas 31 }