/* * 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 GSliderPanel extends Panel { // this is used for conservation colours, PID colours and redundancy threshold protected Scrollbar slider = new Scrollbar(); protected TextField valueField = new TextField(); protected Label label = new Label(); Panel jPanel1 = new Panel(); Panel jPanel2 = new Panel(); protected Button applyButton = new Button(); protected Button undoButton = new Button(); FlowLayout flowLayout1 = new FlowLayout(); protected Checkbox allGroupsCheck = new Checkbox(); BorderLayout borderLayout1 = new BorderLayout(); BorderLayout borderLayout2 = new BorderLayout(); FlowLayout flowLayout2 = new FlowLayout(); public GSliderPanel() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { this.setLayout(borderLayout2); // slider.setMajorTickSpacing(10); // slider.setMinorTickSpacing(1); // slider.setPaintTicks(true); slider.setBackground(Color.white); slider.setFont(new java.awt.Font("Verdana", 0, 11)); slider.setOrientation(0); valueField.setFont(new java.awt.Font("Verdana", 0, 11)); valueField.setText(" "); valueField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { valueField_actionPerformed(e); } }); label.setFont(new java.awt.Font("Verdana", 0, 11)); label.setText("set this label text"); jPanel1.setLayout(borderLayout1); jPanel2.setLayout(flowLayout1); 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); } }); undoButton.setEnabled(false); undoButton.setFont(new java.awt.Font("Verdana", 0, 11)); undoButton.setLabel("Undo"); undoButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { undoButton_actionPerformed(e); } }); allGroupsCheck.setEnabled(false); allGroupsCheck.setFont(new java.awt.Font("Verdana", 0, 11)); allGroupsCheck.setLabel("Apply threshold to all groups"); allGroupsCheck.setName("Apply to all Groups"); allGroupsCheck.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(ItemEvent e) { allGroupsCheck_actionPerformed(); } }); this.setBackground(Color.white); this.setForeground(Color.black); jPanel2.add(label, null); jPanel2.add(applyButton, null); jPanel2.add(undoButton, null); jPanel2.add(allGroupsCheck); jPanel1.add(valueField, java.awt.BorderLayout.EAST); jPanel1.add(slider, java.awt.BorderLayout.CENTER); this.add(jPanel1, java.awt.BorderLayout.SOUTH); this.add(jPanel2, java.awt.BorderLayout.CENTER); } protected void valueField_actionPerformed(ActionEvent e) { } protected void applyButton_actionPerformed(ActionEvent e) { } protected void undoButton_actionPerformed(ActionEvent e) { } protected void allGroupsCheck_actionPerformed() { } }