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 int
colorDepth
int
desktopHeight
int
desktopWidth
int
desktopXOffset
int
desktopYOffset
double
devicePixelRatio
static int
EXTRA_SMALL_HEIGHT
static int
EXTRA_SMALL_WIDTH
static int
LARGE_HEIGHT
static int
LARGE_WIDTH
static int
MEDIUM_HEIGHT
static int
MEDIUM_WIDTH
String
orientation
int
screenHeight
int
screenWidth
static int
SMALL_HEIGHT
static int
SMALL_WIDTH
boolean
tablet
TimeZone
timeZone
String
userAgent
-
Constructor Summary
Constructors Constructor Description ClientInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientInfo
get()
static boolean
isMobile()
boolean
isPortrait()
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 updateString
toString()
-
-
-
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
-
-