01: package hero.client.grapheditor;
02:
03: /**
04: * WFToolBar2.java
05: *
06: *
07: * Created: Fri Aug 09 16:18:15 2002
08: *
09: * @version 1.0
10: */
11:
12: import java.awt.Insets;
13: import java.awt.event.ActionEvent;
14: import java.awt.event.ActionListener;
15: import java.awt.Color;
16:
17: import javax.swing.ImageIcon;
18: import javax.swing.JButton;
19:
20: public class WFToolBar2 extends javax.swing.JToolBar {
21:
22: static java.util.ResourceBundle resource = java.util.ResourceBundle
23: .getBundle("resources.Traduction")/*#BundleType=List*/;
24:
25: public WFToolBar2(final Frame frame, final WFManager manager) {
26:
27: super .setFloatable(true);
28: this .putClientProperty("JToolBar.isRollover", Boolean.TRUE);
29: this .setMargin(new Insets(0, 5, 0, 0));
30: this .setBackground(new Color(177, 177, 251));
31: JButton jb;
32:
33: ClassLoader cl = frame.getClass().getClassLoader();
34:
35: jb = new JButton(new ImageIcon(cl
36: .getResource("images/Active.gif")));
37: jb.setToolTipText(resource.getString("wftoolbar2.new"));
38: jb.setBackground(new Color(177, 177, 251));
39: jb.setEnabled(manager.getPersistence().hasPermission());
40: jb.setMargin(new Insets(0, 0, 0, 0));
41: jb.addActionListener(new ActionListener() {
42: public void actionPerformed(ActionEvent e) {
43: manager.addNode();
44: }
45: });
46:
47: super .add(jb);
48:
49: jb = new JButton(new ImageIcon(cl
50: .getResource("images/grey.gif")));
51: jb.setToolTipText(resource.getString("wftoolbar2.subproc"));
52: jb.setBackground(new Color(177, 177, 251));
53: jb.setEnabled(manager.getPersistence().hasPermission());
54: jb.setMargin(new Insets(0, 0, 0, 0));
55: jb.addActionListener(new ActionListener() {
56: public void actionPerformed(ActionEvent e) {
57: manager.addNodeSubProcess();
58: }
59: });
60:
61: super .add(jb);
62:
63: jb = new JButton(new ImageIcon(cl
64: .getResource("images/Transition.gif")));
65: jb.setBackground(new Color(177, 177, 251));
66: jb.setToolTipText(resource.getString("wftoolbar2.edge"));
67: jb.setMargin(new Insets(0, 0, 0, 0));
68: jb.setEnabled(manager.getPersistence().hasPermission());
69: jb.addActionListener(new ActionListener() {
70: public void actionPerformed(ActionEvent e) {
71: manager.addEdge();
72: }
73: });
74: super.add(jb);
75: }
76: }
|