public enum ScreenSize extends java.lang.Enum<ScreenSize>
Enum Constant and Description |
---|
LG
Large window size: 1200px - 1599px
|
MD
Medium window size: 992px - 1199px
|
SM
Small window size: 768px - 991px
|
XL
Extra large window size: 1600px+
|
XS
Extra small window size: 0px - 765px
|
Modifier and Type | Method and Description |
---|---|
static ScreenSize |
fromString(java.lang.String value) |
int |
getMinSize(float scale)
Returns the minimum screen size in pixels
|
boolean |
isGreaterThan(ScreenSize otherSize)
Returns if this
ScreenSize is larger than another ScreenSize instance |
static java.util.Iterator<ScreenSize> |
largestToSmallest()
Returns an
Iterator of largest to smallest ScreenSize s |
static java.util.Iterator<ScreenSize> |
smallestToLargest()
Returns an
Iterator of smallest to largest ScreenSize s |
static ScreenSize |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ScreenSize[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ScreenSize XS
public static final ScreenSize SM
public static final ScreenSize MD
public static final ScreenSize LG
public static final ScreenSize XL
public static ScreenSize[] values()
for (ScreenSize c : ScreenSize.values()) System.out.println(c);
public static ScreenSize valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getMinSize(float scale)
public boolean isGreaterThan(ScreenSize otherSize)
ScreenSize
is larger than another ScreenSize
instanceotherSize
- The ScreenSize
to check againstpublic static java.util.Iterator<ScreenSize> smallestToLargest()
Iterator
of smallest to largest ScreenSize
spublic static java.util.Iterator<ScreenSize> largestToSmallest()
Iterator
of largest to smallest ScreenSize
spublic static ScreenSize fromString(java.lang.String value)