X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbappletgui%2FGSliderPanel.java;h=5e333005e88d5627ced78ce0c9e53a73fb40c2cd;hb=588042b69abf8e60bcc950b24c283933c7dd422f;hp=d8120b4f19bbfb69e283ad5a8dc0d33df4cac709;hpb=5cd8e373c75fb348ecda4d94d8a46468fb92756d;p=jalview.git diff --git a/src/jalview/jbappletgui/GSliderPanel.java b/src/jalview/jbappletgui/GSliderPanel.java index d8120b4..5e33300 100755 --- a/src/jalview/jbappletgui/GSliderPanel.java +++ b/src/jalview/jbappletgui/GSliderPanel.java @@ -16,121 +16,100 @@ * 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) - { - } +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(); - protected void applyButton_actionPerformed(ActionEvent e) - { + public GSliderPanel() { + try { + jbInit(); + } catch (Exception e) { + e.printStackTrace(); + } + } - } + private void jbInit() throws Exception { + this.setLayout(borderLayout2); - protected void undoButton_actionPerformed(ActionEvent e) - { + // 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 allGroupsCheck_actionPerformed() - { + protected void applyButton_actionPerformed(ActionEvent e) { + } - } + protected void undoButton_actionPerformed(ActionEvent e) { + } + protected void allGroupsCheck_actionPerformed() { + } }