Class ClientInfo

    • 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
      • userAgent

        public String userAgent
      • tablet

        public boolean tablet
      • devicePixelRatio

        public double devicePixelRatio
    • Constructor Detail

      • ClientInfo

        public ClientInfo()
    • 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