From: jprocter Date: Wed, 14 Apr 2010 14:37:55 +0000 (+0000) Subject: profile visualizations are now logos X-Git-Tag: Release_2_5~75 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b1cf67d148cd9cca4a12d245b6dad85a0a7376c7;p=jalview.git profile visualizations are now logos --- diff --git a/schemas/jalview.xsd b/schemas/jalview.xsd index 99a4e10..bc2ad4a 100755 --- a/schemas/jalview.xsd +++ b/schemas/jalview.xsd @@ -95,7 +95,7 @@ - + Optional sequence group ID (only needs to be unique for this alignment) @@ -147,7 +147,7 @@ - + diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index d5c54b2..9c9b6b0 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -118,7 +118,7 @@ import org.biojava.dasobert.dasregistry.Das1Source; *
  • SHOW_GROUP_CONSENSUS (false) Show consensus annotation for groups in the alignment.
  • *
  • SHOW_GROUP_CONSERVATION (false) Show conservation annotation for groups in the alignment.
  • *
  • SHOW_CONSENSUS_HISTOGRAM (false) Show consensus annotation row's histogram.
  • - *
  • SHOW_CONSENSUS_PROFILE (false) Show consensus annotation row's sequence logo.
  • + *
  • SHOW_CONSENSUS_LOGO (false) Show consensus annotation row's sequence logo.
  • * *
  • * diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 871e4cf..fbcf303 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -86,14 +86,14 @@ public class SequenceGroup /** * consensus calculation property */ - private boolean showConsensusProfile=false; + private boolean showSequenceLogo=false; /** * @return the includeAllConsSymbols */ - public boolean isIncludeAllConsSymbols() + public boolean isShowSequenceLogo() { - return showConsensusProfile; + return showSequenceLogo; } @@ -470,7 +470,7 @@ public class SequenceGroup try { - Hashtable cnsns[] = AAFrequency.calculate(sequences, startRes, endRes + 1, showConsensusProfile); + Hashtable cnsns[] = AAFrequency.calculate(sequences, startRes, endRes + 1, showSequenceLogo); if (consensus != null) { _updateConsensusRow(cnsns); @@ -545,7 +545,7 @@ public class SequenceGroup consensus.annotations = null; consensus.annotations = new Annotation[aWidth]; // should be alignment width - AAFrequency.completeConsensus(consensus,cnsns,startRes,endRes+1,ignoreGapsInConsensus, showConsensusProfile); // TODO: setting container for ignoreGapsInConsensusCalculation); + AAFrequency.completeConsensus(consensus,cnsns,startRes,endRes+1,ignoreGapsInConsensus, showSequenceLogo); // TODO: setting container for ignoreGapsInConsensusCalculation); } /** @@ -1031,11 +1031,11 @@ public class SequenceGroup */ public void setIncludeAllConsSymbols(boolean includeAllConsSymbols) { - if (this.showConsensusProfile!=includeAllConsSymbols && consensus!=null) { - this.showConsensusProfile = includeAllConsSymbols; + if (this.showSequenceLogo!=includeAllConsSymbols && consensus!=null) { + this.showSequenceLogo = includeAllConsSymbols; recalcConservation(); } - this.showConsensusProfile = includeAllConsSymbols; + this.showSequenceLogo = includeAllConsSymbols; } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 5529f2c..aef8961 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -656,7 +656,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, showGroupConsensus.setSelected(av.showGroupConsensus); showGroupConservation.setSelected(av.showGroupConservation); showConsensusHistogram.setSelected(av.showConsensusHistogram); - showConsensusProfile.setSelected(av.showConsensusProfile); + showSequenceLogo.setSelected(av.showSequenceLogo); setColourSelected(ColourSchemeProperty.getColourName(av .getGlobalColourScheme())); @@ -4521,9 +4521,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, /* (non-Javadoc) * @see jalview.jbgui.GAlignFrame#showConsensusProfile_actionPerformed(java.awt.event.ActionEvent) */ - protected void showConsensusProfile_actionPerformed(ActionEvent e) + protected void showSequenceLogo_actionPerformed(ActionEvent e) { - viewport.setShowConsensusProfile(showConsensusProfile.getState()); + viewport.setShowSequenceLogo(showSequenceLogo.getState()); alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState()); } protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e) diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 4acd086..fd1fa7d 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -358,7 +358,7 @@ public class AlignViewport implements SelectionSource } } showConsensusHistogram = Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM", true); - showConsensusProfile = Cache.getDefault("SHOW_CONSENSUS_PROFILE", false); + showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false); showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false); // TODO: add menu option action that nulls or creates consensus object depending on if the user wants to see the annotation or not in a specific alignment consensus = new AlignmentAnnotation("Consensus", "PID", @@ -2099,7 +2099,7 @@ public class AlignViewport implements SelectionSource /** * should consensus profile be rendered by default */ - public boolean showConsensusProfile = false; + public boolean showSequenceLogo = false; /** * should consensus histograms be rendered by default */ @@ -2107,16 +2107,16 @@ public class AlignViewport implements SelectionSource /** * @return the showConsensusProfile */ - public boolean isShowConsensusProfile() + public boolean isShowSequenceLogo() { - return showConsensusProfile; + return showSequenceLogo; } /** - * @param showConsensusProfile the showConsensusProfile to set + * @param showSequenceLogo the new value */ - public void setShowConsensusProfile(boolean showConsensusProfile) + public void setShowSequenceLogo(boolean showSequenceLogo) { - this.showConsensusProfile = showConsensusProfile; + this.showSequenceLogo = showSequenceLogo; } /** * @param showConsensusHistogram the showConsensusHistogram to set diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 99c7c72..9626e80 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1329,7 +1329,7 @@ public class AlignmentPanel extends GAlignmentPanel implements boolean updateCalcs = false; boolean conv = av.isShowGroupConservation(); boolean cons = av.isShowGroupConsensus(); - boolean showprf = av.isShowConsensusProfile(); + boolean showprf = av.isShowSequenceLogo(); boolean showConsHist = av.isShowConsensusHistogram(); boolean sortg = true; diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 61b9c31..87955b0 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -565,7 +565,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, pop.add(chist); final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem( "Show Group Logo", aa[selectedRow].groupRef - .isIncludeAllConsSymbols()); + .isShowSequenceLogo()); cprof.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -602,7 +602,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, }); pop.add(chist); final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem( - "Show Logo", av.isShowConsensusProfile()); + "Show Logo", av.isShowSequenceLogo()); cprof.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -613,7 +613,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, // view // can be // updated. - av.setShowConsensusProfile(cprof.getState()); + av.setShowSequenceLogo(cprof.getState()); ap.repaint(); // ap.annotationPanel.paint(ap.annotationPanel.getGraphics()); } diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index b196444..695eced 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -1315,10 +1315,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, if (aa.groupRef!=null) { renderHistogram = aa.groupRef.isShowConsensusHistogram(); - renderProfile = aa.groupRef.isIncludeAllConsSymbols(); + renderProfile = aa.groupRef.isShowSequenceLogo(); } else { renderHistogram = av.isShowConsensusHistogram(); - renderProfile = av.isShowConsensusProfile(); + renderProfile = av.isShowSequenceLogo(); } } while (x < eRes - sRes) @@ -1413,11 +1413,11 @@ public class AnnotationPanel extends JPanel implements MouseListener, private int[] getProfileFor(AlignmentAnnotation aa, int column) { if (aa.autoCalculated && aa.label.startsWith("Consensus")) { - if (aa.groupRef!=null && aa.groupRef.consensusData!=null && aa.groupRef.isIncludeAllConsSymbols()) { + if (aa.groupRef!=null && aa.groupRef.consensusData!=null && aa.groupRef.isShowSequenceLogo()) { return AAFrequency.extractProfile(aa.groupRef.consensusData[column],aa.groupRef.getIgnoreGapsConsensus()); } // TODO extend annotation row to enable dynamic and static profile data to be stored - if (aa.groupRef==null && aa.sequenceRef==null && av.isShowConsensusProfile()) + if (aa.groupRef==null && aa.sequenceRef==null && av.isShowSequenceLogo()) { return AAFrequency.extractProfile(av.hconsensus[column],av.getIgnoreGapsConsensus()); } diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index 51e26b8..c952ea0 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -947,7 +947,7 @@ public class Jalview2XML groups[i].setShowUnconserved(sg.getShowunconserved()); groups[i].setIgnoreGapsinConsensus(sg.getIgnoreGapsConsensus()); groups[i].setShowConsensusHistogram(sg.isShowConsensusHistogram()); - groups[i].setShowConsensusProfile(sg.isIncludeAllConsSymbols()); + groups[i].setShowSequenceLogo(sg.isShowSequenceLogo()); for (int s = 0; s < sg.getSize(); s++) { jalview.datamodel.Sequence seq = (jalview.datamodel.Sequence) sg @@ -1060,7 +1060,7 @@ public class Jalview2XML view.setTextCol2(av.textColour2.getRGB()); view.setTextColThreshold(av.thresholdTextColour); view.setShowConsensusHistogram(av.isShowConsensusHistogram()); - view.setShowConsensusProfile(av.isShowConsensusProfile()); + view.setShowSequenceLogo(av.isShowSequenceLogo()); view.setShowGroupConsensus(av.isShowGroupConsensus()); view.setShowGroupConservation(av.isShowGroupConservation()); view.setShowNPfeatureTooltip(av.isShowNpFeats()); @@ -2229,8 +2229,8 @@ public class Jalview2XML if (groups[i].hasShowConsensusHistogram()) { sg.setShowConsensusHistogram(groups[i].isShowConsensusHistogram()); }; - if (groups[i].hasShowConsensusProfile()) { - sg.setIncludeAllConsSymbols(groups[i].isShowConsensusProfile()); + if (groups[i].hasShowSequenceLogo()) { + sg.setIncludeAllConsSymbols(groups[i].isShowSequenceLogo()); } if (groups[i].hasIgnoreGapsinConsensus()) { @@ -2811,10 +2811,14 @@ public class Jalview2XML if (view.hasShowConsensusHistogram()) { af.viewport.setShowConsensusHistogram(view.getShowConsensusHistogram()); + } else { + af.viewport.setShowConsensusHistogram(true); } - if (view.hasShowConsensusProfile()) + if (view.hasShowSequenceLogo()) { - af.viewport.setShowConsensusProfile(view.getShowConsensusProfile()); + af.viewport.setShowSequenceLogo(view.getShowSequenceLogo()); + } else { + af.viewport.setShowSequenceLogo(false); } if (view.hasShowDbRefTooltip()) { @@ -2827,10 +2831,14 @@ public class Jalview2XML if (view.hasShowGroupConsensus()) { af.viewport.setShowGroupConsensus(view.getShowGroupConsensus()); + } else { + af.viewport.setShowGroupConsensus(false); } if (view.hasShowGroupConservation()) { af.viewport.setShowGroupConservation(view.getShowGroupConservation()); + } else { + af.viewport.setShowGroupConservation(false); } // recover featre settings diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 88f438e..f8ad900 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -201,7 +201,7 @@ public class Preferences extends GPreferences showGroupConsensus.setSelected(Cache.getDefault("SHOW_GROUP_CONSENSUS",false)); showGroupConservation.setSelected(Cache.getDefault("SHOW_GROUP_CONSERVATION", false)); showConsensHistogram.setSelected(Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM",true)); - showConsensProfile.setSelected(Cache.getDefault("SHOW_CONSENSUS_PROFILE",false)); + showConsensLogo.setSelected(Cache.getDefault("SHOW_CONSENSUS_LOGO",false)); padGaps.setSelected(Cache.getDefault("PAD_GAPS", false)); @@ -285,7 +285,7 @@ public class Preferences extends GPreferences Cache.applicationProperties.setProperty("SHOW_GROUP_CONSENSUS",Boolean.toString(showGroupConsensus.isSelected())); Cache.applicationProperties.setProperty("SHOW_GROUP_CONSERVATION",Boolean.toString(showGroupConservation.isSelected())); Cache.applicationProperties.setProperty("SHOW_CONSENSUS_HISTOGRAM",Boolean.toString(showConsensHistogram.isSelected())); - Cache.applicationProperties.setProperty("SHOW_CONSENSUS_PROFILE",Boolean.toString(showConsensProfile.isSelected())); + Cache.applicationProperties.setProperty("SHOW_CONSENSUS_LOGO",Boolean.toString(showConsensLogo.isSelected())); Cache.applicationProperties.setProperty("ANTI_ALIAS", Boolean .toString(smoothFont.isSelected())); @@ -476,10 +476,10 @@ public class Preferences extends GPreferences conservation.setEnabled(annotations.isSelected()); quality.setEnabled(annotations.isSelected()); identity.setEnabled(annotations.isSelected()); - showConsensHistogram.setEnabled(annotations.isSelected()); - showConsensProfile.setEnabled(annotations.isSelected()); showGroupConsensus.setEnabled(annotations.isSelected()); showGroupConservation.setEnabled(annotations.isSelected()); + showConsensHistogram.setEnabled(annotations.isSelected() && (identity.isSelected() || showGroupConsensus.isSelected())); + showConsensLogo.setEnabled(annotations.isSelected() && (identity.isSelected() || showGroupConsensus.isSelected())); } public void newLink_actionPerformed(ActionEvent e) diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index a89228e..6a91cc4 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -289,7 +289,7 @@ public class GAlignFrame extends JInternalFrame protected JCheckBoxMenuItem showGroupConsensus=new JCheckBoxMenuItem(); protected JCheckBoxMenuItem showGroupConservation=new JCheckBoxMenuItem(); protected JCheckBoxMenuItem showConsensusHistogram=new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem showConsensusProfile=new JCheckBoxMenuItem(); + protected JCheckBoxMenuItem showSequenceLogo=new JCheckBoxMenuItem(); protected JCheckBoxMenuItem applyAutoAnnotationSettings=new JCheckBoxMenuItem(); private JMenuItem grpsFromSelection = new JMenuItem(); @@ -1039,13 +1039,13 @@ public class GAlignFrame extends JInternalFrame } }); - showConsensusProfile.setText("Show Consensus Logo"); - showConsensusProfile.addActionListener(new ActionListener() + showSequenceLogo.setText("Show Consensus Logo"); + showSequenceLogo.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - showConsensusProfile_actionPerformed(e); + showSequenceLogo_actionPerformed(e); } }); @@ -1652,7 +1652,7 @@ public class GAlignFrame extends JInternalFrame viewMenu.add(annotationPanelMenuItem); autoAnnMenu.add(applyAutoAnnotationSettings); autoAnnMenu.add(showConsensusHistogram); - autoAnnMenu.add(showConsensusProfile); + autoAnnMenu.add(showSequenceLogo); autoAnnMenu.addSeparator(); autoAnnMenu.add(showGroupConservation); autoAnnMenu.add(showGroupConsensus); @@ -1765,7 +1765,7 @@ public class GAlignFrame extends JInternalFrame } - protected void showConsensusProfile_actionPerformed(ActionEvent e) + protected void showSequenceLogo_actionPerformed(ActionEvent e) { // TODO Auto-generated method stub diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 6b2c0f4..7bd8f53 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -136,11 +136,11 @@ public class GPreferences extends JPanel GridLayout gridLayout2 = new GridLayout(); - JPanel jPanel3 = new JPanel(); + JPanel annsettingsPanel = new JPanel(); JPanel autoAnnotSettings1 = new JPanel(); - JPanel autoAnnotSettings2 = new JPanel(); + JPanel autoAnnotSettings3 = new JPanel(); JPanel exportTab = new JPanel(); @@ -202,10 +202,13 @@ public class GPreferences extends JPanel protected JCheckBox versioncheck = new JCheckBox(); protected JLabel showGroupbits = new JLabel(); protected JLabel showConsensbits = new JLabel(); - protected JCheckBox showConsensProfile = new JCheckBox(); + protected JCheckBox showConsensLogo = new JCheckBox(); protected JCheckBox showConsensHistogram = new JCheckBox(); protected JCheckBox showGroupConsensus = new JCheckBox(); protected JCheckBox showGroupConservation = new JCheckBox(); + protected JCheckBox shareSelections = new JCheckBox(); + protected JCheckBox followHighlight = new JCheckBox(); + /** * Creates a new GPreferences object. @@ -273,7 +276,7 @@ public class GPreferences extends JPanel showGroupbits.setFont(verdana11); showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT); showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT); - showGroupbits.setText("Group:"); + showGroupbits.setText("Show group:"); showConsensbits.setFont(verdana11); showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT); showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT); @@ -284,12 +287,12 @@ public class GPreferences extends JPanel showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT); showConsensHistogram.setSelected(true); showConsensHistogram.setText("Histogram"); - showConsensProfile.setEnabled(false); - showConsensProfile.setFont(verdana11); - showConsensProfile.setHorizontalAlignment(SwingConstants.RIGHT); - showConsensProfile.setHorizontalTextPosition(SwingConstants.LEFT); - showConsensProfile.setSelected(true); - showConsensProfile.setText("Profile"); + showConsensLogo.setEnabled(false); + showConsensLogo.setFont(verdana11); + showConsensLogo.setHorizontalAlignment(SwingConstants.RIGHT); + showConsensLogo.setHorizontalTextPosition(SwingConstants.LEFT); + showConsensLogo.setSelected(true); + showConsensLogo.setText("Logo"); showGroupConsensus.setEnabled(false); showGroupConsensus.setFont(verdana11); showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT); @@ -304,9 +307,10 @@ public class GPreferences extends JPanel showGroupConservation.setText("Conservation"); annotations.setFont(verdana11); annotations.setHorizontalAlignment(SwingConstants.RIGHT); - annotations.setHorizontalTextPosition(SwingConstants.LEFT); + annotations.setHorizontalTextPosition(SwingConstants.LEADING); annotations.setSelected(true); annotations.setText("Show Annotations"); + annotations.setBounds(new Rectangle(169, 16, 200, 23)); annotations.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -314,6 +318,20 @@ public class GPreferences extends JPanel annotations_actionPerformed(e); } }); + identity.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + annotations_actionPerformed(e); + } + }); + showGroupConsensus.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + annotations_actionPerformed(e); + } + }); showUnconserved.setFont(verdana11); showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT); showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT); @@ -327,6 +345,18 @@ public class GPreferences extends JPanel showunconserved_actionPerformed(e); } }); + shareSelections.setFont(verdana11); + shareSelections.setHorizontalAlignment(SwingConstants.RIGHT); + shareSelections.setHorizontalTextPosition(SwingConstants.LEFT); + //showUnconserved.setBounds(new Rectangle(169, 40, 200, 23)); + shareSelections.setSelected(true); + shareSelections.setText("Share selection across views"); + followHighlight.setFont(verdana11); + followHighlight.setHorizontalAlignment(SwingConstants.RIGHT); + followHighlight.setHorizontalTextPosition(SwingConstants.LEFT); + //showUnconserved.setBounds(new Rectangle(169, 40, 200, 23)); + followHighlight.setSelected(true); + followHighlight.setText("Scroll to highlighted regions"); gapLabel.setFont(verdana11); gapLabel.setHorizontalAlignment(SwingConstants.RIGHT); @@ -476,9 +506,11 @@ public class GPreferences extends JPanel jPanel2.setBounds(new Rectangle(7, 17, 158, 278)); jPanel2.setLayout(gridLayout2); gridLayout2.setRows(13); - jPanel3.setBounds(new Rectangle(173, 35, 274, 26)); - autoAnnotSettings1.setBounds(new Rectangle(173,53,274,26));// new Rectangle(173, 116, 274, 78)); - autoAnnotSettings2.setBounds(new Rectangle(173,72,274,26)); + // jPanel3.setBounds(new Rectangle(173, 35, 274, 26)); + //jPanel3.setBounds(new Rectangle(173, 35, 274, 78)); + //jPanel3.setLayout(new GridLayout(3,3)); +// autoAnnotSettings1.setBounds(new Rectangle(173,53,274,26));// new Rectangle(173, 116, 274, 78)); +// autoAnnotSettings2.setBounds(new Rectangle(173,72,274,26)); exportTab.setLayout(null); epsLabel.setFont(verdana11); epsLabel.setHorizontalAlignment(SwingConstants.RIGHT); @@ -552,11 +584,10 @@ public class GPreferences extends JPanel openoverv.setFont(new java.awt.Font("Verdana", Font.PLAIN, 11)); openoverv.setActionCommand("Open Overview"); openoverv.setHorizontalAlignment(SwingConstants.RIGHT); - openoverv.setHorizontalTextPosition(SwingConstants.LEADING); - openoverv.setText("Open Overview Window"); - openoverv.setBounds(new Rectangle(169, 17, 200, 23)); + openoverv.setHorizontalTextPosition(SwingConstants.LEFT); + openoverv.setText("Open Overview"); jPanel2.add(fullScreen); - jPanel2.add(annotations); + jPanel2.add(openoverv); jPanel2.add(seqLimit); jPanel2.add(rightAlign); jPanel2.add(fontLabel); @@ -568,28 +599,53 @@ public class GPreferences extends JPanel jPanel2.add(colourLabel); jPanel2.add(sortLabel); jPanel2.add(startupCheckbox); - visualTab.add(openoverv); + visualTab.add(annotations); visualTab.add(startupFileTextfield); visualTab.add(sortby); visualTab.add(colour); visualTab.add(gapSymbolCB); - visualTab.add(jPanel3); visualTab.add(fontNameCB); visualTab.add(fontSizeCB); visualTab.add(fontStyleCB); - visualTab.add(autoAnnotSettings1); - visualTab.add(autoAnnotSettings2); - jPanel3.add(conservation); - jPanel3.add(identity); - jPanel3.add(quality); - autoAnnotSettings1.setLayout(new FlowLayout()); - autoAnnotSettings2.setLayout(new FlowLayout()); - autoAnnotSettings1.add(showConsensbits); - autoAnnotSettings1.add(showConsensHistogram); - autoAnnotSettings1.add(showConsensProfile); - autoAnnotSettings2.add(showGroupbits); - autoAnnotSettings2.add(showGroupConsensus); + annsettingsPanel.setBounds(new Rectangle(173,39,300,62)); + annsettingsPanel.setLayout(new FlowLayout(FlowLayout.LEFT,0,0)); + annsettingsPanel.add(autoAnnotSettings1); + annsettingsPanel.add(autoAnnotSettings2); + annsettingsPanel.add(autoAnnotSettings3); + autoAnnotSettings1.setLayout(new GridLayout(3,1,0,0)); +// autoAnnotSettings1.setPreferredSize(new Dimensions()) + autoAnnotSettings2.setLayout(new GridLayout(3,1,0,0)); + autoAnnotSettings3.setLayout(new GridLayout(3,1,0,0)); + visualTab.add(annsettingsPanel); + //visualTab.add(autoAnnotSettings1); + //visualTab.add(autoAnnotSettings2); + Border jb = new EmptyBorder(1,1,4,5); + quality.setBorder(jb); + conservation.setBorder(jb); + identity.setBorder(jb); + showConsensbits.setBorder(jb); + showGroupbits.setBorder(jb); + showGroupConsensus.setBorder(jb); + showGroupConservation.setBorder(jb); + showConsensHistogram.setBorder(jb); + showConsensLogo.setBorder(jb); + + autoAnnotSettings2.add(conservation); + autoAnnotSettings1.add(quality); + autoAnnotSettings3.add(identity); + + /*FlowLayout fl = new FlowLayout(); + fl.setAlignment(FlowLayout.LEFT); + autoAnnotSettings1.setLayout(fl); + fl = new FlowLayout(); + fl.setAlignment(FlowLayout.LEFT); + autoAnnotSettings2.setLayout(fl); */ + autoAnnotSettings1.add(showGroupbits); + autoAnnotSettings3.add(showGroupConsensus); autoAnnotSettings2.add(showGroupConservation); + autoAnnotSettings1.add(showConsensbits); + autoAnnotSettings2.add(showConsensHistogram); + autoAnnotSettings3.add(showConsensLogo); visualTab.add(jPanel2); linkPanel.add(editLinkButtons, BorderLayout.EAST); diff --git a/src/jalview/schemabinding/version2/.castor.cdr b/src/jalview/schemabinding/version2/.castor.cdr index 3c1ae95..ab2550b 100644 --- a/src/jalview/schemabinding/version2/.castor.cdr +++ b/src/jalview/schemabinding/version2/.castor.cdr @@ -1,4 +1,4 @@ -#Mon Apr 05 11:52:37 BST 2010 +#Wed Apr 14 11:41:13 BST 2010 jalview.schemabinding.version2.ThresholdLine=jalview.schemabinding.version2.descriptors.ThresholdLineDescriptor jalview.schemabinding.version2.SequenceSetProperties=jalview.schemabinding.version2.descriptors.SequenceSetPropertiesDescriptor jalview.schemabinding.version2.StructureState=jalview.schemabinding.version2.descriptors.StructureStateDescriptor @@ -33,12 +33,12 @@ jalview.schemabinding.version2.MapListFrom=jalview.schemabinding.version2.descri jalview.schemabinding.version2.PdbentryItem=jalview.schemabinding.version2.descriptors.PdbentryItemDescriptor jalview.schemabinding.version2.FeatureSettings=jalview.schemabinding.version2.descriptors.FeatureSettingsDescriptor jalview.schemabinding.version2.JGroup=jalview.schemabinding.version2.descriptors.JGroupDescriptor -jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor -jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor jalview.schemabinding.version2.MapListTo=jalview.schemabinding.version2.descriptors.MapListToDescriptor +jalview.schemabinding.version2.JalviewUserColours=jalview.schemabinding.version2.descriptors.JalviewUserColoursDescriptor +jalview.schemabinding.version2.VamsasModel=jalview.schemabinding.version2.descriptors.VamsasModelDescriptor jalview.schemabinding.version2.Pdbentry=jalview.schemabinding.version2.descriptors.PdbentryDescriptor jalview.schemabinding.version2.HiddenColumns=jalview.schemabinding.version2.descriptors.HiddenColumnsDescriptor -jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor jalview.schemabinding.version2.DseqFor=jalview.schemabinding.version2.descriptors.DseqForDescriptor +jalview.schemabinding.version2.Features=jalview.schemabinding.version2.descriptors.FeaturesDescriptor jalview.schemabinding.version2.VAMSAS=jalview.schemabinding.version2.descriptors.VAMSASDescriptor jalview.schemabinding.version2.MappingChoiceItem=jalview.schemabinding.version2.descriptors.MappingChoiceItemDescriptor diff --git a/src/jalview/schemabinding/version2/JGroup.java b/src/jalview/schemabinding/version2/JGroup.java index c25de2b..e75a332 100755 --- a/src/jalview/schemabinding/version2/JGroup.java +++ b/src/jalview/schemabinding/version2/JGroup.java @@ -188,14 +188,14 @@ public class JGroup implements java.io.Serializable { private boolean _has_showConsensusHistogram; /** - * Field _showConsensusProfile. + * Field _showSequenceLogo. */ - private boolean _showConsensusProfile = false; + private boolean _showSequenceLogo = false; /** - * keeps track of state for field: _showConsensusProfile + * keeps track of state for field: _showSequenceLogo */ - private boolean _has_showConsensusProfile; + private boolean _has_showSequenceLogo; /** * Optional sequence group ID (only needs to be unique for this @@ -317,9 +317,9 @@ public class JGroup implements java.io.Serializable { /** */ - public void deleteShowConsensusProfile( + public void deleteShowSequenceLogo( ) { - this._has_showConsensusProfile= false; + this._has_showSequenceLogo= false; } /** @@ -535,13 +535,13 @@ public class JGroup implements java.io.Serializable { } /** - * Returns the value of field 'showConsensusProfile'. + * Returns the value of field 'showSequenceLogo'. * - * @return the value of field 'ShowConsensusProfile'. + * @return the value of field 'ShowSequenceLogo'. */ - public boolean getShowConsensusProfile( + public boolean getShowSequenceLogo( ) { - return this._showConsensusProfile; + return this._showSequenceLogo; } /** @@ -687,14 +687,13 @@ public class JGroup implements java.io.Serializable { } /** - * Method hasShowConsensusProfile. + * Method hasShowSequenceLogo. * - * @return true if at least one ShowConsensusProfile has been - * added + * @return true if at least one ShowSequenceLogo has been added */ - public boolean hasShowConsensusProfile( + public boolean hasShowSequenceLogo( ) { - return this._has_showConsensusProfile; + return this._has_showSequenceLogo; } /** @@ -798,13 +797,13 @@ public class JGroup implements java.io.Serializable { } /** - * Returns the value of field 'showConsensusProfile'. + * Returns the value of field 'showSequenceLogo'. * - * @return the value of field 'ShowConsensusProfile'. + * @return the value of field 'ShowSequenceLogo'. */ - public boolean isShowConsensusProfile( + public boolean isShowSequenceLogo( ) { - return this._showConsensusProfile; + return this._showSequenceLogo; } /** @@ -1065,15 +1064,14 @@ public class JGroup implements java.io.Serializable { } /** - * Sets the value of field 'showConsensusProfile'. + * Sets the value of field 'showSequenceLogo'. * - * @param showConsensusProfile the value of field - * 'showConsensusProfile'. + * @param showSequenceLogo the value of field 'showSequenceLogo' */ - public void setShowConsensusProfile( - final boolean showConsensusProfile) { - this._showConsensusProfile = showConsensusProfile; - this._has_showConsensusProfile = true; + public void setShowSequenceLogo( + final boolean showSequenceLogo) { + this._showSequenceLogo = showSequenceLogo; + this._has_showSequenceLogo = true; } /** diff --git a/src/jalview/schemabinding/version2/Viewport.java b/src/jalview/schemabinding/version2/Viewport.java index 7dbeedd..b7f14f5 100755 --- a/src/jalview/schemabinding/version2/Viewport.java +++ b/src/jalview/schemabinding/version2/Viewport.java @@ -268,14 +268,14 @@ public class Viewport implements java.io.Serializable { private boolean _has_showConsensusHistogram; /** - * Field _showConsensusProfile. + * Field _showSequenceLogo. */ - private boolean _showConsensusProfile = false; + private boolean _showSequenceLogo = false; /** - * keeps track of state for field: _showConsensusProfile + * keeps track of state for field: _showSequenceLogo */ - private boolean _has_showConsensusProfile; + private boolean _has_showSequenceLogo; /** * Field _ignoreGapsinConsensus. @@ -610,13 +610,6 @@ public class Viewport implements java.io.Serializable { /** */ - public void deleteShowConsensusProfile( - ) { - this._has_showConsensusProfile= false; - } - - /** - */ public void deleteShowDbRefTooltip( ) { this._has_showDbRefTooltip= false; @@ -659,6 +652,13 @@ public class Viewport implements java.io.Serializable { /** */ + public void deleteShowSequenceLogo( + ) { + this._has_showSequenceLogo= false; + } + + /** + */ public void deleteShowText( ) { this._has_showText= false; @@ -1026,16 +1026,6 @@ public class Viewport implements java.io.Serializable { } /** - * Returns the value of field 'showConsensusProfile'. - * - * @return the value of field 'ShowConsensusProfile'. - */ - public boolean getShowConsensusProfile( - ) { - return this._showConsensusProfile; - } - - /** * Returns the value of field 'showDbRefTooltip'. * * @return the value of field 'ShowDbRefTooltip'. @@ -1096,6 +1086,16 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'showSequenceLogo'. + * + * @return the value of field 'ShowSequenceLogo'. + */ + public boolean getShowSequenceLogo( + ) { + return this._showSequenceLogo; + } + + /** * Returns the value of field 'showText'. * * @return the value of field 'ShowText'. @@ -1409,17 +1409,6 @@ public class Viewport implements java.io.Serializable { } /** - * Method hasShowConsensusProfile. - * - * @return true if at least one ShowConsensusProfile has been - * added - */ - public boolean hasShowConsensusProfile( - ) { - return this._has_showConsensusProfile; - } - - /** * Method hasShowDbRefTooltip. * * @return true if at least one ShowDbRefTooltip has been added @@ -1483,6 +1472,16 @@ public class Viewport implements java.io.Serializable { } /** + * Method hasShowSequenceLogo. + * + * @return true if at least one ShowSequenceLogo has been added + */ + public boolean hasShowSequenceLogo( + ) { + return this._has_showSequenceLogo; + } + + /** * Method hasShowText. * * @return true if at least one ShowText has been added @@ -1723,16 +1722,6 @@ public class Viewport implements java.io.Serializable { } /** - * Returns the value of field 'showConsensusProfile'. - * - * @return the value of field 'ShowConsensusProfile'. - */ - public boolean isShowConsensusProfile( - ) { - return this._showConsensusProfile; - } - - /** * Returns the value of field 'showDbRefTooltip'. * * @return the value of field 'ShowDbRefTooltip'. @@ -1793,6 +1782,16 @@ public class Viewport implements java.io.Serializable { } /** + * Returns the value of field 'showSequenceLogo'. + * + * @return the value of field 'ShowSequenceLogo'. + */ + public boolean isShowSequenceLogo( + ) { + return this._showSequenceLogo; + } + + /** * Returns the value of field 'showText'. * * @return the value of field 'ShowText'. @@ -2192,18 +2191,6 @@ public class Viewport implements java.io.Serializable { } /** - * Sets the value of field 'showConsensusProfile'. - * - * @param showConsensusProfile the value of field - * 'showConsensusProfile'. - */ - public void setShowConsensusProfile( - final boolean showConsensusProfile) { - this._showConsensusProfile = showConsensusProfile; - this._has_showConsensusProfile = true; - } - - /** * Sets the value of field 'showDbRefTooltip'. * * @param showDbRefTooltip the value of field 'showDbRefTooltip' @@ -2274,6 +2261,17 @@ public class Viewport implements java.io.Serializable { } /** + * Sets the value of field 'showSequenceLogo'. + * + * @param showSequenceLogo the value of field 'showSequenceLogo' + */ + public void setShowSequenceLogo( + final boolean showSequenceLogo) { + this._showSequenceLogo = showSequenceLogo; + this._has_showSequenceLogo = true; + } + + /** * Sets the value of field 'showText'. * * @param showText the value of field 'showText'. diff --git a/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java index 2cc969b..08aeae8 100644 --- a/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/JGroupDescriptor.java @@ -738,15 +738,15 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _showConsensusProfile - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showConsensusProfile", "showConsensusProfile", org.exolab.castor.xml.NodeType.Attribute); + //-- _showSequenceLogo + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceLogo", "showSequenceLogo", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { JGroup target = (JGroup) object; - if (!target.hasShowConsensusProfile()) { return null; } - return (target.getShowConsensusProfile() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasShowSequenceLogo()) { return null; } + return (target.getShowSequenceLogo() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -755,10 +755,10 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip JGroup target = (JGroup) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteShowConsensusProfile(); + target.deleteShowSequenceLogo(); return; } - target.setShowConsensusProfile( ((java.lang.Boolean) value).booleanValue()); + target.setShowSequenceLogo( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -771,7 +771,7 @@ public class JGroupDescriptor extends org.exolab.castor.xml.util.XMLClassDescrip desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _showConsensusProfile + //-- validation code for: _showSequenceLogo fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.BooleanValidator typeValidator; diff --git a/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java index cad1109..7c7bc04 100644 --- a/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java +++ b/src/jalview/schemabinding/version2/descriptors/ViewportDescriptor.java @@ -1054,15 +1054,15 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr fieldValidator.setValidator(typeValidator); } desc.setValidator(fieldValidator); - //-- _showConsensusProfile - desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showConsensusProfile", "showConsensusProfile", org.exolab.castor.xml.NodeType.Attribute); + //-- _showSequenceLogo + desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_showSequenceLogo", "showSequenceLogo", org.exolab.castor.xml.NodeType.Attribute); handler = new org.exolab.castor.xml.XMLFieldHandler() { public java.lang.Object getValue( java.lang.Object object ) throws IllegalStateException { Viewport target = (Viewport) object; - if (!target.hasShowConsensusProfile()) { return null; } - return (target.getShowConsensusProfile() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); + if (!target.hasShowSequenceLogo()) { return null; } + return (target.getShowSequenceLogo() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE); } public void setValue( java.lang.Object object, java.lang.Object value) throws IllegalStateException, IllegalArgumentException @@ -1071,10 +1071,10 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr Viewport target = (Viewport) object; // if null, use delete method for optional primitives if (value == null) { - target.deleteShowConsensusProfile(); + target.deleteShowSequenceLogo(); return; } - target.setShowConsensusProfile( ((java.lang.Boolean) value).booleanValue()); + target.setShowSequenceLogo( ((java.lang.Boolean) value).booleanValue()); } catch (java.lang.Exception ex) { throw new IllegalStateException(ex.toString()); } @@ -1087,7 +1087,7 @@ public class ViewportDescriptor extends org.exolab.castor.xml.util.XMLClassDescr desc.setMultivalued(false); addFieldDescriptor(desc); - //-- validation code for: _showConsensusProfile + //-- validation code for: _showSequenceLogo fieldValidator = new org.exolab.castor.xml.FieldValidator(); { //-- local scope org.exolab.castor.xml.validators.BooleanValidator typeValidator;