* <li>DAS_ACTIVE_SOURCE list of active sources </li>
* <li>SHOW_MEMUSAGE boolean show memory usage and warning indicator on desktop
* (false) </li>
+ * <li>SHOW_NPFEATS_TOOLTIP (true) show non-positional features in the Sequence ID tooltip</li>
+ * <li>SHOW_DBREFS_TOOLTIP (true) show Database Cross References in the Sequence ID tooltip</li>
* <li> </li>
*
* </ul>
showSeqFeatures.setSelected(av.showSequenceFeatures);
hiddenMarkers.setState(av.showHiddenMarkers);
applyToAllGroups.setState(av.colourAppliesToAllGroups);
+ showNpFeatsMenuitem.setSelected(av.isShowNpFeats());
+ showDbRefsMenuitem.setSelected(av.isShowDbRefs());
setShowProductsEnabled();
buildSortByAnnotationScoresMenu();
}
}
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#showDbRefs_actionPerformed(java.awt.event.ActionEvent)
+ */
+ protected void showDbRefs_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowDbRefs(showDbRefsMenuitem.isSelected());
+ }
+
+ /* (non-Javadoc)
+ * @see jalview.jbgui.GAlignFrame#showNpFeats_actionPerformed(java.awt.event.ActionEvent)
+ */
+ protected void showNpFeats_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowNpFeats(showNpFeatsMenuitem.isSelected());
+ }
}
class PrintThread extends Thread
autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true);
padGaps = Cache.getDefault("PAD_GAPS", true);
-
+ shownpfeats = Cache.getDefault("SHOW_NPFEATS_TOOLTIP",true);
+ showdbrefs = Cache.getDefault("SHOW_DBREFS_TOOLTIP",true);
+
String fontName = Cache.getDefault("FONT_NAME", "SansSerif");
String fontStyle = Cache.getDefault("FONT_STYLE", Font.PLAIN + "");
String fontSize = Cache.getDefault("FONT_SIZE", "10");
*/
boolean centreColumnLabels = false;
+ private boolean showdbrefs;
+
+ private boolean shownpfeats;
+
/**
* trigger update of conservation annotation
*/
}
}
}
+
+ /**
+ * enable or disable the display of Database Cross References in the sequence ID tooltip
+ */
+ public void setShowDbRefs(boolean show)
+ {
+ showdbrefs=show;
+ }
+
+ /**
+ *
+ * @return true if Database References are to be displayed on tooltips.
+ */
+ public boolean isShowDbRefs()
+ {
+ return showdbrefs;
+ }
+
+ /**
+ *
+ * @return true if Non-positional features are to be displayed on tooltips.
+ */
+ public boolean isShowNpFeats()
+ {
+ return shownpfeats;
+ }
+ /**
+ * enable or disable the display of Non-Positional sequence features in the sequence ID tooltip
+ * @param show
+ */
+ public void setShowNpFeats(boolean show)
+ {
+ shownpfeats=show;
+ }
}
}
DBRefEntry[] dbrefs = sequence.getDatasetSequence().getDBRef();
- if (dbrefs != null)
+ if (av.isShowDbRefs() && dbrefs != null)
{
for (int i = 0; i < dbrefs.length; i++)
{
// ADD NON POSITIONAL SEQUENCE INFO
SequenceFeature[] features = sequence.getDatasetSequence()
.getSequenceFeatures();
- if (features != null)
+ if (av.isShowNpFeats() && features != null)
{
for (int i = 0; i < features.length; i++)
{
JMenu jMenu2 = new JMenu();
protected JCheckBoxMenuItem padGapsMenuitem = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem showNpFeatsMenuitem = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem showDbRefsMenuitem = new JCheckBoxMenuItem();
protected ButtonGroup colours = new ButtonGroup();
GridLayout gridLayout1 = new GridLayout();
JMenu jMenu3 = new JMenu();
-
+
JMenuItem showAllSeqs = new JMenuItem();
JMenuItem showAllColumns = new JMenuItem();
JMenuItem pageSetup = new JMenuItem();
JMenuItem alignmentProperties = new JMenuItem();
-
+
+ JMenu tooltipSettingsMenu = new JMenu();
+
public GAlignFrame()
{
try
showSeqFeatures_actionPerformed(actionEvent);
}
});
+ showDbRefsMenuitem.setText("Show Database Refs");
+ showDbRefsMenuitem.addActionListener(new ActionListener()
+ {
+
+ public void actionPerformed(ActionEvent e)
+ {
+ showDbRefs_actionPerformed(e);
+ }
+
+ });
+ showNpFeatsMenuitem.setText("Show Non-Positional Features");
+ showNpFeatsMenuitem.addActionListener(new ActionListener()
+ {
+
+ public void actionPerformed(ActionEvent e)
+ {
+ showNpFeats_actionPerformed(e);
+ }
+
+ });
nucleotideColour.setText("Nucleotide");
nucleotideColour.addActionListener(new java.awt.event.ActionListener()
{
alignmentProperties();
}
});
-
+ tooltipSettingsMenu.setText("Sequence ID Tooltip");
alignFrameMenuBar.add(fileMenu);
alignFrameMenuBar.add(editMenu);
alignFrameMenuBar.add(selectMenu);
viewMenu.addSeparator();
viewMenu.add(showSeqFeatures);
viewMenu.add(featureSettings);
+ tooltipSettingsMenu.add(showDbRefsMenuitem);
+ tooltipSettingsMenu.add(showNpFeatsMenuitem);
+ viewMenu.add(tooltipSettingsMenu);
viewMenu.addSeparator();
viewMenu.add(alignmentProperties);
viewMenu.addSeparator();
selectMenu.add(deleteGroups);
}
+ protected void showNpFeats_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void showDbRefs_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void centreColumnLabels_actionPerformed(ActionEvent e)
{
}