本文整理匯總了Java中org.eclipse.swt.SWT.getVersion方法的典型用法代碼示例。如果您正苦於以下問題:Java SWT.getVersion方法的具體用法?Java SWT.getVersion怎麽用?Java SWT.getVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.SWT
的用法示例。
在下文中一共展示了SWT.getVersion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: SWTVersionGetter
import org.eclipse.swt.SWT; //導入方法依賴的package包/類
public
SWTVersionGetter(
UpdateChecker _checker )
{
this.platform = SWT.getPlatform();
this.currentVersion = SWT.getVersion();
this.latestVersion = 0;
checker = _checker;
}
示例2: performAutoCheck
import org.eclipse.swt.SWT; //導入方法依賴的package包/類
protected void performAutoCheck(final boolean start_of_day) {
boolean check_at_start = false;
boolean check_periodic = false;
boolean bOldSWT = SWT.getVersion() < 3139;
// no update checks for java web start
if (!SystemProperties.isJavaWebStartInstance()) {
// force check when SWT is really old
check_at_start = COConfigurationManager.getBooleanParameter("update.start")
|| bOldSWT;
check_periodic = COConfigurationManager.getBooleanParameter("update.periodic");
}
// periodic -> check at start as well
check_at_start = check_at_start || check_periodic;
if ((check_at_start && start_of_day) || (check_periodic && !start_of_day)) {
performCheck(bOldSWT, true, false, null ); // this will implicitly do usage stats
} else {
new DelayedEvent("UpdateMon:wait2", 5000, new AERunnable() {
@Override
public void runSupport() {
if (start_of_day) {
UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
if (uiFunctions != null) {
uiFunctions.setStatusText("");
}
}
CoreUpdateChecker.doUsageStats();
}
});
}
}