Methods Summary |
---|
public void | addUpdater(UIUpdatable updateable)
updateables_mon.enter();
try {
if (!updateables.contains(updateable)) {
updateables.add(updateable);
}
} finally {
updateables_mon.exit();
}
|
public void | parameterChanged(java.lang.String parameterName)
iWaitTime = COConfigurationManager.getIntParameter(CFG_REFRESH_INTERVAL);
|
public void | removeUpdater(UIUpdatable updateable)
updateables_mon.enter();
try {
updateables.remove(updateable);
} finally {
updateables_mon.exit();
}
|
public void | runSupport()
while (!finished) {
if (refreshed) {
refreshed = false;
if (!Utils.execSWTThread(new AERunnable() {
public void runSupport() {
try {
update();
} catch (Exception e) {
Logger.log(new LogEvent(LOGID,
"Error while trying to update GUI", e));
}
refreshed = true;
}
})) {
refreshed = true;
}
}
try {
Thread.sleep(iWaitTime);
} catch (Exception e) {
Debug.printStackTrace(e);
}
}
|
public void | stopIt()
finished = true;
COConfigurationManager.removeParameterListener(CFG_REFRESH_INTERVAL, this);
|
private void | update()
Object[] updateablesArray = updateables.toArray();
for (int i = 0; i < updateablesArray.length; i++) {
if (!(updateablesArray[i] instanceof UIUpdatable)) {
continue;
}
if (SWTThread.getInstance().getDisplay().isDisposed()) {
return;
}
UIUpdatable updateable = (UIUpdatable) updateablesArray[i];
try {
updateable.updateUI();
} catch (Exception e) {
Logger.log(new LogEvent(LOGID, "Error while trying to update GUI "
+ updateable.getUpdateUIName(), e));
}
}
|