01: /*
02: * Copyright (c) 2005 Your Corporation. All Rights Reserved.
03: */
04: package jsp;
05:
06: import org.wings.SToolBar;
07: import org.wings.SButton;
08: import org.wings.SIcon;
09: import org.wings.SURLIcon;
10:
11: import javax.swing.*;
12: import java.awt.event.ActionEvent;
13:
14: /**
15: * @author hengels
16: */
17: public class DocumentTools extends SToolBar {
18: public DocumentTools() {
19: add(new SButton(new Tool("cancel", "Cancel", new SURLIcon(
20: "../icons/cancel.png"))));
21: add(new SButton(new Tool("revert", "Revert to Saved.",
22: new SURLIcon("../icons/revert.png"))));
23: add(new SButton(new Tool("save", "Save", new SURLIcon(
24: "../icons/save.png"))));
25: add(new SButton(new Tool("finish", "Save and Finish",
26: new SURLIcon("../icons/finish.png"))));
27: add(new SButton(new Tool("delegate", "Delegate To",
28: new SURLIcon("../icons/delegate.png"))));
29: add(new SButton(new Tool("escalate", "Escalate", new SURLIcon(
30: "../icons/escalate.png"))));
31: add(new SButton(new Tool("mail", "Mail Document", new SURLIcon(
32: "../icons/mail.png"))));
33: add(new SButton(new Tool("print", "Print Document",
34: new SURLIcon("../icons/print.png"))));
35: }
36:
37: class Tool extends AbstractAction {
38: public Tool(String name, String toolTip, SIcon icon) {
39: putValue(AbstractAction.ACTION_COMMAND_KEY, name);
40: if (icon == null)
41: putValue(AbstractAction.NAME, toolTip);
42: putValue(AbstractAction.SHORT_DESCRIPTION, toolTip);
43: putValue(AbstractAction.SMALL_ICON, icon);
44: }
45:
46: public void actionPerformed(ActionEvent e) {
47: }
48: }
49: }
|