protected void applyColor( @Nonnull final LayoutContext context, @Nonnull final JSONObject properties, @Nonnull final Quad quad) { final JSON property = context.resolveProperty(properties, "color"); if (null != property) { if (property.isString()) { quad.color(Color.valueOf(context.interpolateString(property.stringValue()))); } else { quad.color(property.intValue()); } } }
/** {@inheritDoc} */ @Nonnull @Override protected Future<Void> inflate( @Nonnull final LayoutContext context, @Nonnull final JSONObject properties, @Nonnull final DisplayObject displayObject) { return super.inflate(context, properties, displayObject) .proceed( theVoid -> applyColor(context, properties, (Quad) displayObject), context.dispatcher()); }