package jalview.jbgui; import javax.swing.*; import java.awt.*; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.border.TitledBorder; public class GPreferences extends JPanel { public GPreferences() { try { jbInit(); } catch (Exception ex) { ex.printStackTrace(); } } private void jbInit() throws Exception { this.setLayout(borderLayout1); ok.setText("OK"); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ok_actionPerformed(e); } }); cancel.setText("Cancel"); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancel_actionPerformed(e); } }); visual.setLayout(null); quality.setEnabled(false); quality.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); quality.setHorizontalAlignment(SwingConstants.RIGHT); quality.setHorizontalTextPosition(SwingConstants.LEFT); quality.setSelected(true); quality.setText("Quality"); quality.setBounds(new Rectangle(248, 53, 81, 23)); jPanel2.setBorder(titledBorder1); jPanel2.setBounds(new Rectangle(9, 20, 442, 206)); jPanel2.setLayout(null); fullID.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); fullID.setHorizontalAlignment(SwingConstants.RIGHT); fullID.setHorizontalTextPosition(SwingConstants.LEFT); fullID.setText("Full Sequence ID"); fullID.setBounds(new Rectangle(9, 78, 129, 23)); fullScreen.setHorizontalAlignment(SwingConstants.RIGHT); fullScreen.setHorizontalTextPosition(SwingConstants.LEFT); fullScreen.setText("Full Screen"); fullScreen.setBounds(new Rectangle(31, 28, 107, 23)); conservation.setEnabled(false); conservation.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); conservation.setHorizontalAlignment(SwingConstants.RIGHT); conservation.setHorizontalTextPosition(SwingConstants.LEFT); conservation.setSelected(true); conservation.setText("Conservation"); conservation.setBounds(new Rectangle(137, 53, 113, 23)); identity.setEnabled(false); identity.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); identity.setHorizontalAlignment(SwingConstants.RIGHT); identity.setHorizontalTextPosition(SwingConstants.LEFT); identity.setSelected(true); identity.setText("% Identity"); identity.setBounds(new Rectangle(326, 53, 99, 23)); annotations.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); annotations.setHorizontalAlignment(SwingConstants.RIGHT); annotations.setHorizontalTextPosition(SwingConstants.LEFT); annotations.setSelected(true); annotations.setText("Show Annotations"); annotations.setBounds(new Rectangle(10, 53, 128, 23)); annotations.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { annotations_actionPerformed(e); } }); jLabel1.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); jLabel1.setHorizontalAlignment(SwingConstants.RIGHT); jLabel1.setText("Gap Symbol"); jLabel1.setBounds(new Rectangle(41, 142, 76, 15)); colour.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); colour.setBounds(new Rectangle(121, 168, 154, 21)); jLabel2.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); jLabel2.setHorizontalAlignment(SwingConstants.RIGHT); jLabel2.setText("Colour"); jLabel2.setBounds(new Rectangle(60, 172, 58, 15)); jLabel3.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); jLabel3.setHorizontalAlignment(SwingConstants.RIGHT); jLabel3.setText("Font"); jLabel3.setBounds(new Rectangle(83, 114, 34, 15)); fontSizeCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); fontSizeCB.setBounds(new Rectangle(304, 109, 49, 21)); fontStyleCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); fontStyleCB.setBounds(new Rectangle(353, 109, 80, 21)); fontNameCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); fontNameCB.setBounds(new Rectangle(121, 109, 183, 21)); gapSymbolCB.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); gapSymbolCB.setBounds(new Rectangle(121, 140, 67, 21)); jPanel2.add(annotations); jPanel2.add(fullScreen); jPanel2.add(conservation); jPanel2.add(quality); jPanel2.add(fullID); jPanel2.add(gapSymbolCB); jPanel2.add(jLabel1); jPanel2.add(fontNameCB); jPanel2.add(jLabel2); jPanel2.add(jLabel3); jPanel2.add(colour); jPanel2.add(fontSizeCB); jPanel2.add(fontStyleCB); jPanel2.add(identity); jPanel1.add(ok); jPanel1.add(cancel); this.add(visaulTab, java.awt.BorderLayout.CENTER); visaulTab.add(visual, "visual"); visual.add(jPanel2); this.add(jPanel1, java.awt.BorderLayout.SOUTH); DefaultListCellRenderer dlcr = new DefaultListCellRenderer(); dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER); gapSymbolCB.setRenderer(dlcr); } JTabbedPane visaulTab = new JTabbedPane(); JPanel visual = new JPanel(); JButton ok = new JButton(); JButton cancel = new JButton(); JPanel jPanel1 = new JPanel(); BorderLayout borderLayout1 = new BorderLayout(); protected JCheckBox quality = new JCheckBox(); JPanel jPanel2 = new JPanel(); TitledBorder titledBorder1 = new TitledBorder("Open new alignment"); protected JCheckBox fullID = new JCheckBox(); protected JCheckBox fullScreen = new JCheckBox(); protected JCheckBox conservation = new JCheckBox(); protected JCheckBox identity = new JCheckBox(); protected JCheckBox annotations = new JCheckBox(); JLabel jLabel1 = new JLabel(); protected JComboBox colour = new JComboBox(); JLabel jLabel2 = new JLabel(); JLabel jLabel3 = new JLabel(); protected JComboBox fontSizeCB = new JComboBox(); protected JComboBox fontStyleCB = new JComboBox(); protected JComboBox fontNameCB = new JComboBox(); protected JComboBox gapSymbolCB = new JComboBox(); public void ok_actionPerformed(ActionEvent e) { } public void cancel_actionPerformed(ActionEvent e) { } public void annotations_actionPerformed(ActionEvent e) { } }