X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGPreferences.java;h=bc4a37b09350bd129105af366dfd47da8bcd355d;hb=b0a90dcb797054f5e01a3b10969e782ef3aafa4a;hp=02756f1552c0556af8795213f42845e207c80883;hpb=7651849dd842b8663742e55f621ffb1c8e631466;p=jalview.git diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 02756f1..bc4a37b 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle +* Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -24,7 +24,9 @@ import javax.swing.*; import javax.swing.border.TitledBorder; import java.awt.event.*; import javax.swing.event.*; - +import java.awt.Font; +import java.awt.Rectangle; +import java.awt.Insets; /** * DOCUMENT ME! @@ -104,6 +106,14 @@ public class GPreferences extends JPanel protected JCheckBox seqLimit = new JCheckBox(); GridLayout gridLayout3 = new GridLayout(); protected JCheckBox smoothFont = new JCheckBox(); + JPanel calcTab = new JPanel(); + protected JCheckBox autoCalculateConsCheck = new JCheckBox(); + protected JCheckBox padGaps = new JCheckBox(); + protected JCheckBox modellerOutput = new JCheckBox(); + protected JPanel dasPanel = new JPanel(); + BorderLayout borderLayout4 = new BorderLayout(); + protected JCheckBox wrap = new JCheckBox(); + protected JCheckBox rightAlign = new JCheckBox(); /** * Creates a new GPreferences object. */ @@ -154,7 +164,6 @@ public class GPreferences extends JPanel fullScreen.setFont(verdana11); fullScreen.setHorizontalAlignment(SwingConstants.RIGHT); fullScreen.setHorizontalTextPosition(SwingConstants.LEFT); - fullScreen.setMargin(new Insets(2, 2, 2, 0)); fullScreen.setText("Maximise Window"); conservation.setEnabled(false); conservation.setFont(verdana11); @@ -171,7 +180,6 @@ public class GPreferences extends JPanel annotations.setFont(verdana11); annotations.setHorizontalAlignment(SwingConstants.RIGHT); annotations.setHorizontalTextPosition(SwingConstants.LEFT); - annotations.setMargin(new Insets(2, 4, 2, 0)); annotations.setSelected(true); annotations.setText("Show Annotations"); annotations.addActionListener(new ActionListener() @@ -185,7 +193,7 @@ public class GPreferences extends JPanel gapLabel.setHorizontalAlignment(SwingConstants.RIGHT); gapLabel.setText("Gap Symbol "); colour.setFont(verdana11); - colour.setBounds(new Rectangle(172, 180, 155, 21)); + colour.setBounds(new Rectangle(172, 203, 155, 21)); colourLabel.setFont(verdana11); colourLabel.setHorizontalAlignment(SwingConstants.RIGHT); colourLabel.setText("Colour "); @@ -193,20 +201,20 @@ public class GPreferences extends JPanel fontLabel.setHorizontalAlignment(SwingConstants.RIGHT); fontLabel.setText("Font "); fontSizeCB.setFont(verdana11); - fontSizeCB.setBounds(new Rectangle(318, 100, 49, 21)); + fontSizeCB.setBounds(new Rectangle(319, 111, 49, 21)); fontStyleCB.setFont(verdana11); - fontStyleCB.setBounds(new Rectangle(366, 100, 70, 21)); + fontStyleCB.setBounds(new Rectangle(367, 111, 70, 21)); fontNameCB.setFont(verdana11); - fontNameCB.setBounds(new Rectangle(171, 100, 147, 21)); + fontNameCB.setBounds(new Rectangle(172, 111, 147, 21)); gapSymbolCB.setFont(verdana11); - gapSymbolCB.setBounds(new Rectangle(172, 153, 69, 21)); + gapSymbolCB.setBounds(new Rectangle(172, 179, 69, 21)); startupCheckbox.setText("Open file"); startupCheckbox.setFont(verdana11); startupCheckbox.setHorizontalAlignment(SwingConstants.RIGHT); startupCheckbox.setHorizontalTextPosition(SwingConstants.LEFT); startupCheckbox.setSelected(true); startupFileTextfield.setFont(verdana11); - startupFileTextfield.setBounds(new Rectangle(170, 236, 271, 20)); + startupFileTextfield.setBounds(new Rectangle(172, 249, 270, 20)); startupFileTextfield.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) @@ -304,14 +312,14 @@ public class GPreferences extends JPanel jPanel1.setBorder(titledBorder1); jPanel1.setLayout(gridBagLayout1); sortby.setFont(verdana11); - sortby.setBounds(new Rectangle(171, 208, 155, 21)); + sortby.setBounds(new Rectangle(172, 225, 155, 21)); sortLabel.setFont(verdana11); sortLabel.setHorizontalAlignment(SwingConstants.RIGHT); sortLabel.setText("Sort by "); - jPanel2.setBounds(new Rectangle(7, 17, 158, 246)); + jPanel2.setBounds(new Rectangle(7, 17, 158, 257)); jPanel2.setLayout(gridLayout2); - gridLayout2.setRows(9); - jPanel3.setBounds(new Rectangle(167, 41, 274, 26)); + gridLayout2.setRows(11); + jPanel3.setBounds(new Rectangle(169, 39, 274, 26)); exportTab.setLayout(null); epsLabel.setFont(verdana11); epsLabel.setHorizontalAlignment(SwingConstants.RIGHT); @@ -350,30 +358,52 @@ public class GPreferences extends JPanel pirjv.setHorizontalAlignment(SwingConstants.LEFT); seqLimit.setFont(verdana11); seqLimit.setHorizontalAlignment(SwingConstants.RIGHT); - seqLimit.setHorizontalTextPosition(SwingConstants.LEADING); + seqLimit.setHorizontalTextPosition(SwingConstants.LEFT); seqLimit.setText("Full Sequence Id"); gridLayout3.setRows(8); smoothFont.setFont(verdana11); smoothFont.setHorizontalAlignment(SwingConstants.RIGHT); smoothFont.setHorizontalTextPosition(SwingConstants.LEADING); smoothFont.setText("Smooth Font"); + calcTab.setLayout(null); + autoCalculateConsCheck.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + autoCalculateConsCheck.setText("AutoCalculate Consensus"); + autoCalculateConsCheck.setBounds(new Rectangle(21, 52, 209, 23)); + padGaps.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + padGaps.setText("Pad gaps when editing"); + padGaps.setBounds(new Rectangle(22, 94, 168, 23)); + modellerOutput.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + modellerOutput.setText("Use Modeller Output"); + modellerOutput.setBounds(new Rectangle(228, 226, 168, 23)); + dasPanel.setLayout(borderLayout4); + wrap.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + wrap.setHorizontalAlignment(SwingConstants.TRAILING); + wrap.setHorizontalTextPosition(SwingConstants.LEADING); + wrap.setText("Wrap Alignment"); + rightAlign.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); + rightAlign.setForeground(Color.black); + rightAlign.setHorizontalAlignment(SwingConstants.RIGHT); + rightAlign.setHorizontalTextPosition(SwingConstants.LEFT); + rightAlign.setText("Right Align Ids"); jPanel2.add(fullScreen); jPanel2.add(annotations); jPanel2.add(seqLimit); + jPanel2.add(rightAlign); jPanel2.add(fontLabel); jPanel2.add(smoothFont); + jPanel2.add(wrap); jPanel2.add(gapLabel); jPanel2.add(colourLabel); jPanel2.add(sortLabel); jPanel2.add(startupCheckbox); - visualTab.add(startupFileTextfield); - visualTab.add(sortby); - visualTab.add(colour); - visualTab.add(gapSymbolCB); visualTab.add(fontNameCB); visualTab.add(fontSizeCB); visualTab.add(fontStyleCB); + visualTab.add(startupFileTextfield); + visualTab.add(gapSymbolCB); + visualTab.add(colour); + visualTab.add(sortby); visualTab.add(jPanel3); jPanel3.add(conservation); jPanel3.add(identity); @@ -428,7 +458,7 @@ public class GPreferences extends JPanel dlcr.setHorizontalAlignment(DefaultListCellRenderer.CENTER); gapSymbolCB.setRenderer(dlcr); - tabbedPane.add(visualTab, "visualTab"); + tabbedPane.add(visualTab, "Visual"); tabbedPane.add(connectTab,"Connections"); tabbedPane.add(exportTab, "Output"); jPanel11.add(jLabel1); @@ -439,6 +469,11 @@ public class GPreferences extends JPanel jPanel11.add(pfamjv); jPanel11.add(pileupjv); jPanel11.add(pirjv); + exportTab.add(modellerOutput); + tabbedPane.add(calcTab, "Editing"); + calcTab.add(autoCalculateConsCheck); + calcTab.add(padGaps); + tabbedPane.add(dasPanel, "DAS Settings"); exportTab.add(epsLabel); exportTab.add(epsRendering);