private void setRubberbandSelection(RubberbandSelector rubberband) {
if (rubberband.getSelectedElements().size() == 1) {
currentSelection = rubberband.getSelectedElements().get(0)
.getSelection(editor);
} else if (rubberband.getSelectedElements().size() > 1) {
currentSelection = new MultiSelection(editor,
rubberband.getSelectedElements());
} else {
currentSelection = editor.getDiagram().getSelection(editor);
}
}