Class ElementResizer

  • All Implemented Interfaces:
    AutoCloseable

    public class ElementResizer
    extends Object
    implements AutoCloseable
    An AutoCloseable of a resizer for a Path element. When closing, it reverts the the original state
    • Constructor Detail

      • ElementResizer

        public ElementResizer​(Path path,
                              int expectedWidth,
                              int expectedHeight)
        Resize an element in the browser
        Parameters:
        path - The element to resize
        expectedWidth - expected width
        expectedHeight - expected height
    • Method Detail

      • getVisibleHeight

        public Long getVisibleHeight()
        get visible height of the element
        Returns:
        height
      • getVisibleWidth

        public Long getVisibleWidth()
        get visible width of the element
        Returns:
        width
      • getVisibleWidth

        public static Long getVisibleWidth​(Path el)
        get visible width of the element
        Parameters:
        el - - the path to examine
        Returns:
        width
      • getTotalHeight

        public Long getTotalHeight()
        get total scrollable height of the element
        Returns:
        height
      • getTotalWidth

        public Long getTotalWidth()
        get total scrollable width of the element
        Returns:
        width
      • close

        public void close()
        Revert state
        Specified by:
        close in interface AutoCloseable