當前位置: 首頁>>代碼示例>>Java>>正文


Java DisplayThreadExecutor類代碼示例

本文整理匯總了Java中it.albertus.jface.DisplayThreadExecutor的典型用法代碼示例。如果您正苦於以下問題:Java DisplayThreadExecutor類的具體用法?Java DisplayThreadExecutor怎麽用?Java DisplayThreadExecutor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DisplayThreadExecutor類屬於it.albertus.jface包,在下文中一共展示了DisplayThreadExecutor類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: print

import it.albertus.jface.DisplayThreadExecutor; //導入依賴的package包/類
protected void print(final String value) {
	// Dealing with null argument...
	final String toPrint;
	if (value == null) {
		toPrint = String.valueOf(value);
	}
	else {
		toPrint = value;
	}

	final int capacity = getLimit();

	// Actual print... (async avoids deadlocks)
	new DisplayThreadExecutor(scrollable, true) {
		@Override
		protected void onError(final Exception exception) {
			failSafePrint(toPrint);
		}
	}.execute(new Runnable() {
		@Override
		public void run() {
			doPrint(toPrint, capacity);
		}
	});
}
 
開發者ID:Albertus82,項目名稱:JFaceUtils,代碼行數:26,代碼來源:ScrollableConsole.java

示例2: restart

import it.albertus.jface.DisplayThreadExecutor; //導入依賴的package包/類
@Override
public void restart() {
	disconnect(true);
	new Thread(new Runnable() {
		@Override
		public void run() {
			try {
				httpServer.stop();
				scheduleShutdown(-1);
				joinPollingThread();
				configuration.reload();
				mqttClient.disconnect();
				setIteration(FIRST_ITERATION);
				new DisplayThreadExecutor(shell).execute(new Runnable() {
					@Override
					public void run() {
						if (!logger.isLoggable(Level.FINE)) {
							console.clear();
						}
						dataTable.reset();
						beforeConnect();
						connect();
					}
				});
			}
			catch (final Exception e) {
				logger.log(Level.SEVERE, e.toString(), e);
			}
		}
	}, "resetThread").start();

}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:33,代碼來源:RouterLoggerGui.java

示例3: close

import it.albertus.jface.DisplayThreadExecutor; //導入依賴的package包/類
@Override
public void close() {
	new DisplayThreadExecutor(shell).execute(new Runnable() {
		@Override
		public void run() {
			shell.dispose();
		}
	});
}
 
開發者ID:Albertus82,項目名稱:RouterLogger,代碼行數:10,代碼來源:RouterLoggerGui.java


注:本文中的it.albertus.jface.DisplayThreadExecutor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。