From: amwaterhouse Date: Thu, 17 Nov 2005 15:19:20 +0000 (+0000) Subject: Hide Tab settings for build X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a94894810c6142a94239ca239ec8e800235c3b35;p=jalview.git Hide Tab settings for build --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index cfbd186..65b9a08 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -34,6 +34,7 @@ import jalview.io.*; import jalview.jbgui.*; import jalview.schemes.*; import jalview.ws.*; +import javax.swing.event.AncestorEvent; /** * DOCUMENT ME! @@ -94,21 +95,24 @@ public class AlignFrame else if(sortby.equals("Pairwise Identity")) sortPairwiseMenuItem_actionPerformed(null); - tabbedPane.add(al.isNucleotide() ? "DNA":"Protein", alignPanel); + // remove(tabbedPane); + getContentPane().add(alignPanel, BorderLayout.CENTER); + + setGUINucleotide(al.isNucleotide()); + + // tabbedPane.add(al.isNucleotide() ? "DNA":"Protein", alignPanel); ///Dataset tab ///////////////////////// - if(al.getDataset()==null) { al.setDataset(null); } - - AlignViewport ds = new AlignViewport(al.getDataset(), true); - AlignmentPanel dap = new AlignmentPanel(this, ds); - tabbedPane.add("Dataset", dap); - viewports.add(ds); - alignPanels.add(dap); + // AlignViewport ds = new AlignViewport(al.getDataset(), true); + // AlignmentPanel dap = new AlignmentPanel(this, ds); + // tabbedPane.add("Dataset", dap); + // viewports.add(ds); + // alignPanels.add(dap); ///////////////////////// @@ -123,7 +127,6 @@ public class AlignFrame } }); - if(Desktop.desktop!=null) addServiceListeners(); } @@ -162,6 +165,26 @@ public class AlignFrame } + public void setGUINucleotide(boolean nucleotide) + { + showTranslation.setVisible( nucleotide ); + sequenceFeatures.setVisible(!nucleotide ); + featureSettings.setVisible( !nucleotide ); + conservationMenuItem.setVisible( !nucleotide ); + modifyConservation.setVisible( !nucleotide ); + + //Deal with separators + //Remember AlignFrame always starts as protein + if(nucleotide) + { + viewMenu.remove(viewMenu.getItemCount()-2); + } + else + { + calculateMenu.remove(calculateMenu.getItemCount()-2); + } + } + /* Added so Castor Mapping file can obtain Jalview Version @@ -384,7 +407,9 @@ public class AlignFrame */ protected void htmlMenuItem_actionPerformed(ActionEvent e) { - new HTMLOutput(viewport); + new HTMLOutput(viewport, + alignPanel.seqPanel.seqCanvas.getSequenceRenderer(), + alignPanel.seqPanel.seqCanvas.getFeatureRenderer()); } public void createImageMap(File file, String image) @@ -2495,29 +2520,20 @@ public class AlignFrame public void showTranslation_actionPerformed(ActionEvent e) { - - if(!viewport.alignment.isNucleotide()) - return; - - viewport.showTranslation(showTranslation.isSelected()); - - if(!viewport.alignment.isNucleotide()) - return; - int s, sSize = viewport.alignment.getHeight(); SequenceI [] newSeq = new SequenceI[sSize]; int res, resSize; StringBuffer protein; - SequenceI seq; + String seq; for(s=0; s