public void update(Observable o, Object arg) {
if (arg instanceof AUIEvent) {
AUIEvent event = (AUIEvent) arg;
switch (event.getType()) {
case DEF_CHANGE_VIEW: {
final UIEventChangeView bufEvent = (UIEventChangeView) event;
if(SwingUtilities.isEventDispatchThread()) {
synchronized (theMutexObject) {
updateView(bufEvent.getView());
}
} else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
synchronized (theMutexObject) {
updateView(bufEvent.getView());
}
}
});
}
break;