01: /*
02: * NewGroupAction.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.profiles;
13:
14: import java.awt.event.ActionEvent;
15: import workbench.gui.actions.WbAction;
16: import workbench.log.LogMgr;
17: import workbench.resource.ResourceMgr;
18:
19: /**
20: * @author support@sql-workbench.net
21: */
22: public class NewGroupAction extends WbAction {
23: private ProfileTree client;
24:
25: public NewGroupAction(ProfileTree panel) {
26: this .client = panel;
27: this .setIcon(ResourceMgr.getImage("NewFolder"));
28: this .initMenuDefinition("LblNewProfileGroup");
29: }
30:
31: public void executeAction(ActionEvent e) {
32: try {
33: this .client.addProfileGroup();
34: } catch (Exception ex) {
35: LogMgr.logError("NewListEntryAction.executeAction()",
36: "Error copying profile", ex);
37: }
38: }
39:
40: }
|