01: /*
02: * DeleteDependentRowsAction.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.actions;
13:
14: import java.awt.event.ActionEvent;
15:
16: import workbench.interfaces.DbData;
17: import workbench.resource.ResourceMgr;
18:
19: /**
20: * Delete the currently highlighted row(s) from a table
21: * @see workbench.interfaces.DbData
22: * @see workbench.gui.sql.DwPanel
23: * @author support@sql-workbench.net
24: */
25: public class DeleteDependentRowsAction extends WbAction {
26: private DbData client;
27:
28: public DeleteDependentRowsAction(DbData aClient) {
29: super ();
30: this .client = aClient;
31: this .setEnabled(false);
32: this .initMenuDefinition("MnuTxtDelDependentRows");
33: this .setMenuItemName(ResourceMgr.MNU_TXT_DATA);
34: }
35:
36: public void executeAction(ActionEvent e) {
37: this .client.deleteRowWithDependencies();
38: }
39:
40: public void setClient(DbData db) {
41: this.client = db;
42: }
43: }
|