X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=2d82579c2873f3e218c89a3dcbb40c7e048c684c;hb=d043ce47fc710d3eb2629ba926a8a7417bd67d8c;hp=3d44a7c95f2fd2683d09a68c5892a3b061cf5805;hpb=49db0dff1da16c3355b43a41498c1fc93ef47e91;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 3d44a7c..2d82579 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -29,6 +29,7 @@ import jalview.api.FeatureSettingsModelI; import jalview.api.FeaturesDisplayedI; import jalview.api.ViewStyleI; import jalview.bin.Cache; +import jalview.bin.Console; import jalview.commands.CommandI; import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; @@ -130,14 +131,14 @@ public class AlignViewport extends AlignmentViewport sequenceSetID = seqsetid; viewId = viewid; // TODO remove these once 2.4.VAMSAS release finished - if (Cache.log != null && Cache.log.isDebugEnabled() && seqsetid != null) + if (seqsetid != null) { - Cache.log.debug( + Console.debug( "Setting viewport's sequence set id : " + sequenceSetID); } - if (Cache.log != null && Cache.log.isDebugEnabled() && viewId != null) + if (viewId != null) { - Cache.log.debug("Setting viewport's view id : " + viewId); + Console.debug("Setting viewport's view id : " + viewId); } init(); @@ -192,14 +193,14 @@ public class AlignViewport extends AlignmentViewport sequenceSetID = seqsetid; viewId = viewid; // TODO remove these once 2.4.VAMSAS release finished - if (Cache.log != null && Cache.log.isDebugEnabled() && seqsetid != null) + if (seqsetid != null) { - Cache.log.debug( + Console.debug( "Setting viewport's sequence set id : " + sequenceSetID); } - if (Cache.log != null && Cache.log.isDebugEnabled() && viewId != null) + if (viewId != null) { - Cache.log.debug("Setting viewport's view id : " + viewId); + Console.debug("Setting viewport's view id : " + viewId); } if (hiddenColumns != null) @@ -302,8 +303,8 @@ public class AlignViewport extends AlignmentViewport schemeName = Cache.getDefault(Preferences.DEFAULT_COLOUR, ResidueColourScheme.NONE); } - ColourSchemeI colourScheme = ColourSchemeProperty - .getColourScheme(this, alignment, schemeName); + ColourSchemeI colourScheme = ColourSchemeProperty.getColourScheme(this, + alignment, schemeName); residueShading = new ResidueShader(colourScheme); if (colourScheme instanceof UserColourScheme) @@ -592,6 +593,7 @@ public void setNormaliseSequenceLogo(boolean state) { return validCharWidth; } + private Hashtable calcIdParams = new Hashtable<>(); @@ -609,7 +611,7 @@ public void setNormaliseSequenceLogo(boolean state) // calculator.getRegisteredWorkersOfClass(settings.getWorkerClass()) if (needsUpdate) { - Cache.log.debug("trigger update for " + calcId); + Console.debug("trigger update for " + calcId); } } @@ -767,7 +769,7 @@ public void setNormaliseSequenceLogo(boolean state) @Override public void run() { - addDataToAlignment(al); + addDataToAlignment(al); } }).setResponseHandler(SPLIT_FRAME, new Runnable() { @@ -846,8 +848,7 @@ public void setNormaliseSequenceLogo(boolean state) try { - newAlignFrame.setMaximum( - jalview.bin.Cache.getDefault("SHOW_FULLSCREEN", false)); + newAlignFrame.setMaximum(Cache.getDefault("SHOW_FULLSCREEN", false)); } catch (java.beans.PropertyVetoException ex) { } @@ -1013,10 +1014,10 @@ public void setNormaliseSequenceLogo(boolean state) } /** - * Applies the supplied feature settings descriptor to currently known features. - * This supports an 'initial configuration' of feature colouring based on a - * preset or user favourite. This may then be modified in the usual way using - * the Feature Settings dialogue. + * Applies the supplied feature settings descriptor to currently known + * features. This supports an 'initial configuration' of feature colouring + * based on a preset or user favourite. This may then be modified in the usual + * way using the Feature Settings dialogue. * * @param featureSettings */ @@ -1029,8 +1030,8 @@ public void setNormaliseSequenceLogo(boolean state) /** * when mergeOnly is set, then group and feature visibility or feature colours * are not modified for features and groups already known to the feature - * renderer. Feature ordering is always adjusted, and transparency is always set - * regardless. + * renderer. Feature ordering is always adjusted, and transparency is always + * set regardless. * * @param featureSettings * @param mergeOnly @@ -1042,12 +1043,12 @@ public void setNormaliseSequenceLogo(boolean state) { return; } - FeatureRenderer fr = getAlignPanel().getSeqPanel().seqCanvas .getFeatureRenderer(); List origRenderOrder = new ArrayList(), origGroups = new ArrayList(); - // preserve original render order - allows differentiation between user configured colours and autogenerated ones + // preserve original render order - allows differentiation between user + // configured colours and autogenerated ones origRenderOrder.addAll(fr.getRenderOrder()); origGroups.addAll(fr.getFeatureGroups()); @@ -1081,7 +1082,8 @@ public void setNormaliseSequenceLogo(boolean state) && origColour.getColour().equals( ColorUtils.createColourFromName(type))))) { - // if we are merging, only update if there wasn't already a colour defined for + // if we are merging, only update if there wasn't already a colour + // defined for // this type if (preferredColour != null) { @@ -1110,7 +1112,8 @@ public void setNormaliseSequenceLogo(boolean state) { if (!mergeOnly || !origGroups.contains(group)) { - // when merging, display groups only if the aren't already marked as not visible + // when merging, display groups only if the aren't already marked as not + // visible fr.setGroupVisibility(group, featureSettings.isGroupDisplayed(group)); } @@ -1128,6 +1131,7 @@ public void setNormaliseSequenceLogo(boolean state) fr.orderFeatures(featureSettings); } fr.setTransparency(featureSettings.getTransparency()); + fr.notifyFeaturesChanged(); }