X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fapi%2FAlignViewportI.java;h=f92160e66d29b95717eb5f173e8a50242fcf6b2d;hb=f2b03e9fecf41886ebf5f747fd4be02edf042bee;hp=5df38d600d8efbb01db37592e92522741035a88d;hpb=4d7f98a6dd54d9863ba449ec79dcd95d25ed863d;p=jalview.git diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 5df38d6..f92160e 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -31,7 +31,6 @@ import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.schemes.ColourSchemeI; -import java.awt.Color; import java.util.Hashtable; import java.util.List; import java.util.Map; @@ -53,6 +52,18 @@ public interface AlignViewportI extends ViewStyleI */ public int calcPanelHeight(); + /** + * Answers true if the viewport has at least one column selected + * + * @return + */ + boolean hasSelectedColumns(); + + /** + * Answers true if the viewport has at least one hidden column + * + * @return + */ boolean hasHiddenColumns(); boolean isValidCharWidth(); @@ -179,9 +190,9 @@ public interface AlignViewportI extends ViewStyleI void updateGroupAnnotationSettings(boolean applyGlobalSettings, boolean preserveNewGroupSettings); - void setSequenceColour(SequenceI seq, Color col); + void setSequenceColour(SequenceI seq, ColorI col); - Color getSequenceColour(SequenceI seq); + ColorI getSequenceColour(SequenceI seq); void updateSequenceIdColours(); @@ -235,11 +246,30 @@ public interface AlignViewportI extends ViewStyleI * This method returns the visible alignment as text, as seen on the GUI, ie * if columns are hidden they will not be returned in the result. Use this for * calculating trees, PCA, redundancy etc on views which contain hidden + * columns. This method doesn't exclude hidden sequences from the output. + * + * @param selectedRegionOnly + * - determines if only the selected region or entire alignment is + * exported + * @return String[] + */ + String[] getViewAsString(boolean selectedRegionOnly); + + /** + * This method returns the visible alignment as text, as seen on the GUI, ie + * if columns are hidden they will not be returned in the result. Use this for + * calculating trees, PCA, redundancy etc on views which contain hidden * columns. * + * @param selectedRegionOnly + * - determines if only the selected region or entire alignment is + * exported + * @param isExportHiddenSeqs + * - determines if hidden sequences would be exported or not. + * * @return String[] */ - String[] getViewAsString(boolean selectedRegionOnly); + String[] getViewAsString(boolean selectedRegionOnly, boolean isExportHiddenSeqs); void setSelectionGroup(SequenceGroup sg); @@ -375,4 +405,15 @@ public interface AlignViewportI extends ViewStyleI * Set whether view should scroll to show the highlighted region of a sequence */ void setFollowHighlight(boolean b); + + + public void applyFeaturesStyle(FeatureSettingsModelI featureSettings); + + /** + * check if current selection group is defined on the view, or is simply a + * temporary group. + * + * @return true if group is defined on the alignment + */ + boolean isSelectionDefinedGroup(); }