📄 abstractcommunicationthread.java
字号:
/*
* @(#)AbstractCommunicationThread.java 1.00 2005-9-9
*
* Copyright 2005 BeanSoft Studio. All rights reserved.
* PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package studio.beansoft.remotecontrol.client;
import studio.beansoft.remotecontrol.MonitorPane;
/**
*
* AbstractCommunicationThread, an abstract communication class, it's a
* thread.
*
* Chinese documents:
* 抽象的通信类, 是一个线程.
*
* @author BeanSoft
* @version 1.00 2005-9-9
*/
public abstract class AbstractCommunicationThread extends Thread {
/** Whether thread is paused */
protected boolean paused = true;
/** Monitor pane */
protected MonitorPane pane = null;
/**
* Sleep for some time.
* @param ms milli-seconds
*/
protected void sleepTime(long ms) {
try {
Thread.currentThread().sleep(ms);
} catch(InterruptedException ite) {
ite.printStackTrace();
}
}
/**
* @param pane
* The MonitorPane to set.
*/
public void setPane(MonitorPane pane) {
this.pane = pane;
}
/**
* @return returns MonitorPane.
*/
public MonitorPane getPane() {
return pane;
}
/**
* @return returns whether thread is paused.
*/
public boolean isPaused() {
return paused;
}
/**
* @param paused The paused value to set.
*/
public void setPaused(boolean paused) {
this.paused = paused;
}
/**
* Subclass must override this method to provide communication operations.
*/
public abstract void run();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -