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()
Get current client info instancestatic boolean
Is firefoxstatic boolean
isMobile()
Is mobile browser clientboolean
Is screen orientation portraitstatic boolean
maxHeight
(int maxHeight) Get maximum height of desktopstatic boolean
maxWidth
(int maxWidth) Get maximum width of desktopstatic boolean
minHeight
(int minHeight) Get minimum height of desktopstatic boolean
minWidth
(int minWidth) Get minimum width of desktopstatic 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()Is mobile browser client- Returns:
- true if mobile browser
-
isFirefox
Is firefox- Parameters:
version
- null to match all version- Returns:
- true if browser is firefox and match the pass in version parameter
-
get
Get current client info instance- Returns:
- the current clientinfo instance
-
minWidth
public static boolean minWidth(int minWidth) Get minimum width of desktop- Parameters:
minWidth
-- Returns:
- true if desktopWidth >= minWidth
-
maxWidth
public static boolean maxWidth(int maxWidth) Get maximum width of desktop- Parameters:
maxWidth
-- Returns:
- true if desktopWidth <= maxWidth
-
minHeight
public static boolean minHeight(int minHeight) Get minimum height of desktop- Parameters:
minHeight
-- Returns:
- true if desktopHeight >= minHeight
-
maxHeight
public static boolean maxHeight(int maxHeight) Get maximum height of desktop- Parameters:
maxHeight
-- Returns:
- true if desktopHeight <= maxHeight
-
onClientInfo
Call runnable on client info update- Parameters:
component
-runnable
-
-
isPortrait
public boolean isPortrait()Is screen orientation portrait- Returns:
- true if screen orientation is portrait, false otherwise
-