1 package com.bonevich.erj.ui;
2
3 import com.bonevich.erj.model.ForeignKey;
4 import com.bonevich.erj.diagram.ERDiagramGraphModel;
5
6 import org.tigris.gef.base.Cmd;
7 import org.tigris.gef.base.Globals;
8 import org.tigris.gef.base.Editor;
9
10 import java.util.Hashtable;
11
12 /*** Cmd to edit the properties of a <code>Relation</code>. The loaded
13 * editor is displayed in a tabbed dialog.
14 *
15 * @see CmdProperties */
16 public final class CmdDeleteForeignKey extends Cmd
17 {
18 private static final String DELETE_STR = "Delete this Foreign Key";
19 //////////////////////////////////////////////////////////
20 // Constructors
21 public CmdDeleteForeignKey(ForeignKey key)
22 {
23 super(new Hashtable(), DELETE_STR, false);
24 setArg("foreignKey", key);
25 }
26
27 public void doIt()
28 {
29 Editor ce = Globals.curEditor();
30 ERDiagramGraphModel gm = (ERDiagramGraphModel)ce.getGraphModel();
31 gm.removeEdge(getArg("foreignKey"));
32 }
33
34 public void undoIt() { }
35
36 } /* end class CmdEditForeignKey */
37
This page was automatically generated by Maven