while (true) { if (current != null && current instanceof Screen) { Ticker ticker = ((Screen) current).getTicker(); if (ticker != null) { synchronized (ticker) { if (ticker.resetTextPosTo != -1) { ticker.textPos = ticker.resetTextPosTo; ticker.resetTextPosTo = -1; } ticker.textPos -= Ticker.PAINT_MOVE; } repaint(); } } try { Thread.sleep(Ticker.PAINT_TIMEOUT); } catch (InterruptedException ex) {} }
while (true) { if (currentDisplay.current != null && currentDisplay.current instanceof Screen) { Ticker ticker = ((Screen) currentDisplay.current).getTicker(); if (ticker != null) { synchronized (ticker) { if (ticker.resetTextPosTo != -1) { ticker.textPos = ticker.resetTextPosTo; ticker.resetTextPosTo = -1; } ticker.textPos -= Ticker.PAINT_MOVE; } currentDisplay.repaint(); } } try { Thread.sleep(Ticker.PAINT_TIMEOUT); } catch (InterruptedException ex) { } }
    public void run()		{      while (true) {        if (current != null && current instanceof Screen) {          Ticker ticker = ((Screen) current).getTicker();          if (ticker != null) {            synchronized (ticker) {              if (ticker.resetTextPosTo != -1) {                ticker.textPos = ticker.resetTextPosTo;                ticker.resetTextPosTo = -1;              }              ticker.textPos -= Ticker.PAINT_MOVE;            }            repaint();                  }        }    		try {    			Thread.sleep(Ticker.PAINT_TIMEOUT);    		} catch (InterruptedException ex) {}      }		}