Dekoh platform API

dekoh.portal.fwk.image
Class ImageSize

java.lang.Object
  extended by java.lang.Enum
      extended by dekoh.portal.fwk.image.ImageSize
All Implemented Interfaces:
Serializable, Comparable

public final class ImageSize
extends Enum

Since:
Nov 24, 2006
See Also:
Serialized Form

Field Summary
static ImageSize MEDIUM
          Image of atmost 800x600 (width*height) dimensions
static ImageSize ORIGINAL
          Original sized image
static ImageSize SMALL
          Image of atmost 400x400 dimensions
static ImageSize SQUARE_THUMB
          Square thumbnail of atmost 100x100 dimensions.
static ImageSize THUMB
          Image of atmost 100x100 dimensions
 
Method Summary
 int getHeight()
           
 int getWidth()
           
static boolean isMedium(ImageSize aImageSize)
           
static boolean isOriginalSize(ImageSize aImageSize)
           
static boolean isSmall(ImageSize aImageSize)
           
static boolean isThumbNail(ImageSize aImageSize)
           
static EnumSet validResizeOptions()
           
static ImageSize valueOf(String name)
           
static ImageSize valueOfTrimIgnoreCase(String imageSizeString)
          Calls valueOf after trimming and uppercasing the incoming string.
static ImageSize[] values()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SQUARE_THUMB

public static final ImageSize SQUARE_THUMB
Square thumbnail of atmost 100x100 dimensions. Image will be cropped to create a square


THUMB

public static final ImageSize THUMB
Image of atmost 100x100 dimensions


SMALL

public static final ImageSize SMALL
Image of atmost 400x400 dimensions


MEDIUM

public static final ImageSize MEDIUM
Image of atmost 800x600 (width*height) dimensions


ORIGINAL

public static final ImageSize ORIGINAL
Original sized image

Method Detail

values

public static final ImageSize[] values()

valueOf

public static ImageSize valueOf(String name)

validResizeOptions

public static EnumSet validResizeOptions()
Returns:
among the defined image sizes which represent a Resized Image Size.

valueOfTrimIgnoreCase

public static ImageSize valueOfTrimIgnoreCase(String imageSizeString)
Calls valueOf after trimming and uppercasing the incoming string.

Parameters:
imageSizeString -
Returns:
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

isThumbNail

public static boolean isThumbNail(ImageSize aImageSize)

isSmall

public static boolean isSmall(ImageSize aImageSize)

isMedium

public static boolean isMedium(ImageSize aImageSize)

isOriginalSize

public static boolean isOriginalSize(ImageSize aImageSize)

getHeight

public int getHeight()
Returns:
in pixels

getWidth

public int getWidth()
Returns:
in pixels

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers