@Test public void testHide() { decorator.build(primitive, 6.0, 0.6); doReturn(animationHandle).when((Node) rectangle).animate(anyObject(), anyObject(), anyDouble(), anyObject()); decorator.resetTimer(timer); when(timer.isRunning()).thenReturn(true); decorator.hide(); verify(rectangle, never()).animate(anyObject(), anyObject(), anyDouble(), anyObject()); when(timer.isRunning()).thenReturn(false); decorator.hide(); verify(decorator).createHideAnimationCallback(); verify(rectangle).animate(anyObject(), anyObject(), anyDouble(), anyObject()); }
public Decorator hide() { if (!timer.isRunning()) { decorator.animate(AnimationTweener.LINEAR, AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(0)), ANIMATION_DURATION, createHideAnimationCallback()); } return this; }
Decorator extends Group { public Decorator hide() { if (!timer.isRunning()) { decorator.animate(AnimationTweener.LINEAR, AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(0)), ANIMATION_DURATION, createHideAnimationCallback()); } return this; } }
Decorator extends Group { public Decorator hide() { if (!timer.isRunning()) { decorator.animate(AnimationTweener.LINEAR, AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(0)), ANIMATION_DURATION, createHideAnimationCallback()); } return this; } Decorator(final ItemCallback callback); }
Decorator extends Group { public Decorator hide() { if (!timer.isRunning()) { decorator.animate(AnimationTweener.LINEAR, AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(0)), ANIMATION_DURATION, createHideAnimationCallback()); } return this; } Decorator(final ItemCallback callback); Decorator setPadding(final double padding); Decorator setItemCallback(final ItemCallback callback); IPrimitive<?> build(final IPrimitive<?> item,
                               final double width,
                               final double height); Rectangle createRectangle(final double width,
                                     final double height); Decorator show(final double x,
                          final double y); Decorator hide(); }
Decorator extends Group { public Decorator hide() { if (!timer.isRunning()) { decorator.animate(AnimationTweener.LINEAR, AnimationProperties.toPropertyList(AnimationProperty.Properties.STROKE_ALPHA(0)), ANIMATION_DURATION, createHideAnimationCallback()); } return this; } Decorator(final ItemCallback callback); Decorator setPadding(final double padding); Decorator setItemCallback(final ItemCallback callback); IPrimitive<?> build(final IPrimitive<?> item,
                               final double width,
                               final double height); Rectangle createRectangle(final double width,
                                     final double height); Decorator show(final double x,
                          final double y); Decorator hide();  }