01: /*
02: * Lucane - a collaborative platform
03: * Copyright (C) 2004 Vincent Fiack <vfiack@mail15.com>
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19: package org.lucane.applications.jmailadmin.gui;
20:
21: import java.awt.*;
22: import javax.swing.*;
23:
24: import org.lucane.applications.jmailadmin.JMailAdminPlugin;
25: import org.lucane.client.Client;
26:
27: public class ButtonPanel extends JPanel {
28: private JButton btnCopy;
29: private JButton btnPaste;
30: private JButton btnSave;
31: private JButton btnClose;
32:
33: public ButtonPanel(JMailAdminPlugin plugin, MainFrame listener) {
34: super (new BorderLayout());
35:
36: btnCopy = new JButton(plugin.tr("btn.copy"), Client
37: .getImageIcon("copy.png"));
38: btnPaste = new JButton(plugin.tr("btn.paste"), Client
39: .getImageIcon("paste.png"));
40: btnSave = new JButton(plugin.tr("btn.save"), Client
41: .getImageIcon("ok.png"));
42: btnClose = new JButton(plugin.tr("btn.close"), Client
43: .getImageIcon("cancel.png"));
44: btnCopy.addActionListener(listener);
45: btnPaste.addActionListener(listener);
46: btnSave.addActionListener(listener);
47: btnClose.addActionListener(listener);
48:
49: JPanel container = new JPanel(new GridLayout(1, 2));
50: container.add(btnCopy);
51: container.add(btnPaste);
52: this .add(container, BorderLayout.WEST);
53:
54: container = new JPanel(new GridLayout(1, 2));
55: container.add(btnSave);
56: container.add(btnClose);
57: this.add(container, BorderLayout.EAST);
58: }
59: }
|