*/
package jalview.api;
+import java.awt.Color;
+import java.awt.Font;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
import jalview.analysis.Conservation;
import jalview.analysis.TreeModel;
import jalview.datamodel.AlignmentAnnotation;
import jalview.schemes.ColourSchemeI;
import jalview.viewmodel.ViewportRanges;
-import java.awt.Color;
-import java.awt.Font;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
/**
* @author jimp
*
* @return
*/
Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly);
+
+ /**
+ * Show or hide annotation tracks for each type of sequence feature
+ *
+ * @param selected
+ */
+ void setShowSequenceFeatureCounts(boolean selected);
}
* @return
*/
void setProteinFontAsCdna(boolean b);
+
+ /**
+ * Set the flag indicating that feature count annotation tracks are to be
+ * displayed
+ */
+ void setShowSequenceFeatureCounts(boolean show);
+
+ /**
+ * @return true if feature count annotation tracks are to be displayed
+ */
+ boolean isShowSequenceFeatureCounts();
+
}
*/
package jalview.gui;
-import java.util.Locale;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
+import java.util.Locale;
import java.util.Vector;
import javax.swing.ButtonGroup;
}
/**
+ * Set or clear 'Show Sequence Feature Counts'
+ *
+ * @param evt
+ * DOCUMENT ME!
+ */
+ @Override
+ protected void showSeqFeatureCounts_actionPerformed(
+ ActionEvent actionEvent)
+ {
+ viewport.setShowSequenceFeatureCounts(
+ showSeqFeatureCounts.isSelected());
+ alignPanel.paintAlignment(true, true);
+ }
+
+ /**
* Action on toggle of the 'Show annotations' menu item. This shows or hides
* the annotations panel as a whole.
*
*/
package jalview.gui;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.swing.JInternalFrame;
+
import jalview.analysis.AlignmentUtils;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.api.AlignViewportI;
import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.AutoCalcSetting;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-
-import javax.swing.JInternalFrame;
-
/**
* DOCUMENT ME!
*
*/
package jalview.jbgui;
-import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
-import jalview.analysis.GeneticCodeI;
-import jalview.analysis.GeneticCodes;
-import jalview.api.SplitContainerI;
-import jalview.bin.Cache;
-import jalview.gui.JvSwingUtils;
-import jalview.gui.Preferences;
-import jalview.io.FileFormats;
-import jalview.schemes.ResidueColourScheme;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridLayout;
import javax.swing.event.MenuEvent;
import javax.swing.event.MenuListener;
+import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
+import jalview.analysis.GeneticCodeI;
+import jalview.analysis.GeneticCodes;
+import jalview.api.SplitContainerI;
+import jalview.bin.Cache;
+import jalview.gui.JvSwingUtils;
+import jalview.gui.Preferences;
+import jalview.io.FileFormats;
+import jalview.schemes.ResidueColourScheme;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+
@SuppressWarnings("serial")
public class GAlignFrame extends JInternalFrame
{
public JCheckBoxMenuItem showSeqFeatures = new JCheckBoxMenuItem();
+ public JCheckBoxMenuItem showSeqFeatureCounts = new JCheckBoxMenuItem();
+
JMenuItem copy = new JMenuItem();
JMenuItem cut = new JMenuItem();
showSeqFeatures_actionPerformed(actionEvent);
}
});
+ showSeqFeatureCounts.setText(
+ MessageManager.getString("label.show_sequence_feature_counts"));
+ showSeqFeatureCounts.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent actionEvent)
+ {
+ showSeqFeatureCounts_actionPerformed(actionEvent);
+ }
+ });
/*
* showSeqFeaturesHeight.setText("Vary Sequence Feature Height");
* showSeqFeaturesHeight.addActionListener(new ActionListener() { public
autoAnnMenu.add(showAutoFirst);
autoAnnMenu.add(showAutoLast);
autoAnnMenu.addSeparator();
+ autoAnnMenu.add(showSeqFeatureCounts);
autoAnnMenu.add(applyAutoAnnotationSettings);
autoAnnMenu.add(showConsensusHistogram);
autoAnnMenu.add(showSequenceLogo);
// selectMenu.add(listenToViewSelections);
}
+ protected void showSeqFeatureCounts_actionPerformed(
+ ActionEvent actionEvent)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
protected void loadVcf_actionPerformed()
{
}
*/
package jalview.viewmodel;
+import java.awt.Color;
+import java.beans.PropertyChangeSupport;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.Deque;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
import jalview.analysis.Conservation;
import jalview.analysis.TreeModel;
import jalview.workers.ConsensusThread;
import jalview.workers.StrucConsensusThread;
-import java.awt.Color;
-import java.beans.PropertyChangeSupport;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
/**
* base class holding visualization and analysis attributes and common logic for
* an active alignment view displayed in the GUI
viewStyle.setSeqNameItalics(default1);
}
+ /**
+ * Set the flag indicating that feature count annotation tracks are to be
+ * displayed
+ *
+ * @see jalview.api.ViewStyleI#setShowSequenceFeatureCounts(boolean)
+ */
+ @Override
+ public void setShowSequenceFeatureCounts(boolean show)
+ {
+ viewStyle.setShowSequenceFeatureCounts(show);
+ }
+
+ /**
+ * @return true if feature count annotation tracks are to be displayed
+ * @see jalview.api.ViewStyleI#isShowSequenceFeatureCounts()
+ */
+ @Override
+ public boolean isShowSequenceFeatureCounts()
+ {
+ return viewStyle.isShowSequenceFeatureCounts();
+ }
+
@Override
public AlignmentI getAlignment()
{
*/
package jalview.viewmodel.styles;
-import jalview.api.ViewStyleI;
-
import java.awt.Color;
+import jalview.api.ViewStyleI;
+
/**
* A container for holding alignment view properties. View properties are
* data-independent, which means they can be safely copied between views
boolean showSequenceFeatures = false;
/**
+ * display setting for showing/hiding annotation tracks reporting sequence
+ * feature counts in columns of alignment view
+ */
+ boolean showSequenceFeatureCounts = false;
+
+ /**
* display sequence symbols
*/
boolean showText = true;
{
return showComplementFeaturesOnTop;
}
+
+ @Override
+ public void setShowSequenceFeatureCounts(boolean show)
+ {
+ showSequenceFeatureCounts = show;
+ }
+
+ @Override
+ public boolean isShowSequenceFeatureCounts()
+ {
+ return showSequenceFeatureCounts;
+ }
}