package jalview.jbgui;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
+import jalview.api.SplitContainerI;
import jalview.bin.Cache;
import jalview.gui.JvSwingUtils;
import jalview.gui.Preferences;
JMenuItem createPNG = new JMenuItem();
+ JMenuItem createBioJS = new JMenuItem();
+
JMenuItem createSVG = new JMenuItem();
protected JMenuItem font = new JMenuItem();
protected JMenuItem showTranslation = new JMenuItem();
- protected JMenu cdna = new JMenu();
-
protected JMenuItem extractScores = new JMenuItem();
protected JMenuItem expandAlignment = new JMenuItem();
JMenuItem annotationColour = new JMenuItem();
+ JMenuItem annotationColumn = new JMenuItem();
+
protected JMenuItem rnahelicesColour = new JMenuItem();
JMenuItem associatedData = new JMenuItem();
GridLayout gridLayout1 = new GridLayout();
- JMenu jMenu3 = new JMenu();
+ JMenu showMenu = new JMenu();
JMenuItem showAllSeqs = new JMenuItem();
protected JMenuItem hideAllAlAnnotations = new JMenuItem();
+ protected JCheckBoxMenuItem showComplementMenuItem = new JCheckBoxMenuItem();
+
protected JCheckBoxMenuItem sortAnnBySequence = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem sortAnnByLabel = new JCheckBoxMenuItem();
JMenuItem textColour = new JMenuItem();
- JMenu formatMenu = new JMenu();
+ protected JMenu formatMenu = new JMenu();
JMenu selectMenu = new JMenu();
private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
+ private SplitContainerI splitFrame;
+
public GAlignFrame()
{
try
// colours.add(covariationColour);
colours.add(tcoffeeColour);
colours.add(RNAInteractionColour);
- setColourSelected(jalview.bin.Cache
- .getDefault("DEFAULT_COLOUR", "None"));
-
+ setColourSelected(jalview.bin.Cache.getDefault(
+ Preferences.DEFAULT_COLOUR, "None"));
}
public void setColourSelected(String defaultColour)
htmlMenuItem_actionPerformed(e);
}
});
+
+ // TODO uncomment when supported by MassageManager
+ // createBioJS.setText(MessageManager.getString("label.biojs_html_export"));
+ createBioJS.setText("BioJS");
+ createBioJS.addActionListener(new java.awt.event.ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ bioJSMenuItem_actionPerformed(e);
+ }
+ });
+
overviewMenuItem.setText(MessageManager
.getString("label.overview_window"));
overviewMenuItem.addActionListener(new ActionListener()
font_actionPerformed(e);
}
});
-
seqLimits.setText(MessageManager
.getString("label.show_sequence_limits"));
seqLimits.setState(jalview.bin.Cache.getDefault("SHOW_JVSUFFIX", true));
}
});
- /*
- * cDNA menu options
- */
- cdna.setText(MessageManager.getString("label.cdna"));
- // link to available cDNA
- JMenuItem linkCdna = new JMenuItem(
- MessageManager.getString("label.link_cdna"));
- linkCdna.setToolTipText(JvSwingUtils.wrapTooltip(true,
- MessageManager.getString("label.link_cdna_tip")));
- linkCdna.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- linkCdna_actionPerformed();
- }
- });
- cdna.add(linkCdna);
- // align linked cDNA
- JMenuItem alignCdna = new JMenuItem(
- MessageManager.getString("label.align_cdna"));
- alignCdna.setToolTipText(JvSwingUtils.wrapTooltip(true,
- MessageManager.getString("label.align_cdna_tip")));
- alignCdna.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- alignCdna_actionPerformed();
- }
- });
- cdna.add(alignCdna);
-
- // view alignment as cDNA (when known)
- JMenuItem viewAsCdna = new JMenuItem(
- MessageManager.getString("label.view_as_cdna"));
- viewAsCdna.setToolTipText(JvSwingUtils.wrapTooltip(true,
- MessageManager.getString("label.view_as_cdna_tip")));
- viewAsCdna.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- viewAsCdna_actionPerformed();
- }
- });
- cdna.add(viewAsCdna);
-
extractScores.setText(MessageManager.getString("label.extract_scores")
+ "...");
extractScores.addActionListener(new ActionListener()
}
});
+ annotationColumn.setText(MessageManager
+ .getString("action.select_by_annotation"));
+ annotationColumn.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ annotationColumn_actionPerformed(e);
+ }
+ });
+
rnahelicesColour.setText(MessageManager
.getString("action.by_rna_helixes"));
rnahelicesColour.addActionListener(new ActionListener()
}
});
statusPanel.setLayout(gridLayout1);
- jMenu3.setText(MessageManager.getString("action.show"));
+ showMenu.setText(MessageManager.getString("action.show"));
showAllSeqs.setText(MessageManager.getString("label.all_sequences"));
showAllSeqs.setToolTipText(MessageManager
.getString("label.toggle_sequence_visibility"));
};
addMenuActionAndAccelerator(keyStroke, invertColSel, al);
+ showComplementMenuItem.setVisible(false);
+ showComplementMenuItem.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ showComplement_actionPerformed(showComplementMenuItem.getState());
+ }
+ });
+
tabbedPane.addChangeListener(new javax.swing.event.ChangeListener()
{
@Override
viewMenu.add(expandViews);
viewMenu.add(gatherViews);
viewMenu.addSeparator();
- viewMenu.add(jMenu3);
+ viewMenu.add(showMenu);
viewMenu.add(hideMenu);
+ viewMenu.add(showComplementMenuItem);
viewMenu.addSeparator();
viewMenu.add(followHighlightMenuItem);
annotationsMenu.add(annotationPanelMenuItem);
calculateMenu.add(PCAMenuItem);
calculateMenu.addSeparator();
calculateMenu.add(showTranslation);
- calculateMenu.add(cdna);
calculateMenu.add(showProducts);
calculateMenu.add(autoCalculate);
calculateMenu.add(sortByTree);
jMenu2.add(htmlMenuItem);
jMenu2.add(epsFile);
jMenu2.add(createPNG);
+ jMenu2.add(createBioJS);
jMenu2.add(createSVG);
addSequenceMenu.add(addFromFile);
addSequenceMenu.add(addFromText);
this.getContentPane().add(statusPanel, java.awt.BorderLayout.SOUTH);
statusPanel.add(statusBar, null);
this.getContentPane().add(tabbedPane, java.awt.BorderLayout.CENTER);
- jMenu3.add(showAllColumns);
- jMenu3.add(showAllSeqs);
- jMenu3.add(showAllhidden);
+ showMenu.add(showAllColumns);
+ showMenu.add(showAllSeqs);
+ showMenu.add(showAllhidden);
hideMenu.add(hideSelColumns);
hideMenu.add(hideSelSequences);
hideMenu.add(hideAllSelection);
selectMenu.add(unGroup);
selectMenu.add(grpsFromSelection);
selectMenu.add(deleteGroups);
+ selectMenu.add(annotationColumn);
calculateMenu.add(expandAlignment);
// TODO - determine if the listenToViewSelections button is needed : see bug
// JAL-574
menuItem.addActionListener(actionListener);
}
- protected void viewAsCdna_actionPerformed()
- {
- }
-
- protected void alignCdna_actionPerformed()
- {
- }
-
- protected void linkCdna_actionPerformed()
- {
- }
-
/**
* Action on clicking sort annotations by type.
*
{
}
+ protected void bioJSMenuItem_actionPerformed(ActionEvent e)
+ {
+
+ }
+
protected void closeMenuItem_actionPerformed(boolean b)
{
}
}
+ public void annotationColumn_actionPerformed(ActionEvent e)
+ {
+
+ }
+
public void rnahelicesColour_actionPerformed(ActionEvent e)
{
{
return this.accelerators;
}
+
+ /**
+ * Returns the selected index of the tabbed pane, or -1 if none selected
+ * (including the case where the tabbed pane has not been made visible).
+ *
+ * @return
+ */
+ public int getTabIndex()
+ {
+ return tabbedPane.getSelectedIndex();
+ }
+
+ public JPanel getStatusPanel()
+ {
+ return statusPanel;
+ }
+
+ /**
+ * Sets a reference to the containing split frame. Also makes the 'toggle
+ * split view' menu item visible and checked.
+ *
+ * @param sf
+ */
+ public void setSplitFrame(SplitContainerI sf)
+ {
+ this.splitFrame = sf;
+ if (sf != null)
+ {
+ this.showComplementMenuItem.setVisible(true);
+ this.showComplementMenuItem.setState(true);
+ }
+ }
+
+ public SplitContainerI getSplitViewContainer()
+ {
+ return this.splitFrame;
+ }
+
+ protected void showComplement_actionPerformed(boolean state)
+ {
+ }
}