001 /** 002 * File: Toolbar.java 003 * Author: Bryan Parno 004 * Email: parno@fas.harvard.edu 005 * Created: 4/3/03 006 * Purpose: Encapsulates the toolbar for the HyperGui 007 */ 008 package edu.harvard.deas.hyperenc.gui; 009 010 import java.awt.GridLayout; 011 import java.awt.event.ActionListener; 012 013 import javax.swing.JButton; 014 import javax.swing.JPanel; 015 016 public class Toolbar extends JPanel 017 { 018 private static final long serialVersionUID = 1L; 019 020 public Toolbar(ActionListener al) { 021 super(new GridLayout(1, 8)); 022 023 setSize(850, 50); 024 JButton b = new JButton("New"); 025 b.addActionListener(al); 026 add(b); 027 028 b = new JButton("Reply"); 029 b.addActionListener(al); 030 add(b); 031 032 b = new JButton("Forward"); 033 b.addActionListener(al); 034 add(b); 035 036 b = new JButton("Mark Read"); 037 b.addActionListener(al); 038 add(b); 039 040 b = new JButton("Mark Unread"); 041 b.addActionListener(al); 042 add(b); 043 044 b = new JButton("Delete"); 045 b.addActionListener(al); 046 add(b); 047 048 b = new JButton("Get Mail"); 049 b.addActionListener(al); 050 add(b); 051 052 b = new JButton("Decrypt"); 053 b.addActionListener(al); 054 add(b); 055 } 056 057 }