com.atlassian.jira.avatar
Enum AvatarManager.ImageSize

java.lang.Object
  extended by java.lang.Enum<AvatarManager.ImageSize>
      extended by com.atlassian.jira.avatar.AvatarManager.ImageSize
All Implemented Interfaces:
Serializable, Comparable<AvatarManager.ImageSize>
Enclosing interface:
AvatarManager

public static enum AvatarManager.ImageSize
extends Enum<AvatarManager.ImageSize>

Represents the different sizes of avatars that can be requested!


Enum Constant Summary
LARGE
           
MEDIUM
           
SMALL
           
 
Method Summary
static AvatarManager.ImageSize fromString(String text)
          Returns an avatar image size matching the text provided.
 String getFilenameFlag()
           
 Selection getOriginSelection()
           
 int getPixels()
           
static AvatarManager.ImageSize largest()
          In order to cater for future addition of larger sizes this method finds the largest image size.
static AvatarManager.ImageSize valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AvatarManager.ImageSize[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LARGE

public static final AvatarManager.ImageSize LARGE

MEDIUM

public static final AvatarManager.ImageSize MEDIUM

SMALL

public static final AvatarManager.ImageSize SMALL
Method Detail

values

public static AvatarManager.ImageSize[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (AvatarManager.ImageSize c : AvatarManager.ImageSize.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static AvatarManager.ImageSize valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPixels

public int getPixels()

getFilenameFlag

public String getFilenameFlag()

getOriginSelection

public Selection getOriginSelection()

largest

public static AvatarManager.ImageSize largest()
In order to cater for future addition of larger sizes this method finds the largest image size.

Returns:
The largest ImageSize

fromString

public static AvatarManager.ImageSize fromString(String text)
Returns an avatar image size matching the text provided. If none can be found Large is the default (it's always easier to downscale on the client!

Parameters:
text - the images size. Will match "s", "small", "SMALL"
Returns:
the image size enum matching the string provided


Copyright © 2002-2013 Atlassian. All Rights Reserved.