int height = layer.getPreferredHeight();
return ((event.x < 0 || event.x > width) || (event.y < 0 || event.y > height));
}
}, new ClearHoverStylingAction());
// clear any hover styling if the mouse is moved out of a NatTable
// region
uiBindingRegistry.registerMouseMoveBinding(new IMouseEventMatcher() {
@Override
public boolean matches(NatTable natTable, MouseEvent event,
LabelStack regionLabels) {
return (natTable != null && regionLabels == null);
}
}, new ClearHoverStylingAction());
// clear any hover styling if the mouse is moved out of the NatTable
// area
uiBindingRegistry.registerMouseExitBinding(new IMouseEventMatcher() {
@Override
public boolean matches(NatTable natTable, MouseEvent event,
LabelStack regionLabels) {
// always return true because this matcher is only asked in case
// the mouse
// exits the NatTable client area, therefore further checks are
// not necessary
return true;
}
}, new ClearHoverStylingAction());
}