/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
* Copyright (C) 2014 The Jalview Authors
*
* 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.
+ * 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
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.appletgui;
import jalview.schemes.PIDColourScheme;
import jalview.schemes.PurinePyrimidineColourScheme;
import jalview.schemes.RNAHelicesColourChooser;
+import jalview.schemes.RNAInteractionColourScheme;
import jalview.schemes.ResidueProperties;
import jalview.schemes.StrandColourScheme;
import jalview.schemes.TCoffeeColourScheme;
{
ex.printStackTrace();
}
-
+ // need to get window geometry before we calculate alignment layout
+ if (applet != null)
+ {
+ String param;
+ try
+ {
+ param = applet.getParameter("windowWidth");
+ if (param != null)
+ {
+ int width = Integer.parseInt(param);
+ DEFAULT_WIDTH = width;
+ }
+ param = applet.getParameter("windowHeight");
+ if (param != null)
+ {
+ int height = Integer.parseInt(param);
+ DEFAULT_HEIGHT = height;
+ }
+ } catch (Exception ex)
+ {
+ }
+ }
viewport = new AlignViewport(al, applet);
alignPanel = new AlignmentPanel(this, viewport);
avc = new jalview.controller.AlignViewController(this, viewport, alignPanel);
showConsensusHistogram.setState(viewport.isShowConsensusHistogram());
showSequenceLogo.setState(viewport.isShowSequenceLogo());
normSequenceLogo.setState(viewport.isNormaliseSequenceLogo());
-
+ applyToAllGroups.setState(viewport.getColourAppliesToAllGroups());
+
seqLimits.setState(viewport.showJVSuffix);
if (applet != null)
centreColumnLabelFlag.setState(true);
centreColumnLabelFlag_stateChanged();
}
- try
- {
- param = applet.getParameter("windowWidth");
- if (param != null)
- {
- int width = Integer.parseInt(param);
- DEFAULT_WIDTH = width;
- }
- param = applet.getParameter("windowHeight");
- if (param != null)
- {
- int height = Integer.parseInt(param);
- DEFAULT_HEIGHT = height;
- }
- } catch (Exception ex)
- {
- }
}
if (viewport.getAlignment().isNucleotide())
{
changeColour(new PurinePyrimidineColourScheme());
}
+ else if (source == RNAInteractionColour)
+ {
+ changeColour(new RNAInteractionColourScheme());
+ }
else if (source == RNAHelixColour)
{
new RNAHelicesColourChooser(viewport, alignPanel);
{
if (viewport.getAbovePIDThreshold())
{
- threshold = SliderPanel.setPIDSliderSource(alignPanel, cs,
- "Background");
-
- cs.setThreshold(threshold, viewport.getIgnoreGapsConsensus());
-
- viewport.setGlobalColourScheme(cs);
- }
- else
- {
- cs.setThreshold(0, viewport.getIgnoreGapsConsensus());
- }
+ viewport.setThreshold(SliderPanel.setPIDSliderSource(alignPanel, cs,
+ "Background"));
+ }
if (viewport.getConservationSelected())
{
-
- Alignment al = (Alignment) viewport.getAlignment();
- Conservation c = new Conservation("All",
- ResidueProperties.propHash, 3, al.getSequences(), 0,
- al.getWidth() - 1);
-
- c.calculate();
- c.verdict(false, viewport.getConsPercGaps());
-
- cs.setConservation(c);
-
- cs.setConservationInc(SliderPanel.setConservationSlider(alignPanel,
+ cs.setConservationApplied(true);
+ viewport.setIncrement(SliderPanel.setConservationSlider(alignPanel,
cs, "Background"));
-
}
else
{
- cs.setConservation(null);
+ cs.setConservationApplied(false);
}
-
- cs.setConsensus(viewport.getSequenceConsensusHash());
-
}
viewport.setGlobalColourScheme(cs);
MenuItem purinePyrimidineColour = new MenuItem();
+ MenuItem RNAInteractionColour = new MenuItem();
+
MenuItem RNAHelixColour = new MenuItem();
MenuItem userDefinedColour = new MenuItem();
buriedColour.addActionListener(this);
purinePyrimidineColour.setLabel(MessageManager.getString("label.purine_pyrimidine"));
purinePyrimidineColour.addActionListener(this);
+ RNAInteractionColour.setLabel(MessageManager.getString("label.rna_interaction"));
+ RNAInteractionColour.addActionListener(this);
RNAHelixColour.setLabel(MessageManager.getString("action.by_rna_helixes"));
RNAHelixColour.addActionListener(this);
userDefinedColour.setLabel(MessageManager.getString("action.user_defined"));
menu1.setLabel(MessageManager.getString("action.show"));
showColumns.setLabel(MessageManager.getString("label.all_columns"));
showSeqs.setLabel(MessageManager.getString("label.all_sequences"));
- menu2.setLabel(MessageManager.getString("aciton.hide"));
+ menu2.setLabel(MessageManager.getString("action.hide"));
hideColumns.setLabel(MessageManager.getString("label.selected_columns"));
hideSequences.setLabel(MessageManager.getString("label.selected_sequences"));
hideAllButSelection.setLabel(MessageManager.getString("label.all_but_selected_region"));
colourMenu.add(buriedColour);
colourMenu.add(nucleotideColour);
colourMenu.add(purinePyrimidineColour);
+ // colourMenu.add(RNAInteractionColour);
colourMenu.add(tcoffeeColour);
colourMenu.add(userDefinedColour);
colourMenu.addSeparator();
fileMenu.remove(closeMenuItem);
fileMenu.remove(3); // Remove Seperator
embeddedMenu = makeEmbeddedPopupMenu(alignFrameMenuBar, "Arial",
- Font.PLAIN, 10, false); // use our own fonts.
+ Font.PLAIN, 11, false); // use our own fonts.
// and actually add the components to the applet area
viewport.applet.setLayout(new BorderLayout());
viewport.applet.add(embeddedMenu, BorderLayout.NORTH);