/* * 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.jbappletgui; import java.awt.*; import java.awt.event.*; public class GUserDefinedColours extends Panel { protected Panel buttonPanel = new Panel(); protected GridLayout gridLayout = new GridLayout(); Panel jPanel2 = new Panel(); protected Button okButton = new Button(); protected Button applyButton = new Button(); protected Button cancelButton = new Button(); protected Scrollbar rScroller = new Scrollbar(); Label label1 = new Label(); Panel panel2 = new Panel(); BorderLayout borderLayout1 = new BorderLayout(); protected TextField rText = new TextField(); Panel panel3 = new Panel(); Label label4 = new Label(); protected Scrollbar gScroller = new Scrollbar(); protected TextField gText = new TextField(); BorderLayout borderLayout2 = new BorderLayout(); Panel panel4 = new Panel(); Label label5 = new Label(); protected Scrollbar bScroller = new Scrollbar(); protected TextField bText = new TextField(); BorderLayout borderLayout3 = new BorderLayout(); protected Panel target = new Panel(); public GUserDefinedColours() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { this.setLayout(null); buttonPanel.setLayout(gridLayout); gridLayout.setColumns(6); gridLayout.setRows(4); okButton.setFont(new java.awt.Font("Verdana", 0, 11)); okButton.setLabel("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.setLabel("Apply"); applyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { applyButton_actionPerformed(e); } }); cancelButton.setFont(new java.awt.Font("Verdana", 0, 11)); cancelButton.setLabel("Cancel"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { cancelButton_actionPerformed(e); } }); this.setBackground(new Color(212, 208, 223)); jPanel2.setBounds(new Rectangle(0, 265, 400, 35)); buttonPanel.setBounds(new Rectangle(0, 123, 400, 142)); rScroller.setMaximum(255); rScroller.setMinimum(0); rScroller.setOrientation(0); rScroller.setUnitIncrement(1); rScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { rScroller_adjustmentValueChanged(e); } }); label1.setText("R"); panel2.setBounds(new Rectangle(20, 29, 180, 19)); panel2.setLayout(borderLayout1); rText.setText(" 0"); rText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { rText_actionPerformed(e); } }); panel3.setLayout(borderLayout2); label4.setText("G"); gScroller.setMaximum(255); gScroller.setMinimum(0); gScroller.setOrientation(0); gScroller.setUnitIncrement(1); gScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { gScroller_adjustmentValueChanged(e); } }); gText.setText(" 0"); gText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { gText_actionPerformed(e); } }); panel3.setBounds(new Rectangle(19, 54, 181, 20)); panel4.setLayout(borderLayout3); label5.setText("B"); bScroller.setMaximum(255); bScroller.setMinimum(0); bScroller.setOrientation(0); bScroller.setUnitIncrement(1); bScroller.addAdjustmentListener(new java.awt.event.AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { bScroller_adjustmentValueChanged(e); } }); bText.setSelectionStart(6); bText.setText(" 0"); bText.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { bText_actionPerformed(e); } }); panel4.setBounds(new Rectangle(19, 87, 180, 20)); target.setBackground(Color.black); target.setBounds(new Rectangle(229, 26, 134, 79)); this.add(jPanel2, null); jPanel2.add(okButton, null); jPanel2.add(applyButton, null); jPanel2.add(cancelButton, null); this.add(buttonPanel, null); panel2.add(label1, BorderLayout.WEST); panel2.add(rScroller, BorderLayout.CENTER); panel2.add(rText, BorderLayout.EAST); this.add(target, null); this.add(panel4, null); panel3.add(label4, BorderLayout.WEST); panel3.add(gScroller, BorderLayout.CENTER); panel3.add(gText, BorderLayout.EAST); this.add(panel2, null); panel4.add(label5, BorderLayout.WEST); panel4.add(bScroller, BorderLayout.CENTER); panel4.add(bText, BorderLayout.EAST); this.add(panel3, null); } protected void okButton_actionPerformed(ActionEvent e) { } protected void applyButton_actionPerformed(ActionEvent e) { } protected void cancelButton_actionPerformed(ActionEvent e) { } protected void rScroller_adjustmentValueChanged(AdjustmentEvent e) { } protected void gScroller_adjustmentValueChanged(AdjustmentEvent e) { } protected void bScroller_adjustmentValueChanged(AdjustmentEvent e) { } protected void rText_actionPerformed(ActionEvent e) { } protected void gText_actionPerformed(ActionEvent e) { } protected void bText_actionPerformed(ActionEvent e) { } }