public interface DesktopSizeConsumer
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
boolean |
needsDesktopSize()
Find out if the module requires the desktop size info in its current
configuration.
|
void |
setDesktopSize(Dimension original,
Dimension current)
Set the original and the current desktop size.
|
boolean needsDesktopSize()
ExtendedParamsObject.setParameters(java.util.Map)
one. This
allows the implementing class to declare the need depending on the method
input parameters.void setDesktopSize(Dimension original, Dimension current)
Set the original and the current desktop size. The original one is typically retrieved from the template image meta data where it gets stored at the time of the image creation. The current size is derived from the current desktop connection.
The method will be called only if needsDesktopSize()
returns
true. It is guaranteed that the method gets called before the
ImageComparisonModule.setBaseImage(java.awt.Image)
and/or
ImageComparisonModule.compare(java.awt.Image, java.awt.Rectangle, java.awt.Image, java.lang.String, com.tplan.robot.scripting.ScriptingContext, float)
ones. This allows the implementing class to get the desktop data and then
adjust the template image scale with regard to the desktop size change
prior to the comparison.
original
- size of the desktop the template image was created from.current
- current connection desktop size.