📄 zcarviewupdatethread.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package zdrive.engines;import zdrive.protocols.*;import zdrive.panels.*;/** * * @author Mohamed Aly */public class ZCarViewUpdateThread extends Thread{ private String direction=""; private ZAbstractEvent abs_event; private ZCarView car_view; private int event; public ZCarViewUpdateThread(int event,ZAbstractEvent abs_event,ZCarView car_view){ this.abs_event = abs_event; this.car_view = car_view; this.event = event; } @Override public void run(){ if(event== ZEventConstants.EMERGENCY_VEHICLE_EVENT || event==ZEventConstants.MOTORCYCLE_EVENT){ car_view.setVisible(true); while(!abs_event.isCompleted()){ this.direction = abs_event.getDirection(); car_view.setDirection(this.direction); try{ sleep(1000); }catch(Exception e) { e.printStackTrace(); } } } car_view.setVisible(false); System.out.println("DONE WITH CAR VIEW THREAD"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -