public class LocationCacheAspect
extends java.lang.Object
Widget.screenLocation()
and
Widget.screenPhysicalLocation()
APIs are executed.Modifier and Type | Field and Description |
---|---|
private static int |
layoutDepth
Tracks the depth of layout-related nested API calls.
|
Constructor and Description |
---|
LocationCacheAspect() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
cacheScreenLocation(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint)
Executed around the
Widget.screenLocation() API. |
java.lang.Object |
cacheScreenPhysicalLocation(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint)
Executed around the
Widget.screenPhysicalLocation() API. |
java.lang.Object |
disableLocationCacheForLayout(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint,
Container<?> container)
Executed around the
LayoutManager APIs, keeping
track of the nested depth via layoutDepth . |
java.lang.Object |
disableLocationCacheInContainer(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint)
Executed around the
Container.doLayout() and related APIs, keeping track of the
nested depth via layoutDepth . |
private static int layoutDepth
cached values to be reset.
public java.lang.Object disableLocationCacheForLayout(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint, Container<?> container) throws java.lang.Throwable
LayoutManager
APIs, keeping
track of the nested depth via layoutDepth
.
Before executing the API, it will reset any cached location values.
thisJoinPoint
- A join point reference.container
- The container parameter instance.java.lang.Throwable
- Any exceptions are untouched propagated out.public java.lang.Object disableLocationCacheInContainer(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint) throws java.lang.Throwable
Container.doLayout()
and related APIs, keeping track of the
nested depth via layoutDepth
.
Before executing the API, it will reset any cached location values.
thisJoinPoint
- A join point reference.java.lang.Throwable
- Any exceptions are untouched propagated out.public java.lang.Object cacheScreenLocation(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint) throws java.lang.Throwable
Widget.screenLocation()
API. If the widget has an already
cached value and the layoutDepth
is zero, it will use it. Otherwise, it will
compute it and cache it (if layoutDepth
is zero).thisJoinPoint
- A join point reference.java.lang.Throwable
- Any exceptions are untouched propagated out.public java.lang.Object cacheScreenPhysicalLocation(org.aspectj.lang.ProceedingJoinPoint thisJoinPoint) throws java.lang.Throwable
Widget.screenPhysicalLocation()
API. If the widget has an already
cached value and the layoutDepth
is zero, it will use it. Otherwise, it will
compute it and cache it (if layoutDepth
is zero).thisJoinPoint
- A join point reference.java.lang.Throwable
- Any exceptions are untouched propagated out.