MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / animate

Method animate

CodenameOne/src/com/codename1/ui/Label.java:1150–1175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1148
1149 /// {@inheritDoc}
1150 @Override
1151 public boolean animate() {
1152 if (!isVisibleOnForm()) {
1153 return false;
1154 }
1155 boolean animateTicker = false;
1156 if (tickerRunning && tickerStartTime + tickerDelay < AnimationTime.now()) {
1157 tickerStartTime = AnimationTime.now();
1158 if (rightToLeft) {
1159 shiftText -= Display.getInstance().convertToPixels(shiftMillimeters);
1160 if (shiftText + getStringWidth(getStyle().getFont()) < 0) {
1161 shiftText = getStringWidth(getStyle().getFont());
1162 }
1163 } else {
1164 shiftText += Display.getInstance().convertToPixels(shiftMillimeters);
1165 if (getStringWidth(getStyle().getFont()) - shiftText < 0) {
1166 shiftText = -getStringWidth(getStyle().getFont());
1167 }
1168 }
1169 animateTicker = true;
1170 }
1171 // if we have an animated icon then just let it do its thing...
1172 boolean val = icon != null && icon.isAnimation() && icon.animate();
1173 boolean parent = super.animate();
1174 return val || parent || animateTicker;
1175 }
1176
1177 /// Returns the mask matching the given image
1178 ///

Callers 1

animateMethod · 0.95

Calls 9

nowMethod · 0.95
getInstanceMethod · 0.95
getStringWidthMethod · 0.95
isVisibleOnFormMethod · 0.80
convertToPixelsMethod · 0.65
getFontMethod · 0.65
getStyleMethod · 0.65
animateMethod · 0.65
isAnimationMethod · 0.45

Tested by

no test coverage detected