From 55a9db3a3585bc57fe57444f904359efa049d674 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 28 Apr 2005 15:35:30 +0000 Subject: [PATCH] GUI changes --- src/jalview/jbgui/GDesktop.java | 268 ++++++++++++------------ src/jalview/jbgui/GFontChooser.java | 311 +++++++++++++++------------- src/jalview/jbgui/GPreferences.java | 177 ++++++++++++++++ src/jalview/jbgui/GUserDefinedColours.java | 242 +++++++++++----------- 4 files changed, 598 insertions(+), 400 deletions(-) create mode 100755 src/jalview/jbgui/GPreferences.java diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index 2ef7ad6..040113f 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -1,131 +1,137 @@ -/******************** - * 2004 Jalview Reengineered - * Barton Group - * Dundee University - * - * AM Waterhouse - *******************/ - -package jalview.jbgui; - -import javax.swing.*; -import java.awt.event.*; -import java.awt.*; - - -public class GDesktop extends JFrame -{ - JMenuBar DesktopMenubar = new JMenuBar(); - JMenu FileMenu = new JMenu(); - JMenu HelpMenu = new JMenu(); - JMenuItem inputLocalFileMenuItem = new JMenuItem(); - JMenuItem inputURLMenuItem = new JMenuItem(); - JMenuItem inputTextboxMenuItem = new JMenuItem(); - JMenuItem quit = new JMenuItem(); - JMenuItem aboutMenuItem = new JMenuItem(); - JMenuItem documentationMenuItem = new JMenuItem(); - FlowLayout flowLayout1 = new FlowLayout(); - protected static JMenu windowMenu = new JMenu(); - public GDesktop() - { - try - { - jbInit(); - this.setJMenuBar(DesktopMenubar); - } - catch(Exception e) - { - e.printStackTrace(); - } - - } - private void jbInit() throws Exception - { - FileMenu.setMnemonic('F'); - FileMenu.setText("File"); - HelpMenu.setText("Help"); - inputLocalFileMenuItem.setMnemonic('L'); - inputLocalFileMenuItem.setText("Input Alignment From Local File"); - inputLocalFileMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - inputLocalFileMenuItem_actionPerformed(e); - } - }); - inputURLMenuItem.setMnemonic('U'); - inputURLMenuItem.setText("Input Alignment From URL"); - inputURLMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - inputURLMenuItem_actionPerformed(e); - } - }); - inputTextboxMenuItem.setMnemonic('T'); - inputTextboxMenuItem.setText("Input Alignment via Textbox"); - inputTextboxMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - inputTextboxMenuItem_actionPerformed(e); - } - }); - quit.setMnemonic('Q'); - quit.setText("Quit"); - quit.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - quit_actionPerformed(e); - } - }); - aboutMenuItem.setText("About"); - aboutMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - aboutMenuItem_actionPerformed(e); - } - }); - documentationMenuItem.setText("Documentation"); - documentationMenuItem.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - documentationMenuItem_actionPerformed(e); - } - }); - this.getContentPane().setLayout(flowLayout1); - windowMenu.setText("Window"); - DesktopMenubar.add(FileMenu); - DesktopMenubar.add(HelpMenu); - DesktopMenubar.add(windowMenu); - FileMenu.add(inputLocalFileMenuItem); - FileMenu.add(inputURLMenuItem); - FileMenu.add(inputTextboxMenuItem); - FileMenu.addSeparator(); - FileMenu.add(quit); - HelpMenu.add(aboutMenuItem); - HelpMenu.add(documentationMenuItem); - } - - protected void inputLocalFileMenuItem_actionPerformed(ActionEvent e) - { } - - protected void inputURLMenuItem_actionPerformed(ActionEvent e) - { } - - protected void inputTextboxMenuItem_actionPerformed(ActionEvent e) - { } - - protected void quit_actionPerformed(ActionEvent e) - { } - - protected void aboutMenuItem_actionPerformed(ActionEvent e) - { } - - protected void documentationMenuItem_actionPerformed(ActionEvent e) - { } - -} +/******************** + * 2004 Jalview Reengineered + * Barton Group + * Dundee University + * + * AM Waterhouse + *******************/ + +package jalview.jbgui; + +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; + + +public class GDesktop extends JFrame +{ + JMenuBar DesktopMenubar = new JMenuBar(); + JMenu FileMenu = new JMenu(); + JMenu HelpMenu = new JMenu(); + JMenuItem inputLocalFileMenuItem = new JMenuItem(); + JMenuItem inputURLMenuItem = new JMenuItem(); + JMenuItem inputTextboxMenuItem = new JMenuItem(); + JMenuItem quit = new JMenuItem(); + JMenuItem aboutMenuItem = new JMenuItem(); + JMenuItem documentationMenuItem = new JMenuItem(); + FlowLayout flowLayout1 = new FlowLayout(); + protected static JMenu windowMenu = new JMenu(); + public GDesktop() + { + try + { + jbInit(); + this.setJMenuBar(DesktopMenubar); + } + catch(Exception e) + { + e.printStackTrace(); + } + + } + private void jbInit() throws Exception + { + FileMenu.setMnemonic('F'); + FileMenu.setText("File"); + HelpMenu.setText("Help"); + inputLocalFileMenuItem.setMnemonic('L'); + inputLocalFileMenuItem.setText("Input Alignment From Local File"); + inputLocalFileMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + inputLocalFileMenuItem_actionPerformed(e); + } + }); + inputURLMenuItem.setMnemonic('U'); + inputURLMenuItem.setText("Input Alignment From URL"); + inputURLMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + inputURLMenuItem_actionPerformed(e); + } + }); + inputTextboxMenuItem.setMnemonic('T'); + inputTextboxMenuItem.setText("Input Alignment via Textbox"); + inputTextboxMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + inputTextboxMenuItem_actionPerformed(e); + } + }); + quit.setMnemonic('Q'); + quit.setText("Quit"); + quit.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + quit_actionPerformed(e); + } + }); + aboutMenuItem.setText("About"); + aboutMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + aboutMenuItem_actionPerformed(e); + } + }); + documentationMenuItem.setText("Documentation"); + documentationMenuItem.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + documentationMenuItem_actionPerformed(e); + } + }); + this.getContentPane().setLayout(flowLayout1); + windowMenu.setText("Window"); + DesktopMenubar.add(FileMenu); + DesktopMenubar.add(HelpMenu); + DesktopMenubar.add(windowMenu); + FileMenu.addSeparator(); + FileMenu.add(inputLocalFileMenuItem); + FileMenu.add(inputURLMenuItem); + FileMenu.add(inputTextboxMenuItem); + FileMenu.addSeparator(); + FileMenu.add(quit); + HelpMenu.add(aboutMenuItem); + HelpMenu.add(documentationMenuItem); + } + + protected void inputLocalFileMenuItem_actionPerformed(ActionEvent e) + { } + + protected void inputURLMenuItem_actionPerformed(ActionEvent e) + { } + + protected void inputTextboxMenuItem_actionPerformed(ActionEvent e) + { } + + protected void quit_actionPerformed(ActionEvent e) + { } + + protected void aboutMenuItem_actionPerformed(ActionEvent e) + { } + + protected void documentationMenuItem_actionPerformed(ActionEvent e) + { } + + public void SaveState_actionPerformed(ActionEvent e) + { + + } + +} diff --git a/src/jalview/jbgui/GFontChooser.java b/src/jalview/jbgui/GFontChooser.java index f93911a..ab0b080 100755 --- a/src/jalview/jbgui/GFontChooser.java +++ b/src/jalview/jbgui/GFontChooser.java @@ -1,148 +1,163 @@ -package jalview.jbgui; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; - - -public class GFontChooser extends JPanel -{ - JLabel jLabel1 = new JLabel(); - protected JComboBox fontSize = new JComboBox(); - protected JComboBox fontStyle = new JComboBox(); - JLabel jLabel2 = new JLabel(); - JLabel jLabel3 = new JLabel(); - protected JComboBox fontName = new JComboBox(); - JButton ok = new JButton(); - JButton cancel = new JButton(); - JPanel jPanel1 = new JPanel(); - JPanel jPanel2 = new JPanel(); - JPanel jPanel3 = new JPanel(); - BorderLayout borderLayout1 = new BorderLayout(); - BorderLayout borderLayout2 = new BorderLayout(); - BorderLayout borderLayout3 = new BorderLayout(); - FlowLayout flowLayout1 = new FlowLayout(); - - public GFontChooser() - { - try - { - jbInit(); - } - catch(Exception e) - { - e.printStackTrace(); - } - } - private void jbInit() throws Exception - { - jLabel1.setFont(new java.awt.Font("Verdana", 0, 11)); - jLabel1.setHorizontalAlignment(SwingConstants.RIGHT); - jLabel1.setText("Font: "); - jLabel1.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); - this.setLayout(flowLayout1); - fontSize.setFont(new java.awt.Font("Verdana", 0, 11)); - fontSize.setOpaque(false); - fontSize.setPreferredSize(new Dimension(50, 21)); - fontSize.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - fontSize_actionPerformed(e); - } - }); - fontStyle.setFont(new java.awt.Font("Verdana", 0, 11)); - fontStyle.setOpaque(false); - fontStyle.setPreferredSize(new Dimension(90, 21)); - fontStyle.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - fontStyle_actionPerformed(e); - } - }); - jLabel2.setFont(new java.awt.Font("Verdana", 0, 11)); - jLabel2.setHorizontalAlignment(SwingConstants.RIGHT); - jLabel2.setText("Size: "); - jLabel2.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); - jLabel3.setFont(new java.awt.Font("Verdana", 0, 11)); - jLabel3.setHorizontalAlignment(SwingConstants.RIGHT); - jLabel3.setText("Style: "); - jLabel3.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); - fontName.setFont(new java.awt.Font("Verdana", 0, 11)); - fontName.setMaximumSize(new Dimension(32767, 32767)); - fontName.setMinimumSize(new Dimension(300, 21)); - fontName.setOpaque(false); - fontName.setPreferredSize(new Dimension(180, 21)); - fontName.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - fontName_actionPerformed(e); - } - }); - ok.setFont(new java.awt.Font("Verdana", 0, 11)); - ok.setText("OK"); - ok.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - ok_actionPerformed(e); - } - }); - cancel.setFont(new java.awt.Font("Verdana", 0, 11)); - cancel.setText("Cancel"); - cancel.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - cancel_actionPerformed(e); - } - }); - this.setBackground(Color.white); - jPanel1.setOpaque(false); - jPanel1.setLayout(borderLayout1); - jPanel2.setOpaque(false); - jPanel2.setLayout(borderLayout3); - jPanel3.setOpaque(false); - jPanel3.setLayout(borderLayout2); - flowLayout1.setAlignment(FlowLayout.CENTER); - flowLayout1.setVgap(5); - this.add(jPanel1, null); - jPanel1.add(jLabel1, BorderLayout.WEST); - jPanel1.add(fontName, BorderLayout.CENTER); - this.add(jPanel3, null); - this.add(jPanel2, null); - jPanel2.add(jLabel3, BorderLayout.WEST); - jPanel2.add(fontStyle, BorderLayout.CENTER); - jPanel3.add(jLabel2, BorderLayout.WEST); - jPanel3.add(fontSize, BorderLayout.CENTER); - this.add(ok, null); - this.add(cancel, null); - } - - protected void ok_actionPerformed(ActionEvent e) - { - - } - - protected void cancel_actionPerformed(ActionEvent e) - { - - } - - protected void fontName_actionPerformed(ActionEvent e) - { - - } - - protected void fontSize_actionPerformed(ActionEvent e) - { - - } - - protected void fontStyle_actionPerformed(ActionEvent e) - { - - } -} +package jalview.jbgui; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + + +public class GFontChooser extends JPanel +{ + JLabel jLabel1 = new JLabel(); + protected JComboBox fontSize = new JComboBox(); + protected JComboBox fontStyle = new JComboBox(); + JLabel jLabel2 = new JLabel(); + JLabel jLabel3 = new JLabel(); + protected JComboBox fontName = new JComboBox(); + JButton ok = new JButton(); + JButton cancel = new JButton(); + JPanel jPanel1 = new JPanel(); + JPanel jPanel2 = new JPanel(); + JPanel jPanel3 = new JPanel(); + BorderLayout borderLayout1 = new BorderLayout(); + BorderLayout borderLayout2 = new BorderLayout(); + BorderLayout borderLayout3 = new BorderLayout(); + FlowLayout flowLayout1 = new FlowLayout(); + JButton defaultButton = new JButton(); + + public GFontChooser() + { + try + { + jbInit(); + } + catch(Exception e) + { + e.printStackTrace(); + } + } + private void jbInit() throws Exception + { + jLabel1.setFont(new java.awt.Font("Verdana", 0, 11)); + jLabel1.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel1.setText("Font: "); + jLabel1.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); + this.setLayout(flowLayout1); + fontSize.setFont(new java.awt.Font("Verdana", 0, 11)); + fontSize.setOpaque(false); + fontSize.setPreferredSize(new Dimension(50, 21)); + fontSize.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + fontSize_actionPerformed(e); + } + }); + fontStyle.setFont(new java.awt.Font("Verdana", 0, 11)); + fontStyle.setOpaque(false); + fontStyle.setPreferredSize(new Dimension(90, 21)); + fontStyle.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + fontStyle_actionPerformed(e); + } + }); + jLabel2.setFont(new java.awt.Font("Verdana", 0, 11)); + jLabel2.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel2.setText("Size: "); + jLabel2.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); + jLabel3.setFont(new java.awt.Font("Verdana", 0, 11)); + jLabel3.setHorizontalAlignment(SwingConstants.RIGHT); + jLabel3.setText("Style: "); + jLabel3.setVerticalTextPosition(javax.swing.SwingConstants.CENTER); + fontName.setFont(new java.awt.Font("Verdana", 0, 11)); + fontName.setMaximumSize(new Dimension(32767, 32767)); + fontName.setMinimumSize(new Dimension(300, 21)); + fontName.setOpaque(false); + fontName.setPreferredSize(new Dimension(180, 21)); + fontName.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + fontName_actionPerformed(e); + } + }); + ok.setFont(new java.awt.Font("Verdana", 0, 11)); + ok.setText("OK"); + ok.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + ok_actionPerformed(e); + } + }); + cancel.setFont(new java.awt.Font("Verdana", 0, 11)); + cancel.setText("Cancel"); + cancel.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + cancel_actionPerformed(e); + } + }); + this.setBackground(Color.white); + jPanel1.setOpaque(false); + jPanel1.setLayout(borderLayout1); + jPanel2.setOpaque(false); + jPanel2.setLayout(borderLayout3); + jPanel3.setOpaque(false); + jPanel3.setLayout(borderLayout2); + flowLayout1.setAlignment(FlowLayout.CENTER); + flowLayout1.setVgap(5); + defaultButton.setText("Set as Default"); + defaultButton.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + defaultButton_actionPerformed(e); + } + }); + this.add(jPanel1, null); + jPanel1.add(jLabel1, BorderLayout.WEST); + jPanel1.add(fontName, BorderLayout.CENTER); + this.add(jPanel3, null); + this.add(jPanel2, null); + jPanel2.add(jLabel3, BorderLayout.WEST); + jPanel2.add(fontStyle, BorderLayout.CENTER); + jPanel3.add(jLabel2, BorderLayout.WEST); + jPanel3.add(fontSize, BorderLayout.CENTER); + this.add(ok, null); + this.add(cancel, null); + this.add(defaultButton); + } + + protected void ok_actionPerformed(ActionEvent e) + { + + } + + protected void cancel_actionPerformed(ActionEvent e) + { + + } + + protected void fontName_actionPerformed(ActionEvent e) + { + + } + + protected void fontSize_actionPerformed(ActionEvent e) + { + + } + + protected void fontStyle_actionPerformed(ActionEvent e) + { + + } + + public void defaultButton_actionPerformed(ActionEvent e) + { + + } +} diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java new file mode 100755 index 0000000..06dc81a --- /dev/null +++ b/src/jalview/jbgui/GPreferences.java @@ -0,0 +1,177 @@ +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)); + fontSize.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + fontSize.setBounds(new Rectangle(304, 109, 49, 21)); + fontStyle.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + fontStyle.setBounds(new Rectangle(353, 109, 80, 21)); + fontName.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + fontName.setBounds(new Rectangle(121, 109, 183, 21)); + gapSymbol.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + gapSymbol.setBounds(new Rectangle(121, 140, 67, 21)); + jPanel2.add(annotations); + jPanel2.add(fullScreen); + jPanel2.add(conservation); + jPanel2.add(quality); + jPanel2.add(fullID); + jPanel2.add(gapSymbol); + jPanel2.add(jLabel1); + jPanel2.add(fontName); + jPanel2.add(jLabel2); + jPanel2.add(jLabel3); + jPanel2.add(colour); + jPanel2.add(fontSize); + jPanel2.add(fontStyle); + 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); + gapSymbol.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 fontSize = new JComboBox(); + protected JComboBox fontStyle = new JComboBox(); + protected JComboBox fontName = new JComboBox(); + protected JComboBox gapSymbol = new JComboBox(); + public void ok_actionPerformed(ActionEvent e) + { + + } + + public void cancel_actionPerformed(ActionEvent e) + { + + } + + public void annotations_actionPerformed(ActionEvent e) + { + + } + +} diff --git a/src/jalview/jbgui/GUserDefinedColours.java b/src/jalview/jbgui/GUserDefinedColours.java index 9086c39..dc4f291 100755 --- a/src/jalview/jbgui/GUserDefinedColours.java +++ b/src/jalview/jbgui/GUserDefinedColours.java @@ -1,121 +1,121 @@ -package jalview.jbgui; - -import javax.swing.*; -import java.awt.*; -import java.awt.event.*; - - -public class GUserDefinedColours extends JPanel -{ - protected JColorChooser colorChooser = new JColorChooser(); - protected JPanel buttonPanel = new JPanel(); - protected GridLayout gridLayout = new GridLayout(); - JPanel jPanel2 = new JPanel(); - protected JButton okButton = new JButton(); - protected JButton applyButton = new JButton(); - protected JButton loadbutton = new JButton(); - protected JButton savebutton = new JButton(); - protected JButton cancelButton = new JButton(); - FlowLayout flowLayout1 = new FlowLayout(); - - public GUserDefinedColours() - { - try - { - jbInit(); - } - catch(Exception e) - { - e.printStackTrace(); - } - } - private void jbInit() throws Exception - { - this.setLayout(flowLayout1); - buttonPanel.setLayout(gridLayout); - gridLayout.setColumns(6); - gridLayout.setRows(4); - okButton.setFont(new java.awt.Font("Verdana", 0, 11)); - okButton.setText("OK"); - okButton.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - okButton_actionPerformed(e); - } - }); - applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); - applyButton.setText("Apply"); - applyButton.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - applyButton_actionPerformed(e); - } - }); - loadbutton.setFont(new java.awt.Font("Verdana", 0, 11)); - loadbutton.setText("Load scheme"); - loadbutton.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - loadbutton_actionPerformed(e); - } - }); - savebutton.setFont(new java.awt.Font("Verdana", 0, 11)); - savebutton.setText("Save scheme"); - savebutton.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - savebutton_actionPerformed(e); - } - }); - cancelButton.setFont(new java.awt.Font("Verdana", 0, 11)); - cancelButton.setText("Cancel"); - cancelButton.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - cancelButton_actionPerformed(e); - } - }); - this.setBackground(new Color(212, 208, 223)); - jPanel2.setOpaque(false); - colorChooser.setOpaque(false); - this.add(colorChooser, null); - this.add(buttonPanel, null); - this.add(jPanel2, null); - jPanel2.add(okButton, null); - jPanel2.add(applyButton, null); - jPanel2.add(loadbutton, null); - jPanel2.add(savebutton, null); - jPanel2.add(cancelButton, null); - } - - - protected void okButton_actionPerformed(ActionEvent e) - { - - } - - protected void applyButton_actionPerformed(ActionEvent e) - { - - } - - protected void loadbutton_actionPerformed(ActionEvent e) - { - - } - - protected void savebutton_actionPerformed(ActionEvent e) - { - - } - - protected void cancelButton_actionPerformed(ActionEvent e) - { - - } -} +package jalview.jbgui; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + + +public class GUserDefinedColours extends JPanel +{ + protected JColorChooser colorChooser = new JColorChooser(); + protected JPanel buttonPanel = new JPanel(); + protected GridLayout gridLayout = new GridLayout(); + JPanel jPanel2 = new JPanel(); + protected JButton okButton = new JButton(); + protected JButton applyButton = new JButton(); + protected JButton loadbutton = new JButton(); + protected JButton savebutton = new JButton(); + protected JButton cancelButton = new JButton(); + FlowLayout flowLayout1 = new FlowLayout(); + + public GUserDefinedColours() + { + try + { + jbInit(); + } + catch(Exception e) + { + e.printStackTrace(); + } + } + private void jbInit() throws Exception + { + this.setLayout(flowLayout1); + buttonPanel.setLayout(gridLayout); + gridLayout.setColumns(6); + gridLayout.setRows(4); + okButton.setFont(new java.awt.Font("Verdana", 0, 11)); + okButton.setText("OK"); + okButton.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + okButton_actionPerformed(e); + } + }); + applyButton.setFont(new java.awt.Font("Verdana", 0, 11)); + applyButton.setText("Apply"); + applyButton.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + applyButton_actionPerformed(e); + } + }); + loadbutton.setFont(new java.awt.Font("Verdana", 0, 11)); + loadbutton.setText("Load scheme"); + loadbutton.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + loadbutton_actionPerformed(e); + } + }); + savebutton.setFont(new java.awt.Font("Verdana", 0, 11)); + savebutton.setText("Save scheme"); + savebutton.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + savebutton_actionPerformed(e); + } + }); + cancelButton.setFont(new java.awt.Font("Verdana", 0, 11)); + cancelButton.setText("Cancel"); + cancelButton.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + cancelButton_actionPerformed(e); + } + }); + this.setBackground(new Color(212, 208, 223)); + jPanel2.setOpaque(false); + colorChooser.setOpaque(false); + this.add(colorChooser, null); + this.add(buttonPanel, null); + this.add(jPanel2, null); + jPanel2.add(okButton, null); + jPanel2.add(applyButton, null); + jPanel2.add(loadbutton, null); + jPanel2.add(savebutton, null); + jPanel2.add(cancelButton, null); + } + + + protected void okButton_actionPerformed(ActionEvent e) + { + + } + + protected void applyButton_actionPerformed(ActionEvent e) + { + + } + + protected void loadbutton_actionPerformed(ActionEvent e) + { + + } + + protected void savebutton_actionPerformed(ActionEvent e) + { + + } + + protected void cancelButton_actionPerformed(ActionEvent e) + { + + } +} -- 1.7.10.2