void (final int frame, final int totalFrames, final int cycle) { if (component == null || component.getParent() == null || !isAnimationEnabled()) return; component.setAlpha((float)frame / totalFrames); }