1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 package org.xmlcv.gui;
28
29 import javax.swing.JButton;
30 import javax.swing.JToolBar;
31 import javax.swing.SwingConstants;
32 import javax.swing.border.BevelBorder;
33 import javax.swing.border.SoftBevelBorder;
34
35 import org.xmlcv.gui.action.ActionNewCV;
36 import org.xmlcv.gui.action.ActionOpenCV;
37 import org.xmlcv.gui.action.ActionOutHTML;
38 import org.xmlcv.gui.action.ActionOutPDF;
39 import org.xmlcv.gui.action.ActionOutRTF;
40 import org.xmlcv.gui.action.ActionPreview;
41
42 /***
43 * Toolbar of XMLCV window
44 *
45 * @version $Revision: 114 $
46 * @author <a href="mailto:drazzib@drazzib.com">Damien Raude-Morvan </a>
47 */
48 public class Toolbar extends JToolBar {
49
50 private JButton _newcvButton, _opencvButton, _outrtfButton, _outpdfButton,
51 _outhtmlButton, _previewButton;
52
53 /***
54 * @param parent
55 */
56 public Toolbar(Frame parent) {
57 super();
58
59
60 this.setRollover(true);
61 this.setFloatable(false);
62 this.setBorder(new SoftBevelBorder(BevelBorder.RAISED));
63 this.setOrientation(SwingConstants.HORIZONTAL);
64
65
66
67
68 this._newcvButton = new JButton(ActionNewCV.instance(parent));
69 this._opencvButton = new JButton(ActionOpenCV.instance(parent));
70 this._outrtfButton = new JButton(ActionOutRTF.instance(parent));
71 this._outpdfButton = new JButton(ActionOutPDF.instance(parent));
72 this._outhtmlButton = new JButton(ActionOutHTML.instance(parent));
73 this._previewButton = new JButton(ActionPreview.instance(parent));
74
75
76 this.add(this._newcvButton);
77 this.add(this._opencvButton);
78 this.addSeparator();
79 this.add(this._previewButton);
80 this.addSeparator();
81 this.add(this._outrtfButton);
82 this.add(this._outpdfButton);
83 this.add(this._outhtmlButton);
84
85 }
86
87 }