X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGSliderPanel.java;h=c452d113120d858f73c056d7fadde5dd92794ad6;hb=4e66fcb33a56766f244dab68bc2087db29829efd;hp=17fdb341ef92a7bc7b3c482d921dc15524c1ebf1;hpb=99c58ee0ae2a848f982552e53feaf6d5cb9925e5;p=jalview.git diff --git a/src/jalview/jbgui/GSliderPanel.java b/src/jalview/jbgui/GSliderPanel.java index 17fdb34..c452d11 100755 --- a/src/jalview/jbgui/GSliderPanel.java +++ b/src/jalview/jbgui/GSliderPanel.java @@ -15,132 +15,163 @@ * 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.jbgui; - -import java.awt.*; -import javax.swing.*; -import java.awt.event.*; - -public class GSliderPanel extends JPanel -{ - // this is used for conservation colours, PID colours and redundancy threshold - protected JSlider slider = new JSlider(); - protected JTextField valueField = new JTextField(); - protected JLabel label = new JLabel(); - JPanel jPanel1 = new JPanel(); - GridLayout gridLayout1 = new GridLayout(); - JPanel jPanel2 = new JPanel(); - protected JButton applyButton = new JButton(); - protected JButton undoButton = new JButton(); - FlowLayout flowLayout1 = new FlowLayout(); - protected JCheckBox allGroupsCheck = new JCheckBox(); - BorderLayout borderLayout1 = new BorderLayout(); - - public GSliderPanel() - { - try - { - jbInit(); - } - catch(Exception e) - { - e.printStackTrace(); - } - } - private void jbInit() throws Exception - { - this.setLayout(gridLayout1); - slider.setMajorTickSpacing(10); - slider.setMinorTickSpacing(1); - slider.setPaintTicks(true); - slider.setBackground(Color.white); - slider.setFont(new java.awt.Font("Verdana", 0, 11)); - slider.setDoubleBuffered(true); - valueField.setFont(new java.awt.Font("Verdana", 0, 11)); - valueField.setMinimumSize(new Dimension(6, 14)); - valueField.setPreferredSize(new Dimension(50, 12)); - valueField.setText(""); - valueField.setHorizontalAlignment(SwingConstants.CENTER); - 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.setOpaque(false); - label.setHorizontalAlignment(SwingConstants.CENTER); - label.setText("set this label text"); - jPanel1.setLayout(borderLayout1); - gridLayout1.setRows(2); - jPanel2.setLayout(flowLayout1); - applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); - applyButton.setOpaque(false); - applyButton.setText("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.setOpaque(false); - undoButton.setText("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.setOpaque(false); - allGroupsCheck.setText("Apply to all Groups"); - allGroupsCheck.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - allGroupsCheck_actionPerformed(e); - } - }); - this.setBackground(Color.white); - this.setPreferredSize(new Dimension(415, 84)); - jPanel2.setOpaque(false); - jPanel1.setOpaque(false); - this.add(jPanel2, null); - jPanel2.add(label, null); - jPanel2.add(applyButton, null); - jPanel2.add(undoButton, null);this.add(jPanel1, null); - jPanel1.add(slider, BorderLayout.WEST); - jPanel1.add(valueField, BorderLayout.CENTER); - jPanel1.add(allGroupsCheck, BorderLayout.EAST); - - } - - protected void valueField_actionPerformed(ActionEvent e) - { - - } - - protected void applyButton_actionPerformed(ActionEvent e) - { - - } - - protected void undoButton_actionPerformed(ActionEvent e) - { - - } - - protected void allGroupsCheck_actionPerformed(ActionEvent e) - { - - } - -} +*/ +package jalview.jbgui; + +import java.awt.*; +import java.awt.event.*; + +import javax.swing.*; + + +/** + * DOCUMENT ME! + * + * @author $author$ + * @version $Revision$ + */ +public class GSliderPanel extends JPanel +{ + // this is used for conservation colours, PID colours and redundancy threshold + protected JSlider slider = new JSlider(); + protected JTextField valueField = new JTextField(); + protected JLabel label = new JLabel(); + JPanel jPanel1 = new JPanel(); + GridLayout gridLayout1 = new GridLayout(); + JPanel jPanel2 = new JPanel(); + protected JButton applyButton = new JButton(); + protected JButton undoButton = new JButton(); + FlowLayout flowLayout1 = new FlowLayout(); + protected JCheckBox allGroupsCheck = new JCheckBox(); + BorderLayout borderLayout1 = new BorderLayout(); + + /** + * Creates a new GSliderPanel object. + */ + public GSliderPanel() + { + try + { + jbInit(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * DOCUMENT ME! + * + * @throws Exception DOCUMENT ME! + */ + private void jbInit() throws Exception + { + this.setLayout(gridLayout1); + slider.setMajorTickSpacing(10); + slider.setMinorTickSpacing(1); + slider.setPaintTicks(true); + slider.setBackground(Color.white); + slider.setFont(new java.awt.Font("Verdana", 0, 11)); + slider.setDoubleBuffered(true); + valueField.setFont(new java.awt.Font("Verdana", 0, 11)); + valueField.setMinimumSize(new Dimension(6, 14)); + valueField.setPreferredSize(new Dimension(50, 12)); + valueField.setText(""); + valueField.setHorizontalAlignment(SwingConstants.CENTER); + 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.setOpaque(false); + label.setHorizontalAlignment(SwingConstants.CENTER); + label.setText("set this label text"); + jPanel1.setLayout(borderLayout1); + gridLayout1.setRows(2); + jPanel2.setLayout(flowLayout1); + applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); + applyButton.setOpaque(false); + applyButton.setText("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.setOpaque(false); + undoButton.setText("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.setOpaque(false); + allGroupsCheck.setText("Apply to all Groups"); + allGroupsCheck.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + allGroupsCheck_actionPerformed(e); + } + }); + this.setBackground(Color.white); + this.setPreferredSize(new Dimension(415, 84)); + jPanel2.setOpaque(false); + jPanel1.setOpaque(false); + this.add(jPanel2, null); + jPanel2.add(label, null); + jPanel2.add(applyButton, null); + jPanel2.add(undoButton, null); + this.add(jPanel1, null); + jPanel1.add(slider, BorderLayout.WEST); + jPanel1.add(valueField, BorderLayout.CENTER); + jPanel1.add(allGroupsCheck, BorderLayout.EAST); + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void valueField_actionPerformed(ActionEvent e) + { + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void applyButton_actionPerformed(ActionEvent e) + { + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void undoButton_actionPerformed(ActionEvent e) + { + } + + /** + * DOCUMENT ME! + * + * @param e DOCUMENT ME! + */ + protected void allGroupsCheck_actionPerformed(ActionEvent e) + { + } +}