public static enum Avatar.Size extends Enum<Avatar.Size>
Enum Constant and Description |
---|
LARGE
A large avatar (48x48 pixels).
|
LARGE_3X |
MEDIUM
A medium avatar (32x32 pixels).
|
NORMAL
A small avatar (24x24 pixels).
|
NORMAL_3X |
RETINA_XXLARGE |
RETINA_XXLARGE_3X |
RETINA_XXXLARGE |
RETINA_XXXLARGE_3X |
SMALL
An extra-small avatar (16x16 pixels).
|
XLARGE |
XXLARGE |
XXXLARGE |
Modifier and Type | Field and Description |
---|---|
static com.google.common.base.Predicate<Avatar.Size> |
LOW_RES |
Modifier and Type | Method and Description |
---|---|
static Avatar.Size |
approx(int size)
Returns the Size which is exactly the same size as the given pixel edge value, rounding upward if no
exact match is available, except if the given value is greater than the maximum available size in which
case the maximum size will be returned.
|
static Avatar.Size |
biggerThan(int pixelValue) |
static Avatar.Size |
defaultSize() |
static Avatar.Size |
fromString(String text)
Returns an avatar image size matching the text provided.
|
String |
getParam() |
int |
getPixels() |
static Avatar.Size |
getSizeFromParam(String param)
Returns the
Avatar.Size for the given AUI standard size name. |
static Avatar.Size |
largest()
In order to cater for future addition of larger sizes this method finds the largest image size.
|
static Avatar.Size |
smallerThan(int pixelValue) |
String |
toString() |
static Avatar.Size |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Avatar.Size[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Avatar.Size NORMAL
public static final Avatar.Size SMALL
public static final Avatar.Size MEDIUM
public static final Avatar.Size LARGE
public static final Avatar.Size XLARGE
public static final Avatar.Size NORMAL_3X
public static final Avatar.Size XXLARGE
public static final Avatar.Size XXXLARGE
public static final Avatar.Size LARGE_3X
public static final Avatar.Size RETINA_XXLARGE
public static final Avatar.Size RETINA_XXXLARGE
public static final Avatar.Size RETINA_XXLARGE_3X
public static final Avatar.Size RETINA_XXXLARGE_3X
public static final com.google.common.base.Predicate<Avatar.Size> LOW_RES
public static Avatar.Size[] values()
for (Avatar.Size c : Avatar.Size.values()) System.out.println(c);
public static Avatar.Size valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Avatar.Size largest()
public static Avatar.Size defaultSize()
public static Avatar.Size biggerThan(int pixelValue)
pixelValue
- minimum number of pixels tall+wide the avatar size should beAvatar.Size
that's equal to or larger than the pixelValue,
or null if there's no size that could cater the value.public static Avatar.Size smallerThan(int pixelValue)
pixelValue
- minimum number of pixels tall+wide the avatar size should beAvatar.Size
that's equal to or larger than the pixelValue,
or null if there's no size that could cater the value.public int getPixels()
public String getParam()
public String toString()
toString
in class Enum<Avatar.Size>
public static Avatar.Size getSizeFromParam(String param)
Avatar.Size
for the given AUI standard size name.
Each AUI size name can be specified with a 2x or 3x multiplier. So the following sizes are available:
param
- the standard name of the size (e.g. small, medium, xlarge), may be multipliedAvatar.Size
NoSuchElementException
- if there is no known size by that name.public static Avatar.Size fromString(String text)
defaultSize()
.text
- the images size. Will match "s", "small", "SMALL". Can also be an integer value (16, 24, etc.)public static Avatar.Size approx(int size)
size
- Copyright © 2002-2019 Atlassian. All Rights Reserved.