01: /*
02: * ===================================================================
03: * Copyright (c) 2003-2004, Hewett Research, Inc.
04: *
05: * The author can be contacted via email at
06: * "hewett@hewettresearch.com"
07: *
08: * ===================================================================
09: *
10: * RunGCTask.java
11: *
12: * -------------------------------------------------------------------
13: * User: hewett
14: * Date: Dec 13, 2005
15: * Time: 8:55:55 PM
16: * -------------------------------------------------------------------
17: */
18:
19: package org.jatha.display.action;
20:
21: import org.jatha.Jatha;
22: import org.jatha.display.Listener;
23:
24: import javax.swing.*;
25: import java.awt.event.ActionEvent;
26:
27: /**
28: * RunGCTask executes the "gc-all" command.
29: */
30: public class RunGCTask extends ApplicationAction {
31: protected Listener f_listener = null;
32:
33: public RunGCTask(Jatha mainApp, Listener listener, String name,
34: Icon icon, String tooltip, KeyStroke acceleratorKey,
35: Integer mnemonic) {
36: super (mainApp, name, icon, tooltip, acceleratorKey, mnemonic);
37:
38: f_listener = listener;
39: }
40:
41: public void actionPerformed(ActionEvent e) {
42: f_listener.eval("(gc-full)");
43: }
44:
45: }
|