1 package com.bonevich.erj.ui;
2
3 import com.bonevich.erj.model.Relation;
4 import com.bonevich.erj.diagram.ERDiagramGraphModel;
5
6 import org.tigris.gef.base.*;
7
8 import java.util.Hashtable;
9
10 /*** Cmd to delete a <code>Relation</code> from the model.
11 */
12 public final class CmdDeleteRelation extends Cmd
13 {
14 private static final String DELETE_STR = "Delete this Relation";
15 //////////////////////////////////////////////////////////
16 // Constructors
17 public CmdDeleteRelation(Relation relation)
18 {
19 super(new Hashtable(), DELETE_STR, false);
20 setArg("relation", relation);
21 }
22
23 public void doIt()
24 {
25 Editor ce = Globals.curEditor();
26 ERDiagramGraphModel gm = (ERDiagramGraphModel)ce.getGraphModel();
27 gm.removeNode(getArg("relation"));
28 }
29
30 public void undoIt() { }
31
32 } /* end class CmdDeleteRelation */
33
This page was automatically generated by Maven