1 /* 2 * This file is a part of CAST project. 3 * (c) Copyright 2007, AGH University of Science & Technology 4 * https://caribou.iisg.agh.edu.pl/trac/cast 5 * 6 * Licensed under the Eclipse Public License, Version 1.0 (the "License"). 7 * You may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * http://www.eclipse.org/legal/epl-v10.html 10 */ 11 /* 12 * File: ImageSize.java 13 * Created: 2009-07-17 14 * Author: kpietak 15 * $Id$ 16 */ 17 18 package pl.edu.agh.cast.resource; 19 20 /** 21 * Enumeration which defines available image size. For more details see {@link IVisualResource}. 22 * 23 * @author AGH CAST Team 24 */ 25 public enum ImageSize { 26 /** 27 * Size 16x16px. 28 */ 29 X16X16("16x16"), //$NON-NLS-1$ 30 31 /** 32 * Size 32x32px. 33 */ 34 X32X32("32x32"), //$NON-NLS-1$ 35 36 /** 37 * Size 48x48px. 38 */ 39 X48X48("48x48"), //$NON-NLS-1$ 40 41 /** 42 * Any other size. 43 */ 44 OTHER(""); //$NON-NLS-1$ 45 46 /** 47 * Image name extension associated with given size. 48 */ 49 private String nameExtension; 50 51 private ImageSize(String nameExtension) { 52 assert nameExtension != null; 53 this.nameExtension = nameExtension; 54 } 55 56 /** 57 * Returns default image size. 58 * 59 * @return default size 60 */ 61 public static ImageSize getDefaultSize() { 62 return ImageSize.X48X48; 63 } 64 65 public String getNameExtension() { 66 return nameExtension; 67 } 68 69 }