()
| 1774 | |
| 1775 | /// {@inheritDoc} |
| 1776 | @Override |
| 1777 | public boolean animate() { |
| 1778 | boolean ani = super.animate(); |
| 1779 | |
| 1780 | // while native editing we don't need the cursor animations |
| 1781 | if (Display.getInstance().isNativeEditorVisible(this)) { |
| 1782 | return ani; |
| 1783 | } |
| 1784 | if (hasFocus() && isVisible()) { |
| 1785 | long currentTime = System.currentTimeMillis(); |
| 1786 | if (drawCursor) { |
| 1787 | if ((currentTime - cursorBlinkTime) > blinkOnTime) { |
| 1788 | cursorBlinkTime = currentTime; |
| 1789 | drawCursor = false; |
| 1790 | return true; |
| 1791 | } |
| 1792 | } else { |
| 1793 | if ((currentTime - cursorBlinkTime) > blinkOffTime) { |
| 1794 | cursorBlinkTime = currentTime; |
| 1795 | drawCursor = true; |
| 1796 | return true; |
| 1797 | } |
| 1798 | } |
| 1799 | if (pressedAndNotReleased) { |
| 1800 | if (currentTime - pressTime >= getLongClickDuration()) { |
| 1801 | pressedAndNotReleased = false; |
| 1802 | longClick(pressedKeyCode); |
| 1803 | } |
| 1804 | } else { |
| 1805 | if (pendingCommit && currentTime - releaseTime > commitTimeout) { |
| 1806 | commitChange(); |
| 1807 | } |
| 1808 | } |
| 1809 | } else { |
| 1810 | drawCursor = false; |
| 1811 | } |
| 1812 | return ani; |
| 1813 | } |
| 1814 | |
| 1815 | /// {@inheritDoc} |
| 1816 | @Override |
nothing calls this directly
no test coverage detected