correct conservation errors after edit
[jalview.git] / src / jalview / jbappletgui / GSliderPanel.java
1 package jalview.jbappletgui;\r
2 \r
3 import java.awt.*;\r
4 import java.awt.event.*;\r
5 \r
6 public class GSliderPanel extends Panel\r
7 {\r
8   // this is used for conservation colours, PID colours and redundancy threshold\r
9   protected Scrollbar slider = new Scrollbar();\r
10   protected TextField valueField = new TextField();\r
11   protected Label label = new Label();\r
12   Panel jPanel1 = new Panel();\r
13   Panel jPanel2 = new Panel();\r
14   protected Button applyButton = new Button();\r
15   protected Button undoButton = new Button();\r
16   FlowLayout flowLayout1 = new FlowLayout();\r
17   protected Checkbox allGroupsCheck = new Checkbox();\r
18   BorderLayout borderLayout1 = new BorderLayout();\r
19   BorderLayout borderLayout2 = new BorderLayout();\r
20   FlowLayout flowLayout2 = new FlowLayout();\r
21 \r
22   public GSliderPanel()\r
23   {\r
24     try\r
25     {\r
26       jbInit();\r
27     }\r
28     catch(Exception e)\r
29     {\r
30       e.printStackTrace();\r
31     }\r
32   }\r
33   private void jbInit() throws Exception\r
34   {\r
35     this.setLayout(borderLayout2);\r
36    // slider.setMajorTickSpacing(10);\r
37   //  slider.setMinorTickSpacing(1);\r
38   //  slider.setPaintTicks(true);\r
39     slider.setBackground(Color.white);\r
40     slider.setFont(new java.awt.Font("Verdana", 0, 11));\r
41     slider.setOrientation(0);\r
42     valueField.setFont(new java.awt.Font("Verdana", 0, 11));\r
43     valueField.setText("      ");\r
44     valueField.addActionListener(new java.awt.event.ActionListener()\r
45     {\r
46       public void actionPerformed(ActionEvent e)\r
47       {\r
48         valueField_actionPerformed(e);\r
49       }\r
50     });\r
51     label.setFont(new java.awt.Font("Verdana", 0, 11));\r
52     label.setText("set this label text");\r
53     jPanel1.setLayout(borderLayout1);\r
54     jPanel2.setLayout(flowLayout1);\r
55     applyButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
56     applyButton.setLabel("Apply");\r
57     applyButton.addActionListener(new java.awt.event.ActionListener()\r
58     {\r
59       public void actionPerformed(ActionEvent e)\r
60       {\r
61         applyButton_actionPerformed(e);\r
62       }\r
63     });\r
64     undoButton.setEnabled(false);\r
65     undoButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
66     undoButton.setLabel("Undo");\r
67     undoButton.addActionListener(new java.awt.event.ActionListener()\r
68     {\r
69       public void actionPerformed(ActionEvent e)\r
70       {\r
71         undoButton_actionPerformed(e);\r
72       }\r
73     });\r
74     allGroupsCheck.setEnabled(false);\r
75     allGroupsCheck.setFont(new java.awt.Font("Verdana", 0, 11));\r
76     allGroupsCheck.setLabel("Apply threshold to all groups");\r
77     allGroupsCheck.setName("Apply to all Groups");\r
78     allGroupsCheck.addItemListener(new java.awt.event.ItemListener()\r
79     {\r
80       public void itemStateChanged(ItemEvent e)\r
81       {\r
82         allGroupsCheck_actionPerformed();\r
83       }\r
84     });\r
85     this.setBackground(Color.white);\r
86     this.setForeground(Color.black);\r
87     jPanel2.add(label, null);\r
88     jPanel2.add(applyButton, null);\r
89     jPanel2.add(undoButton, null);\r
90     jPanel2.add(allGroupsCheck);\r
91     jPanel1.add(valueField, java.awt.BorderLayout.EAST);\r
92     jPanel1.add(slider, java.awt.BorderLayout.CENTER);\r
93     this.add(jPanel1, java.awt.BorderLayout.SOUTH);\r
94     this.add(jPanel2, java.awt.BorderLayout.CENTER);\r
95   }\r
96 \r
97   protected void valueField_actionPerformed(ActionEvent e)\r
98   {\r
99 \r
100   }\r
101 \r
102   protected void applyButton_actionPerformed(ActionEvent e)\r
103   {\r
104 \r
105   }\r
106 \r
107   protected void undoButton_actionPerformed(ActionEvent e)\r
108   {\r
109 \r
110   }\r
111 \r
112   protected void allGroupsCheck_actionPerformed()\r
113   {\r
114 \r
115   }\r
116 \r
117 }\r