public class Orientation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
LANDSCAPE_THRESHOLD
Default minimum ratio (width / height) for an object to be considered as
Landscape oriented.
|
static double |
PORTRAIT_THRESHOLD
Default maximum ratio (width / height) for an object to be considered as
Portrait oriented.
|
static java.lang.String |
REVISION |
Constructor and Description |
---|
Orientation(java.awt.Dimension dimension) |
Orientation(java.io.File file) |
Modifier and Type | Method and Description |
---|---|
double |
getHeight() |
protected double |
getRatio() |
double |
getWidth() |
boolean |
isLandscape() |
boolean |
isPortrait() |
boolean |
isSquare() |
java.lang.String |
toString() |
public static final java.lang.String REVISION
public static final double LANDSCAPE_THRESHOLD
public static final double PORTRAIT_THRESHOLD
public Orientation(java.awt.Dimension dimension)
dimension
- the source Dimension
.public Orientation(java.io.File file)
file
- the oriented object File.protected double getRatio()
public double getWidth()
public double getHeight()
public boolean isLandscape()
LANDSCAPE_THRESHOLD
.public boolean isPortrait()
PORTRAIT_THRESHOLD
.public boolean isSquare()
PORTRAIT_THRESHOLD
.public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001-2017 Jalios SA. All Rights Reserved.