Class Resolution.Ratio
- Direct Known Subclasses:
Resolution.Ratio16x10, Resolution.Ratio16x9, Resolution.Ratio4x3, Resolution.Ratio5x4
- Enclosing class:
Resolution
public static class Resolution.Ratio
Describes an aspect ratio used to categorize
Resolution instances. The ratio consists of a name and the x:y components.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<Resolution> Collects all public staticResolutionfields declared on the supplied class.getName()Gets the name of this aspect ratiointgetX()Gets the x-value of this aspect ratio.intgetY()Gets the y-value of this aspect ratio.toString()
-
Constructor Details
-
Ratio
protected Ratio(int x, int y) Constructs a newRatiowith the given components. The name defaults to"x:y".- Parameters:
x- the x component of the ratioy- the y component of the ratio
-
Ratio
Constructs a newRatiowith the given components and explicit name.- Parameters:
x- the x component of the ratioy- the y component of the rationame- the display name of the ratio
-
-
Method Details
-
getAll
Collects all public staticResolutionfields declared on the supplied class.- Parameters:
clz- the class whose declaredResolutionfields will be returned- Returns:
- all matching resolutions
-
getName
-
getX
public int getX()Gets the x-value of this aspect ratio.- Returns:
- The x-value of this aspect ratio.
-
getY
public int getY()Gets the y-value of this aspect ratio.- Returns:
- The y-value of this aspect ratio.
-
toString
-