/* * Jalview - A Sequence Alignment Editor and Viewer * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package jalview.jbgui; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class GUserDefinedColours extends JPanel { protected JColorChooser colorChooser = new JColorChooser(); protected JPanel buttonPanel = new JPanel(); protected GridLayout gridLayout = new GridLayout(); JPanel jPanel2 = new JPanel(); protected JButton okButton = new JButton(); protected JButton applyButton = new JButton(); protected JButton loadbutton = new JButton(); protected JButton savebutton = new JButton(); protected JButton cancelButton = new JButton(); FlowLayout flowLayout1 = new FlowLayout(); public GUserDefinedColours() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { this.setLayout(flowLayout1); buttonPanel.setLayout(gridLayout); gridLayout.setColumns(6); gridLayout.setRows(4); okButton.setFont(new java.awt.Font("Verdana", 0, 11)); okButton.setText("OK"); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { okButton_actionPerformed(e); } }); applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); applyButton.setText("Apply"); applyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { applyButton_actionPerformed(e); } }); loadbutton.setFont(new java.awt.Font("Verdana", 0, 11)); loadbutton.setText("Load scheme"); loadbutton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { loadbutton_actionPerformed(e); } }); savebutton.setFont(new java.awt.Font("Verdana", 0, 11)); savebutton.setText("Save scheme"); savebutton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { savebutton_actionPerformed(e); } }); cancelButton.setFont(new java.awt.Font("Verdana", 0, 11)); cancelButton.setText("Cancel"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { cancelButton_actionPerformed(e); } }); this.setBackground(new Color(212, 208, 223)); jPanel2.setOpaque(false); colorChooser.setOpaque(false); this.add(colorChooser, null); this.add(buttonPanel, null); this.add(jPanel2, null); jPanel2.add(okButton, null); jPanel2.add(applyButton, null); jPanel2.add(loadbutton, null); jPanel2.add(savebutton, null); jPanel2.add(cancelButton, null); } protected void okButton_actionPerformed(ActionEvent e) { } protected void applyButton_actionPerformed(ActionEvent e) { } protected void loadbutton_actionPerformed(ActionEvent e) { } protected void savebutton_actionPerformed(ActionEvent e) { } protected void cancelButton_actionPerformed(ActionEvent e) { } }