X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGAlignFrame.java;h=8aa5159c513a23e422650bc3ed8b8e9cb15e2428;hb=fb4c54617dd9c5ac605853551478596902f34541;hp=f0e5e67163a615c31ffd64b536a771d1f940318a;hpb=a9ef2d2b865889e9f75faf8e14597c8f508d0ce1;p=jalview.git diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index f0e5e67..8aa5159 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -23,6 +23,7 @@ import java.awt.event.*; import javax.swing.*; import jalview.schemes.*; +import java.awt.BorderLayout; public class GAlignFrame extends JInternalFrame @@ -113,18 +114,29 @@ public class GAlignFrame protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem(); protected ButtonGroup colours = new ButtonGroup(); JMenuItem vamsasStore = new JMenuItem(); - protected JCheckBoxMenuItem showTranslation = new JCheckBoxMenuItem(); - //protected JTabbedPane tabbedPane = new JTabbedPane(); + protected JMenuItem showTranslation = new JMenuItem(); public JMenuItem featureSettings = new JMenuItem(); JMenuItem fetchSequence = new JMenuItem(); protected JCheckBoxMenuItem smoothFont = new JCheckBoxMenuItem(); JMenuItem annotationColour = new JMenuItem(); - JMenuItem fetchSeqFeatures = new JMenuItem(); - - - JMenuItem associatedData = new JMenuItem(); protected JCheckBoxMenuItem autoCalculate = new JCheckBoxMenuItem(); + JMenu addSequenceMenu = new JMenu(); + JMenuItem addFromFile = new JMenuItem(); + JMenuItem addFromText = new JMenuItem(); + JMenuItem addFromURL = new JMenuItem(); + JMenuItem exportAnnotations = new JMenuItem(); + JMenuItem exportFeatures = new JMenuItem(); + protected JPanel statusPanel = new JPanel(); + GridLayout gridLayout1 = new GridLayout(); + JMenu jMenu3 = new JMenu(); + JMenuItem showAllSeqs = new JMenuItem(); + JMenuItem showAllColumns = new JMenuItem(); + JMenu jMenu4 = new JMenu(); + JMenuItem hideSelSequences = new JMenuItem(); + JMenuItem hideSelColumns = new JMenuItem(); + protected JCheckBoxMenuItem hiddenMarkers = new JCheckBoxMenuItem(); + public GAlignFrame() { @@ -135,7 +147,7 @@ public class GAlignFrame setJMenuBar(alignFrameMenuBar); // dynamically fill save as menu with available formats - for (int i = 0; i < jalview.io.FormatAdapter.formats.size(); i++) + for (int i = 0; i < jalview.io.FormatAdapter.formats.size()-1; i++) { JMenuItem item = new JMenuItem( (String) jalview.io.FormatAdapter.formats. elementAt( @@ -896,6 +908,7 @@ public class GAlignFrame jMenu2.setText("Export"); padGapsMenuitem.setText("Pad Gaps"); + padGapsMenuitem.setState( jalview.bin.Cache.getDefault("PAD_GAPS", false)); padGapsMenuitem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -962,14 +975,6 @@ public class GAlignFrame annotationColour_actionPerformed(e); } }); - fetchSeqFeatures.setText("Fetch Sequence Features"); - fetchSeqFeatures.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - fetchSeqFeatures_actionPerformed(e); - } - }); associatedData.setText("Load Features / Annotations"); associatedData.addActionListener(new ActionListener() { @@ -979,7 +984,7 @@ public class GAlignFrame } }); autoCalculate.setText("Autocalculate Consensus"); - autoCalculate.setState(true); + autoCalculate.setState( jalview.bin.Cache.getDefault("AUTO_CALC_CONSENSUS", true)); autoCalculate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -987,6 +992,92 @@ public class GAlignFrame autoCalculate_actionPerformed(e); } }); + addSequenceMenu.setText("Add Sequences"); + addFromFile.setText("From File"); + addFromFile.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + addFromFile_actionPerformed(e); + } + }); + addFromText.setText("From Textbox"); + addFromText.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + addFromText_actionPerformed(e); + } + }); + addFromURL.setText("From URL"); + addFromURL.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + addFromURL_actionPerformed(e); + } + }); + exportFeatures.setText("Export Features..."); + exportFeatures.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + exportFeatures_actionPerformed(e); + } + }); + exportAnnotations.setText("Export Annotations..."); + exportAnnotations.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + exportAnnotations_actionPerformed(e); + } + }); + statusPanel.setLayout(gridLayout1); + jMenu3.setText("Show"); + showAllSeqs.setText("All Sequences"); + showAllSeqs.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + showAllSeqs_actionPerformed(e); + } + }); + showAllColumns.setText("All Columns"); + showAllColumns.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + showAllColumns_actionPerformed(e); + } + }); + jMenu4.setText("Hide"); + hideSelSequences.setText("Selected Sequences"); + hideSelSequences.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + hideSelSequences_actionPerformed(e); + } + }); + hideSelColumns.setText("Selected Columns"); + hideSelColumns.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + hideSelColumns_actionPerformed(e); + } + }); + hiddenMarkers.setText("Hidden Markers"); + hiddenMarkers.setState(true); + hiddenMarkers.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + hiddenMarkers_actionPerformed(e); + } + }); + alignFrameMenuBar.add(fileMenu); alignFrameMenuBar.add(editMenu); alignFrameMenuBar.add(searchMenu); @@ -994,6 +1085,7 @@ public class GAlignFrame alignFrameMenuBar.add(colourMenu); alignFrameMenuBar.add(calculateMenu); alignFrameMenuBar.add(webService); + fileMenu.add(addSequenceMenu); fileMenu.add(fetchSequence); fileMenu.addSeparator(); fileMenu.add(vamsasStore); @@ -1002,6 +1094,8 @@ public class GAlignFrame fileMenu.add(outputTextboxMenu); fileMenu.add(printMenuItem); fileMenu.addSeparator(); + fileMenu.add(exportFeatures); + fileMenu.add(exportAnnotations); fileMenu.add(LoadtreeMenuItem); fileMenu.add(associatedData); fileMenu.addSeparator(); @@ -1029,6 +1123,10 @@ public class GAlignFrame viewMenu.add(font); viewMenu.add(smoothFont); viewMenu.addSeparator(); + viewMenu.add(jMenu3); + viewMenu.add(jMenu4); + viewMenu.add(hiddenMarkers); + viewMenu.addSeparator(); viewMenu.add(wrapMenuItem); viewMenu.add(seqLimits); viewMenu.add(scaleAbove); @@ -1040,7 +1138,6 @@ public class GAlignFrame viewMenu.add(renderGapsMenuItem); viewMenu.add(annotationPanelMenuItem); viewMenu.addSeparator(); - viewMenu.add(fetchSeqFeatures); viewMenu.add(showSeqFeatures); viewMenu.add(featureSettings); viewMenu.addSeparator(); @@ -1061,11 +1158,11 @@ public class GAlignFrame colourMenu.add(nucleotideColour); colourMenu.add(userDefinedColour); colourMenu.addSeparator(); - colourMenu.add(annotationColour); colourMenu.add(conservationMenuItem); colourMenu.add(modifyConservation); colourMenu.add(abovePIDThreshold); colourMenu.add(modifyPID); + colourMenu.add(annotationColour); calculateMenu.add(sort); calculateMenu.add(calculate); calculateMenu.addSeparator(); @@ -1075,10 +1172,7 @@ public class GAlignFrame calculateMenu.add(showTranslation); calculateMenu.add(autoCalculate); webServiceNoServices=new JMenuItem(""); - webService.add(webServiceNoServices); - this.getContentPane().add(statusBar, BorderLayout.SOUTH); - // this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER); - jMenu1.add(pasteNew); + webService.add(webServiceNoServices);jMenu1.add(pasteNew); jMenu1.add(pasteThis); sort.add(sortIDMenuItem); sort.add(sortGroupMenuItem); @@ -1090,12 +1184,46 @@ public class GAlignFrame jMenu2.add(htmlMenuItem); jMenu2.add(epsFile); jMenu2.add(createPNG); + addSequenceMenu.add(addFromFile); + addSequenceMenu.add(addFromText); + addSequenceMenu.add(addFromURL); + this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH); + statusPanel.add(statusBar, null); + jMenu3.add(showAllColumns); + jMenu3.add(showAllSeqs); + jMenu4.add(hideSelColumns); + jMenu4.add(hideSelSequences); } protected void outputText_actionPerformed(ActionEvent e) { } + public void addFromFile_actionPerformed(ActionEvent e) + { + + } + + public void addFromText_actionPerformed(ActionEvent e) + { + + } + + public void addFromURL_actionPerformed(ActionEvent e) + { + + } + + public void exportFeatures_actionPerformed(ActionEvent e) + { + + } + + public void exportAnnotations_actionPerformed(ActionEvent e) + { + + } + protected void htmlMenuItem_actionPerformed(ActionEvent e) { } @@ -1404,17 +1532,53 @@ public class GAlignFrame } - public void fetchSeqFeatures_actionPerformed(ActionEvent e) + + public void associatedData_actionPerformed(ActionEvent e) { } - public void associatedData_actionPerformed(ActionEvent e) + public void autoCalculate_actionPerformed(ActionEvent e) { } - public void autoCalculate_actionPerformed(ActionEvent e) + public void showAllSeqs_actionPerformed(ActionEvent e) + { + + } + + public void showAllColumns_actionPerformed(ActionEvent e) + { + + } + + public void hideSelSequences_actionPerformed(ActionEvent e) + { + + } + + public void hideSelColumns_actionPerformed(ActionEvent e) + { + + } + + public void hiddenMarkers_actionPerformed(ActionEvent e) + { + + } + + public void findPdbId_actionPerformed(ActionEvent e) + { + + } + + public void enterPdbId_actionPerformed(ActionEvent e) + { + + } + + public void pdbFile_actionPerformed(ActionEvent e) { }