this.clearSelection();
SelectionModel model = (SelectionModel) o;
if (!model.isSelectionEmpty()) {
Iterator<SelectionItem> itemsIt = model.getCurrentSegments().iterator();
while (itemsIt.hasNext()) {
SelectionItem selectItem = itemsIt.next();
if (selectItem.isSelected()) {
this.components.get(selectItem.getIndexSegement()).selectPlot();
}
}
}
} else {
SelectionItem selectItem = (SelectionItem) arg;
if (this.components.get(selectItem.getIndexSegement()) != null) {
if (selectItem.isSelected()) {
if (!this.components.get(selectItem.getIndexSegement()).isSelected()) {
this.components.get(selectItem.getIndexSegement()).selectPlot();
}
} else {
if (this.components.get(selectItem.getIndexSegement()).isSelected()) {
this.components.get(selectItem.getIndexSegement()).unselectPlot();
}
}
}
}
}