ElementResizer

public class ElementResizer implements AutoCloseable

An AutoCloseable of a resizer for a Path element. When closing, it reverts the the original state

Constructors

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

Methods

close

public void close()

Revert state

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

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