From: amwaterhouse Date: Tue, 16 Nov 2004 15:24:50 +0000 (+0000) Subject: New files X-Git-Tag: Release_2_0~925 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0c903ecfa379ba0e241fc1eff2a10ad080b7ba9b;p=jalview.git New files --- diff --git a/src/jalview/jbgui/GConservationIncrementPanel.java b/src/jalview/jbgui/GConservationIncrementPanel.java new file mode 100755 index 0000000..1ca6d05 --- /dev/null +++ b/src/jalview/jbgui/GConservationIncrementPanel.java @@ -0,0 +1,65 @@ +package jalview.jbgui; + +import java.awt.*; +import javax.swing.*; +import java.awt.event.*; + +public class GConservationIncrementPanel extends JPanel +{ + protected JSlider slider = new JSlider(); + protected JTextField valueField = new JTextField(); + JLabel jLabel1 = new JLabel(); + JPanel jPanel1 = new JPanel(); + BorderLayout borderLayout1 = new BorderLayout(); + GridLayout gridLayout1 = new GridLayout(); + + public GConservationIncrementPanel() + { + try + { + jbInit(); + } + catch(Exception e) + { + e.printStackTrace(); + } + } + private void jbInit() throws Exception + { + this.setLayout(gridLayout1); + slider.setMajorTickSpacing(10); + slider.setMaximum(50); + slider.setMinorTickSpacing(1); + slider.setPaintTicks(true); + slider.setBackground(new Color(212, 208, 236)); + slider.setFont(new java.awt.Font("Verdana", 0, 11)); + valueField.setFont(new java.awt.Font("Verdana", 0, 11)); + valueField.setMinimumSize(new Dimension(6, 21)); + valueField.setPreferredSize(new Dimension(60, 21)); + valueField.setText(""); + valueField.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + valueField_actionPerformed(e); + } + }); + jLabel1.setBackground(new Color(212, 208, 236)); + jLabel1.setFont(new java.awt.Font("Verdana", 0, 11)); + jLabel1.setOpaque(true); + jLabel1.setHorizontalAlignment(SwingConstants.CENTER); + jLabel1.setText("Enter the value by which to decrease conservation colour intensity"); + jPanel1.setLayout(borderLayout1); + gridLayout1.setRows(2); + this.add(jLabel1, null); + this.add(jPanel1, null); + jPanel1.add(valueField, BorderLayout.EAST); + jPanel1.add(slider, BorderLayout.CENTER); + } + + protected void valueField_actionPerformed(ActionEvent e) + { + + } + +} diff --git a/src/jalview/jbgui/GGroupEditor.java b/src/jalview/jbgui/GGroupEditor.java new file mode 100755 index 0000000..d99c31d --- /dev/null +++ b/src/jalview/jbgui/GGroupEditor.java @@ -0,0 +1,274 @@ +package jalview.jbgui; + +import java.awt.*; +import javax.swing.*; +import java.awt.event.*; +import javax.swing.border.*; + +public class GGroupEditor extends JPanel +{ + protected JList assignedList = new JList(); + protected JComboBox groupsCombo = new JComboBox(); + protected JList unassignedList = new JList(); + JButton add = new JButton(); + JButton addAll = new JButton(); + JButton remove = new JButton(); + JButton removeAll = new JButton(); + JPanel jPanel1 = new JPanel(); + GridLayout gridLayout1 = new GridLayout(); + TitledBorder titledBorder1; + TitledBorder titledBorder2; + JPanel jPanel2 = new JPanel(); + BorderLayout borderLayout1 = new BorderLayout(); + JButton addGroup = new JButton(); + JButton deleteGroup = new JButton(); + JButton addSelectedIds = new JButton(); + protected JCheckBox textCheck = new JCheckBox(); + protected JCheckBox colourTextCheck = new JCheckBox(); + protected JCheckBox boxesCheck = new JCheckBox(); + protected JComboBox colourCombo = new JComboBox(); + JPanel jPanel3 = new JPanel(); + GridLayout gridLayout2 = new GridLayout(); + JScrollPane jScrollPane1 = new JScrollPane(); + JScrollPane jScrollPane2 = new JScrollPane(); + JButton groupName = new JButton(); + + public GGroupEditor() + { + try + { + jbInit(); + } + catch(Exception e) + { + e.printStackTrace(); + } + } + private void jbInit() throws Exception + { + titledBorder1 = new TitledBorder("Unassigned Sequences"); + titledBorder2 = new TitledBorder("Current Groups"); + this.setLayout(null); + unassignedList.setFont(new java.awt.Font("Verdana", 0, 10)); + unassignedList.setBorder(titledBorder1); + add.setFont(new java.awt.Font("Verdana", 0, 10)); + add.setText("Add to group"); + add.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + add_actionPerformed(e); + } + }); + addAll.setFont(new java.awt.Font("Verdana", 0, 10)); + addAll.setText("Add all to group"); + addAll.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + addAll_actionPerformed(e); + } + }); + remove.setFont(new java.awt.Font("Verdana", 0, 10)); + remove.setText("Remove from group"); + remove.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + remove_actionPerformed(e); + } + }); + removeAll.setFont(new java.awt.Font("Verdana", 0, 10)); + removeAll.setMargin(new Insets(0, 0, 0, 0)); + removeAll.setText("Remove all from group"); + removeAll.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + removeAll_actionPerformed(e); + } + }); + jPanel1.setBounds(new Rectangle(265, 82, 169, 108)); + jPanel1.setLayout(gridLayout1); + gridLayout1.setRows(4); + jPanel2.setFont(new java.awt.Font("Verdana", 0, 10)); + jPanel2.setBorder(titledBorder2); + jPanel2.setBounds(new Rectangle(4, 3, 257, 369)); + jPanel2.setLayout(borderLayout1); + addGroup.setBounds(new Rectangle(265, 259, 166, 25)); + addGroup.setFont(new java.awt.Font("Verdana", 0, 10)); + addGroup.setText("Add new group"); + addGroup.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + addGroup_actionPerformed(e); + } + }); + deleteGroup.setBounds(new Rectangle(266, 285, 163, 25)); + deleteGroup.setFont(new java.awt.Font("Verdana", 0, 10)); + deleteGroup.setText("Delete selected group"); + deleteGroup.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + deleteGroup_actionPerformed(e); + } + }); + addSelectedIds.setBounds(new Rectangle(268, 37, 160, 25)); + addSelectedIds.setFont(new java.awt.Font("Verdana", 0, 10)); + addSelectedIds.setText("Add selected ids"); + addSelectedIds.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + addSelectedIds_actionPerformed(e); + } + }); + textCheck.setFont(new java.awt.Font("Verdana", 0, 10)); + textCheck.setText("Display text"); + textCheck.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + textCheck_actionPerformed(e); + } + }); + colourTextCheck.setFont(new java.awt.Font("Verdana", 0, 10)); + colourTextCheck.setText("Colour text"); + colourTextCheck.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + colourTextCheck_actionPerformed(e); + } + }); + boxesCheck.setFont(new java.awt.Font("Verdana", 0, 10)); + boxesCheck.setText("Display boxes"); + boxesCheck.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + boxesCheck_actionPerformed(e); + } + }); + jPanel3.setLayout(gridLayout2); + gridLayout2.setRows(4); + colourCombo.setFont(new java.awt.Font("Verdana", 0, 10)); + colourCombo.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + colourCombo_actionPerformed(e); + } + }); + assignedList.setFont(new java.awt.Font("Verdana", 0, 10)); + groupsCombo.setFont(new java.awt.Font("Verdana", 0, 10)); + groupsCombo.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + groupsCombo_actionPerformed(e); + } + }); + this.setBackground(Color.lightGray); + jScrollPane1.setBounds(new Rectangle(437, 6, 257, 367)); + groupName.setBounds(new Rectangle(266, 232, 166, 25)); + groupName.setFont(new java.awt.Font("Verdana", 0, 10)); + groupName.setVerifyInputWhenFocusTarget(true); + groupName.setText("Edit group name"); + groupName.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + groupName_actionPerformed(e); + } + }); + jPanel1.add(add, null); + jPanel1.add(addAll, null); + jPanel1.add(remove, null); + jPanel1.add(removeAll, null); + this.add(addSelectedIds, null); + this.add(jPanel1, null); + this.add(jPanel2, null); + jPanel3.add(colourCombo, null); + jPanel3.add(boxesCheck, null); + jPanel3.add(textCheck, null); + jPanel3.add(colourTextCheck, null); + this.add(jScrollPane1, null); + this.add(addGroup, null); + this.add(deleteGroup, null); + this.add(groupName, null); + jScrollPane1.getViewport().add(unassignedList, null); + jPanel2.add(jScrollPane2, BorderLayout.CENTER); + jPanel2.add(groupsCombo, BorderLayout.NORTH); + jPanel2.add(jPanel3, BorderLayout.SOUTH); + jScrollPane2.getViewport().add(assignedList, null); + } + + protected void add_actionPerformed(ActionEvent e) + { + + } + + protected void groupsCombo_actionPerformed(ActionEvent e) + { + + } + + protected void colourCombo_actionPerformed(ActionEvent e) + { + + } + + protected void boxesCheck_actionPerformed(ActionEvent e) + { + + } + + protected void textCheck_actionPerformed(ActionEvent e) + { + + } + + protected void colourTextCheck_actionPerformed(ActionEvent e) + { + + } + + protected void addSelectedIds_actionPerformed(ActionEvent e) + { + + } + + protected void addAll_actionPerformed(ActionEvent e) + { + + } + + protected void remove_actionPerformed(ActionEvent e) + { + + } + + protected void removeAll_actionPerformed(ActionEvent e) + { + + } + + protected void addGroup_actionPerformed(ActionEvent e) + { + + } + + protected void deleteGroup_actionPerformed(ActionEvent e) + { + + } + + + protected void groupName_actionPerformed(ActionEvent e) + { + + } +}