01: package org.osbl.client.wings;
02:
03: import org.wings.SButton;
04: import org.osbl.client.wings.shell.Client;
05:
06: import javax.swing.*;
07: import java.awt.event.ActionEvent;
08:
09: /**
10: * XHelpButton
11: * <p/>
12: */
13: public class XHelpButton extends SButton {
14:
15: /**
16: * Help button for individual help tabs shown when button was pressed.
17: *
18: * @param key The key of the help topic to display on the left
19: * Each help tab will display a {@link org.osbl.client.wings.shell.ContextHelpTool}.
20: * For details about what the key must look like
21: * @see org.osbl.client.wings.shell.ContextHelpTool
22: * @see Client#showDetailHelp(String)
23: */
24: public XHelpButton(final String key) {
25: setAction(new AbstractAction("?") {
26: public void actionPerformed(ActionEvent e) {
27: Client.getInstance().showDetailHelp(key);
28: }
29: });
30: }
31: }
|