@Test public void testScalableFalse() { when(element.getAttributeNS(STUNNER_URI, STUNNER_ATTR_NS_TRANSFORM)) .thenReturn(STUNNER_ATTR_TRANSFORM_NON_SCALABLE); tested.translateTransformDefinition(element, def); verify(def).setScalable(false); }
protected void translateTransformDefinition(final E element, final O def) { boolean result = true; Node candidate = element; while (null != candidate) { if (candidate instanceof Element) { Optional<Boolean> scalable = isScalable((Element) candidate); if (scalable.isPresent()) { result = scalable.get(); break; } candidate = candidate.getParentNode(); } else { candidate = null; } } def.setScalable(result); }
AbstractSVGPrimitiveTranslator implements SVGElementTranslator<E, O> { protected void translateTransformDefinition(final E element, final O def) { boolean result = true; Node candidate = element; while (null != candidate) { if (candidate instanceof Element) { Optional<Boolean> scalable = isScalable((Element) candidate); if (scalable.isPresent()) { result = scalable.get(); break; } candidate = candidate.getParentNode(); } else { candidate = null; } } def.setScalable(result); } }
AbstractSVGPrimitiveTranslator implements SVGElementTranslator<E, O> { protected void translateTransformDefinition(final E element, final O def) { boolean result = true; Node candidate = element; while (null != candidate) { if (candidate instanceof Element) { Optional<Boolean> scalable = isScalable((Element) candidate); if (scalable.isPresent()) { result = scalable.get(); break; } candidate = candidate.getParentNode(); } else { candidate = null; } } def.setScalable(result); }  }
AbstractSVGPrimitiveTranslator implements SVGElementTranslator<E, O> { protected void translateTransformDefinition(final E element, final O def) { boolean result = true; Node candidate = element; while (null != candidate) { if (candidate instanceof Element) { Optional<Boolean> scalable = isScalable((Element) candidate); if (scalable.isPresent()) { result = scalable.get(); break; } candidate = candidate.getParentNode(); } else { candidate = null; } } def.setScalable(result); }  @Override O translate(final E element,
                       final SVGTranslatorContext context); }
AbstractSVGPrimitiveTranslator implements SVGElementTranslator<E, O> { protected void translateTransformDefinition(final E element, final O def) { boolean result = true; Node candidate = element; while (null != candidate) { if (candidate instanceof Element) { Optional<Boolean> scalable = isScalable((Element) candidate); if (scalable.isPresent()) { result = scalable.get(); break; } candidate = candidate.getParentNode(); } else { candidate = null; } } def.setScalable(result); }  @Override O translate(final E element,
                       final SVGTranslatorContext context);  }