Package org.adempiere.webui
Class ClientInfo
java.lang.Object
org.adempiere.webui.ClientInfo
- All Implemented Interfaces:
Serializable
Model for client info from browser
- Author:
- Low Heng Sin
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionint
int
int
int
int
double
static final int
static final int
static final int
static final int
static final int
static final int
int
int
static final int
static final int
boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientInfo
get()
static boolean
static boolean
isMobile()
boolean
static boolean
maxHeight
(int maxHeight) static boolean
maxWidth
(int maxWidth) static boolean
minHeight
(int minHeight) static boolean
minWidth
(int minWidth) static void
onClientInfo
(org.zkoss.zk.ui.Component component, Runnable runnable) Call runnable on client info updatetoString()
-
Field Details
-
colorDepth
public int colorDepth -
desktopWidth
public int desktopWidth -
desktopHeight
public int desktopHeight -
desktopXOffset
public int desktopXOffset -
desktopYOffset
public int desktopYOffset -
screenHeight
public int screenHeight -
screenWidth
public int screenWidth -
orientation
-
timeZone
-
userAgent
-
tablet
public boolean tablet -
devicePixelRatio
public double devicePixelRatio -
LARGE_WIDTH
public static final int LARGE_WIDTH- See Also:
-
MEDIUM_WIDTH
public static final int MEDIUM_WIDTH- See Also:
-
SMALL_WIDTH
public static final int SMALL_WIDTH- See Also:
-
EXTRA_SMALL_WIDTH
public static final int EXTRA_SMALL_WIDTH- See Also:
-
LARGE_HEIGHT
public static final int LARGE_HEIGHT- See Also:
-
MEDIUM_HEIGHT
public static final int MEDIUM_HEIGHT- See Also:
-
SMALL_HEIGHT
public static final int SMALL_HEIGHT- See Also:
-
EXTRA_SMALL_HEIGHT
public static final int EXTRA_SMALL_HEIGHT- See Also:
-
-
Constructor Details
-
ClientInfo
public ClientInfo()
-
-
Method Details
-
toString
-
isMobile
public static boolean isMobile()- Returns:
- true if mobile browser
-
isFirefox
- Parameters:
version
- null to match all version- Returns:
- true if browser is firefox and match the pass in version parameter
-
get
- Returns:
- the current clientinfo instance
-
minWidth
public static boolean minWidth(int minWidth) - Parameters:
minWidth
-- Returns:
- true if desktopWidth >= minWidth
-
maxWidth
public static boolean maxWidth(int maxWidth) - Parameters:
maxWidth
-- Returns:
- true if desktopWidth <= maxWidth
-
minHeight
public static boolean minHeight(int minHeight) - Parameters:
minHeight
-- Returns:
- true if desktopHeight >= minHeight
-
maxHeight
public static boolean maxHeight(int maxHeight) - Parameters:
maxHeight
-- Returns:
- true if desktopHeight <= maxHeight
-
onClientInfo
Call runnable on client info update- Parameters:
component
-runnable
-
-
isPortrait
public boolean isPortrait()- Returns:
- true if screen orientation is portrait, false otherwise
-