01: /*
02: * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.instance.common.listener;
07:
08: //
09:
10: import com.sun.portal.config.context.DebugContext;
11:
12: import java.awt.event.ActionEvent;
13: import java.awt.event.ActionListener;
14:
15: //
16:
17: public class ButtonListener implements ActionListener {
18: //
19: protected ButtonClickHandler handler = null;
20:
21: public ButtonListener(ButtonClickHandler handler) {
22: this .handler = handler;
23: }
24:
25: //
26: //
27: //
28: public void actionPerformed(ActionEvent e) {
29: String action = e.getActionCommand();
30: DebugContext.message("Clicked button <" + action + ">");
31:
32: handler.handleButtonClick(action);
33: }
34:
35: //
36: //
37: //
38: }
|