* Creates an editor for the specified diagram and adds it to the tabbed
* pane.
* @param diagram the diagram
*/
private void createEditor(UmlDiagram diagram) {
this.currentEditor = new DiagramEditor(diagram, elementFactory);
currentEditor.addEditorStateListener(this);
currentEditor.addSelectionListener(this);
JScrollPane spane = new JScrollPane(currentEditor);
JPanel editorPanel = new JPanel(new BorderLayout());
spane.getVerticalScrollBar().setUnitIncrement(10);