01: /*
02: * CollapseTreeAction.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: import workbench.gui.profiles.ProfileTree;
16: import workbench.resource.ResourceMgr;
17:
18: /**
19: * Action to collapse all nodes in the connection profile tree
20: * @see workbench.gui.profiles.ProfileTree#collapseAll()
21: * @author support@sql-workbench.net
22: */
23: public class CollapseTreeAction extends WbAction {
24: private ProfileTree client;
25:
26: public CollapseTreeAction(ProfileTree tree) {
27: super ();
28: this .client = tree;
29: this .initMenuDefinition("LblCollapseAll");
30: this .setIcon(ResourceMgr.getImage("collapse"));
31: }
32:
33: public void executeAction(ActionEvent e) {
34: this.client.collapseAll();
35: }
36: }
|