@Override
	public void update(Observable o, Object arg) {
		if(arg != null && arg instanceof TagCloudModel){
			TagCloudModel model = (TagCloudModel)arg;
			this.map = model.getTagsOccurrence();
			
			removeAll();
			
			for(Map.Entry<String, Integer> entry : this.map.entrySet()){
				TagComponent tag = new TagComponent(entry.getKey());
				tag.addMouseListener(this.tagComponentMouseListener);
				tag.setFont(this.baseFont.deriveFont(getFontSize(entry.getValue())));
				add(tag);
			}
			
			revalidate();
			
			//Reset everything for the next update.
			this.reset();
		}
	}