Source:
public void handle(final View<W> content, final V view) { final W bean = content.getDefinition(); final double boundsWidth = ((BoundsImpl) content.getBounds()).getWidth(); final double boundsHeight = ((BoundsImpl) content.getBounds()).getHeight(); if (view instanceof HasSize) { final Double beanWidth = widthProvider.apply(bean); final Double beanHeight = heightProvider.apply(bean); final double width = null != beanWidth ? beanWidth : boundsWidth; final double height = null != beanHeight ? beanHeight : boundsHeight; final Double minWidth = minWidthProvider.apply(bean); final Double maxWidth = maxWidthProvider.apply(bean); final Double minHeight = minHeightProvider.apply(bean); final Double maxHeight = maxHeightProvider.apply(bean); HasSize hasSizeView = (HasSize)view; if (width > 0 && height > 0) { hasSizeView.setSize(width, height); } if (minWidth == null || minWidth > 0) { hasSizeView.setMinWidth(minWidth); } if (maxWidth == null || maxWidth > 0) { hasSizeView.setMaxWidth(maxWidth); } if (minHeight == null || minHeight > 0) { hasSizeView.setMinHeight(minHeight); } if (maxHeight == null || maxHeight > 0) { hasSizeView.setMaxHeight(maxHeight); } } if (view instanceof HasRadius) { final Double beanRadius = radiusProvider.apply(bean); final double radius = null != beanRadius ? beanRadius : (boundsWidth > boundsHeight ? boundsWidth / 2 : boundsHeight / 2); final double minRadius = minRadiusProvider.apply(bean); final double maxRadius = maxRadiusProvider.apply(bean); if (radius > 0) { ((HasRadius) view).setRadius(radius); } if (minRadius > 0 && maxRadius > 0) { ((HasRadius) view).setRadiusConstraints(minRadius, maxRadius); } } }

Target:
public void handle(final View<W> content, final V view) { final W bean = content.getDefinition(); final double boundsWidth = ((BoundsImpl) content.getBounds()).getWidth(); final double boundsHeight = ((BoundsImpl) content.getBounds()).getHeight(); if (view instanceof HasSize) { final Double beanWidth = widthProvider.apply(bean); final Double beanHeight = heightProvider.apply(bean); final double width = null != beanWidth ? beanWidth : boundsWidth; final double height = null != beanHeight ? beanHeight : boundsHeight; final Double minWidth = minWidthProvider.apply(bean); final Double maxWidth = maxWidthProvider.apply(bean); final Double minHeight = minHeightProvider.apply(bean); final Double maxHeight = maxHeightProvider.apply(bean); HasSize hasSizeView = (HasSize)view; if (width > 0 && height > 0) { hasSizeView.setSize(width, height); } if (isValidSizeConstraint(minWidth)) { hasSizeView.setMinWidth(minWidth); } if (isValidSizeConstraint(maxWidth)) { hasSizeView.setMaxWidth(maxWidth); } if (isValidSizeConstraint(minHeight)) { hasSizeView.setMinHeight(minHeight); } if (isValidSizeConstraint(maxHeight)) { hasSizeView.setMaxHeight(maxHeight); } } if (view instanceof HasRadius) { final Double beanRadius = radiusProvider.apply(bean); final double radius = null != beanRadius ? beanRadius : (boundsWidth > boundsHeight ? boundsWidth / 2 : boundsHeight / 2); final Double minRadius = minRadiusProvider.apply(bean); final Double maxRadius = maxRadiusProvider.apply(bean); if (radius > 0) { ((HasRadius) view).setRadius(radius); } if (isValidSizeConstraint(minRadius)) { ((HasRadius) view).setMinRadius(minRadius); } if (isValidSizeConstraint(maxRadius)) { ((HasRadius) view).setMaxRadius(maxRadius); } } }