X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGUserDefinedColours.java;h=49174a0ea3b92e811a6e9ffbbd26d33d7139e4ff;hb=b8d09897dacc7b0ad203982b4578e2c1d8929142;hp=dc4f2910999f1d5b1de25bf698c4bb776550c2c8;hpb=55a9db3a3585bc57fe57444f904359efa049d674;p=jalview.git diff --git a/src/jalview/jbgui/GUserDefinedColours.java b/src/jalview/jbgui/GUserDefinedColours.java index dc4f291..49174a0 100755 --- a/src/jalview/jbgui/GUserDefinedColours.java +++ b/src/jalview/jbgui/GUserDefinedColours.java @@ -1,121 +1,174 @@ +/* +* 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 javax.swing.*; import java.awt.*; import java.awt.event.*; +import javax.swing.*; + +/** + * DOCUMENT ME! + * + * @author $author$ + * @version $Revision$ + */ 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(); + 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 + /** + * Creates a new GUserDefinedColours object. + */ + public GUserDefinedColours() { - jbInit(); + try + { + jbInit(); + } + catch (Exception e) + { + e.printStackTrace(); + } } - catch(Exception e) + + /** + * DOCUMENT ME! + * + * @throws Exception DOCUMENT ME! + */ + private void jbInit() throws Exception { - e.printStackTrace(); + 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); } - } - 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) - { - - } + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void okButton_actionPerformed(ActionEvent e) + { + } - protected void savebutton_actionPerformed(ActionEvent e) - { + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void applyButton_actionPerformed(ActionEvent e) + { + } - } + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void loadbutton_actionPerformed(ActionEvent e) + { + } - protected void cancelButton_actionPerformed(ActionEvent e) - { + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void savebutton_actionPerformed(ActionEvent e) + { + } - } + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void cancelButton_actionPerformed(ActionEvent e) + { + } }