Class ElementResizer
- java.lang.Object
-
- com.github.loyada.jdollarx.singlebrowser.sizing.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 Summary
Constructors Constructor Description ElementResizer(Path path, int expectedWidth, int expectedHeight)
Resize an element in the browser
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Revert stateLong
getTotalHeight()
get total scrollable height of the elementLong
getTotalWidth()
get total scrollable width of the elementLong
getVisibleHeight()
get visible height of the elementLong
getVisibleWidth()
get visible width of the elementstatic Long
getVisibleWidth(Path el)
get visible width of the element
-
-
-
Constructor Detail
-
ElementResizer
public ElementResizer(Path path, int expectedWidth, int expectedHeight)
Resize an element in the browser- Parameters:
path
- The element to resizeexpectedWidth
- expected widthexpectedHeight
- 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 interfaceAutoCloseable
-
-