* @param arg optional parameters (not used).
*/
@Override
public void update(Observable o, Object arg) {
if (o instanceof MailSaver) {
UIModel model = UIModel.INSTANCE;
int countMsg = model.getNbMessageReceived() + 1;
model.setNbMessageReceived(countMsg);
nbReceived.setText(Integer.toString(countMsg));
} else if (o instanceof ClearAllButton) {
UIModel.INSTANCE.setNbMessageReceived(0);
nbReceived.setText("0");
}