public void mousePressed(EditorMouseEvent event) {
UmlPackage pkg = (UmlPackage)
modelElementFactory.create(ElementType.PACKAGE);
PackageElement pkgElem = new PackageElement(pkg);
pkg.setName("Package 1");
CompositeElement parent = editor.getDiagram();
pkgElem.setOrigin(parent.getMappedX(event.getX()), parent.getMappedY(
event.getY()));
CreateElementCommand createCommand = new CreateElementCommand(editor,
editor.getDiagram(), pkgElem);
editor.execute(createCommand);
}