X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fjbgui%2FGAlignFrame.java;h=5858f867211a45ed6dfbece48e9a3966889c8efb;hb=08c9327201cdf77a77bf884f3c5fa45cdaf8bc7f;hp=6c1c8c6d0f96de62c00f65075c42e03818c472f1;hpb=d2219b397cfed501534b85976023e7045c35ff67;p=jalview.git diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 6c1c8c6..5858f86 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1,13 +1,13 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) + * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR @@ -138,13 +138,14 @@ public class GAlignFrame extends JInternalFrame protected JRadioButtonMenuItem nucleotideColour = new JRadioButtonMenuItem(); protected JRadioButtonMenuItem purinePyrimidineColour = new JRadioButtonMenuItem(); + + protected JRadioButtonMenuItem RNAInteractionColour = new JRadioButtonMenuItem(); // protected JRadioButtonMenuItem covariationColour = new // JRadioButtonMenuItem(); protected JRadioButtonMenuItem tcoffeeColour = new JRadioButtonMenuItem(); - - + JMenuItem njTreeBlosumMenuItem = new JMenuItem(); JMenuItem avDistanceTreeBlosumMenuItem = new JMenuItem(); @@ -206,7 +207,7 @@ public class GAlignFrame extends JInternalFrame JMenuItem epsFile = new JMenuItem(); JMenuItem LoadtreeMenuItem = new JMenuItem(); - + public JCheckBoxMenuItem scaleAbove = new JCheckBoxMenuItem(); public JCheckBoxMenuItem scaleLeft = new JCheckBoxMenuItem(); @@ -454,7 +455,7 @@ public class GAlignFrame extends JInternalFrame colours.add(purinePyrimidineColour); // colours.add(covariationColour); colours.add(tcoffeeColour); - + colours.add(RNAInteractionColour); setColourSelected(jalview.bin.Cache .getDefault("DEFAULT_COLOUR", "None")); @@ -523,15 +524,20 @@ public class GAlignFrame extends JInternalFrame nucleotideColour.setSelected(true); break; - + case ColourSchemeProperty.TCOFFEE: - tcoffeeColour.setSelected(true); - break; + tcoffeeColour.setSelected(true); + break; case ColourSchemeProperty.PURINEPYRIMIDINE: purinePyrimidineColour.setSelected(true); break; + + case ColourSchemeProperty.RNAINTERACTION: + RNAInteractionColour.setSelected(true); + + break; /* * case ColourSchemeProperty.COVARIATION: * covariationColour.setSelected(true); @@ -911,14 +917,22 @@ public class GAlignFrame extends JInternalFrame }); purinePyrimidineColour.setText("Purine/Pyrimidine"); - purinePyrimidineColour - .addActionListener(new java.awt.event.ActionListener() + purinePyrimidineColour.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { purinePyrimidineColour_actionPerformed(e); } }); + + RNAInteractionColour.setText("RNA Interaction type"); + RNAInteractionColour.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + RNAInteractionColour_actionPerformed(e); + } + }); /* * covariationColour.setText("Covariation"); * covariationColour.addActionListener(new java.awt.event.ActionListener() { @@ -1176,18 +1190,19 @@ public class GAlignFrame extends JInternalFrame nucleotideColour_actionPerformed(e); } }); - + tcoffeeColour.setText("T-Coffee scores"); tcoffeeColour.setEnabled(false); - tcoffeeColour.addActionListener( new ActionListener() { - - @Override - public void actionPerformed(ActionEvent e) { - tcoffeeColorScheme_actionPerformed(e); - } - } ); - - + tcoffeeColour.addActionListener(new ActionListener() + { + + @Override + public void actionPerformed(ActionEvent e) + { + tcoffeeColorScheme_actionPerformed(e); + } + }); + deleteGroups.setText("Undefine groups"); deleteGroups.setAccelerator(javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_U, Toolkit.getDefaultToolkit() @@ -1300,7 +1315,7 @@ public class GAlignFrame extends JInternalFrame } }); LoadtreeMenuItem.setActionCommand("Load a tree for this sequence set"); - LoadtreeMenuItem.setText("Load Associated Tree"); + LoadtreeMenuItem.setText("Load Associated Tree"); LoadtreeMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) @@ -1308,7 +1323,7 @@ public class GAlignFrame extends JInternalFrame LoadtreeMenuItem_actionPerformed(e); } }); - + scaleAbove.setVisible(false); scaleAbove.setText("Scale Above"); scaleAbove.addActionListener(new java.awt.event.ActionListener() @@ -1517,9 +1532,10 @@ public class GAlignFrame extends JInternalFrame } }); sortByTree.setText("Sort Alignment With New Tree"); - sortByTree.setToolTipText("Enable this to automatically sort
the alignment when you open
a new tree."); - sortByTree.setState(jalview.bin.Cache.getDefault( - "SORT_BY_TREE", false)); + sortByTree + .setToolTipText("Enable this to automatically sort
the alignment when you open
a new tree."); + sortByTree + .setState(jalview.bin.Cache.getDefault("SORT_BY_TREE", false)); sortByTree.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1529,8 +1545,9 @@ public class GAlignFrame extends JInternalFrame }); listenToViewSelections.setText("Listen for selections"); - listenToViewSelections.setToolTipText("When selected, selections in this view will mirror
selections made on the same sequences in other views."); - listenToViewSelections.setState(false); + listenToViewSelections + .setToolTipText("When selected, selections in this view will mirror
selections made on the same sequences in other views."); + listenToViewSelections.setState(false); listenToViewSelections.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) @@ -1871,6 +1888,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(buriedColour); colourMenu.add(nucleotideColour); colourMenu.add(purinePyrimidineColour); + colourMenu.add(RNAInteractionColour); // colourMenu.add(covariationColour); colourMenu.add(tcoffeeColour); colourMenu.add(userDefinedColour); @@ -1880,7 +1898,7 @@ public class GAlignFrame extends JInternalFrame colourMenu.add(abovePIDThreshold); colourMenu.add(modifyPID); colourMenu.add(annotationColour); - colourMenu.add(rnahelicesColour); + colourMenu.add(rnahelicesColour); calculateMenu.add(sort); calculateMenu.add(calculateTree); calculateMenu.addSeparator(); @@ -1946,21 +1964,22 @@ public class GAlignFrame extends JInternalFrame selectMenu.add(invertColSel); selectMenu.add(deleteGroups); selectMenu.add(grpsFromSelection); - // TODO - determine if the listenToViewSelections button is needed : see bug JAL-574 - //selectMenu.addSeparator(); - //selectMenu.add(listenToViewSelections); + // TODO - determine if the listenToViewSelections button is needed : see bug + // JAL-574 + // selectMenu.addSeparator(); + // selectMenu.add(listenToViewSelections); } protected void normaliseSequenceLogo_actionPerformed(ActionEvent e) { // TODO Auto-generated method stub - + } protected void listenToViewSelections_actionPerformed(ActionEvent e) { // TODO Auto-generated method stub - + } protected void showAllhidden_actionPerformed(ActionEvent e) @@ -2264,6 +2283,11 @@ public class GAlignFrame extends JInternalFrame protected void purinePyrimidineColour_actionPerformed(ActionEvent e) { } + + protected void RNAInteractionColour_actionPerformed(ActionEvent e) + { + } + /* * protected void covariationColour_actionPerformed(ActionEvent e) { } @@ -2354,30 +2378,32 @@ public class GAlignFrame extends JInternalFrame { } - + /** - * Template method to handle the 'load T-Coffee scores' menu event. + * Template method to handle the 'load T-Coffee scores' menu event. *

* Subclasses override this method to provide a custom action. - * - * @param event The raised event + * + * @param event + * The raised event */ - protected void loadScores_actionPerformed(ActionEvent event) { - + protected void loadScores_actionPerformed(ActionEvent event) + { + } - /** - * Template method to handle the 'Color T-Coffee scores' menu event. + * Template method to handle the 'Color T-Coffee scores' menu event. *

* Subclasses override this method to provide a custom action. - * - * @param event The raised event + * + * @param event + * The raised event */ - protected void tcoffeeColorScheme_actionPerformed(ActionEvent event) { - + protected void tcoffeeColorScheme_actionPerformed(ActionEvent event) + { + } - protected void jpred_actionPerformed(ActionEvent e) {