if (!editorDialog.editingElements()) {
if (editorDialog.getElementType() == Line.class) {
return new Line
(start, last, editorDialog.getElementColor());
} else if (editorDialog.getElementType() == Rectangle.class) {
return new Rectangle
(start, last, editorDialog.getElementColor());
} else if (editorDialog.getElementType() == Circle.class) {
return new Circle
(start, last, editorDialog.getElementColor());
}