public void setImage(AgregatorItem agregator) {
this.item = agregator;
calculateCanvasSize(agregator);
if (agregator != null){
lblTitle.setText(agregator.getName());
Paintable image = null;
if (agregator.getItemsType() == AgregatorItem.ItemsType.image && agregator.getImageModel().getImageCount() > 0) {
image = agregator.getImageModel().getImage(0);
} else if (agregator.getItemsType() == AgregatorItem.ItemsType.waveform) {
image = agregator.getWaveModel().getDrawer();