Remove redundancy implemented
[jalview.git] / src / jalview / jbgui / GSliderPanel.java
1 package jalview.jbgui;
2
3 import java.awt.*;
4 import javax.swing.*;
5 import java.awt.event.*;
6
7 public class GSliderPanel extends JPanel
8 {
9   // this is used for conservation colours, PID colours and redundancy threshold
10   protected JSlider slider = new JSlider();
11   protected JTextField valueField = new JTextField();
12   protected JLabel label = new JLabel();
13   JPanel jPanel1 = new JPanel();
14   BorderLayout borderLayout1 = new BorderLayout();
15   GridLayout gridLayout1 = new GridLayout();
16   JPanel jPanel2 = new JPanel();
17   protected JButton applyButton = new JButton();
18   protected JButton undoButton = new JButton();
19   FlowLayout flowLayout1 = new FlowLayout();
20
21   public GSliderPanel()
22   {
23     try
24     {
25       jbInit();
26     }
27     catch(Exception e)
28     {
29       e.printStackTrace();
30     }
31   }
32   private void jbInit() throws Exception
33   {
34     this.setLayout(gridLayout1);
35     slider.setMajorTickSpacing(10);
36     slider.setMinorTickSpacing(1);
37     slider.setPaintTicks(true);
38     slider.setBackground(new Color(177, 177, 217));
39     slider.setFont(new java.awt.Font("Verdana", 0, 11));
40     valueField.setFont(new java.awt.Font("Verdana", 0, 11));
41     valueField.setMinimumSize(new Dimension(6, 21));
42     valueField.setPreferredSize(new Dimension(60, 21));
43     valueField.setText("");
44     valueField.setHorizontalAlignment(SwingConstants.CENTER);
45     valueField.addActionListener(new java.awt.event.ActionListener()
46     {
47       public void actionPerformed(ActionEvent e)
48       {
49         valueField_actionPerformed(e);
50       }
51     });
52     label.setBackground(new Color(177, 177, 217));
53     label.setFont(new java.awt.Font("Verdana", 0, 11));
54     label.setOpaque(true);
55     label.setHorizontalAlignment(SwingConstants.CENTER);
56     label.setText("set this label text");
57     jPanel1.setLayout(borderLayout1);
58     gridLayout1.setRows(2);
59     jPanel2.setLayout(flowLayout1);
60     applyButton.setBackground(new Color(177, 177, 217));
61     applyButton.setText("Apply");
62     applyButton.addActionListener(new java.awt.event.ActionListener()
63     {
64       public void actionPerformed(ActionEvent e)
65       {
66         applyButton_actionPerformed(e);
67       }
68     });
69     undoButton.setBackground(new Color(177, 177, 217));
70     undoButton.setEnabled(false);
71     undoButton.setText("Undo");
72     undoButton.addActionListener(new java.awt.event.ActionListener()
73     {
74       public void actionPerformed(ActionEvent e)
75       {
76         undoButton_actionPerformed(e);
77       }
78     });
79     jPanel2.setBackground(new Color(177, 177, 217));
80     this.add(jPanel2, null);
81     jPanel2.add(label, null);
82     jPanel2.add(applyButton, null);
83     jPanel2.add(undoButton, null);this.add(jPanel1, null);
84     jPanel1.add(valueField,  BorderLayout.EAST);
85     jPanel1.add(slider, BorderLayout.CENTER);
86
87   }
88
89   protected void valueField_actionPerformed(ActionEvent e)
90   {
91
92   }
93
94   protected void applyButton_actionPerformed(ActionEvent e)
95   {
96
97   }
98
99   protected void undoButton_actionPerformed(ActionEvent e)
100   {
101
102   }
103
104 }