if (nuiManager.getFocus() == element) {
focusDrawn = true;
}
String family = (element.getFamily() != null) ? element.getFamily() : state.family;
UISkin skin = (element.getSkin() != null) ? element.getSkin() : state.skin;
UIStyle newStyle = skin.getStyleFor(family, element.getClass(), UIWidget.BASE_PART, element.getMode());
Rect2i regionArea;
try (SubRegion ignored = subRegionForWidget(element, region, false)) {
regionArea = applyStyleToSize(region, newStyle, calculateMaximumSize(element));
}