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