Package org.adempiere.webui
Class ClientInfo
- java.lang.Object
-
- org.adempiere.webui.ClientInfo
-
- All Implemented Interfaces:
Serializable
public class ClientInfo extends Object implements Serializable
- Author:
- Low Heng Sin
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description intcolorDepthintdesktopHeightintdesktopWidthintdesktopXOffsetintdesktopYOffsetdoubledevicePixelRatiostatic intEXTRA_SMALL_HEIGHTstatic intEXTRA_SMALL_WIDTHstatic intLARGE_HEIGHTstatic intLARGE_WIDTHstatic intMEDIUM_HEIGHTstatic intMEDIUM_WIDTHStringorientationintscreenHeightintscreenWidthstatic intSMALL_HEIGHTstatic intSMALL_WIDTHbooleantabletTimeZonetimeZoneStringuserAgent
-
Constructor Summary
Constructors Constructor Description ClientInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientInfoget()static booleanisMobile()booleanisPortrait()static booleanmaxHeight(int maxHeight)static booleanmaxWidth(int maxWidth)static booleanminHeight(int minHeight)static booleanminWidth(int minWidth)static voidonClientInfo(org.zkoss.zk.ui.Component component, Runnable runnable)Call runnable on client info updateStringtoString()
-
-
-
Field Detail
-
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
public String orientation
-
timeZone
public TimeZone timeZone
-
userAgent
public String userAgent
-
tablet
public boolean tablet
-
devicePixelRatio
public double devicePixelRatio
-
LARGE_WIDTH
public static final int LARGE_WIDTH
- See Also:
- Constant Field Values
-
MEDIUM_WIDTH
public static final int MEDIUM_WIDTH
- See Also:
- Constant Field Values
-
SMALL_WIDTH
public static final int SMALL_WIDTH
- See Also:
- Constant Field Values
-
EXTRA_SMALL_WIDTH
public static final int EXTRA_SMALL_WIDTH
- See Also:
- Constant Field Values
-
LARGE_HEIGHT
public static final int LARGE_HEIGHT
- See Also:
- Constant Field Values
-
MEDIUM_HEIGHT
public static final int MEDIUM_HEIGHT
- See Also:
- Constant Field Values
-
SMALL_HEIGHT
public static final int SMALL_HEIGHT
- See Also:
- Constant Field Values
-
EXTRA_SMALL_HEIGHT
public static final int EXTRA_SMALL_HEIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
isMobile
public static boolean isMobile()
- Returns:
- true if mobile browser
-
get
public static ClientInfo 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
public static void onClientInfo(org.zkoss.zk.ui.Component component, Runnable runnable)Call runnable on client info update- Parameters:
component-runnable-
-
isPortrait
public boolean isPortrait()
- Returns:
- true if screen orientation is portrait, false otherwise
-
-