()
| 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 | /// |
no test coverage detected