From: amwaterhouse Date: Fri, 10 Feb 2006 16:05:27 +0000 (+0000) Subject: Update overview if features updated X-Git-Tag: Root_VamJalview_2_07b+~151 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d03971168d7f0192862cf5b57602ecf3e341b457;p=jalview.git Update overview if features updated --- diff --git a/src/jalview/gui/FeatureRenderer.java b/src/jalview/gui/FeatureRenderer.java index 03080bd..3f332b5 100755 --- a/src/jalview/gui/FeatureRenderer.java +++ b/src/jalview/gui/FeatureRenderer.java @@ -62,7 +62,7 @@ public class FeatureRenderer * of the rendered sequence */ BufferedImage bi; - public synchronized Color findFeatureColour(Color initialCol, SequenceI seq, int i) + public Color findFeatureColour(Color initialCol, SequenceI seq, int i) { if(!av.showSequenceFeatures) return initialCol; diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 7dae703..bbaaa5a 100755 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -136,22 +136,23 @@ public class FeatureSettings extends JPanel Enumeration e; SequenceFeature sf; - for(int i=0; i< av.alignment.getHeight(); i++) - { - features = av.alignment.getSequenceAt(i).getDatasetSequence().getSequenceFeatures(); - if(features==null) - continue; + for (int i = 0; i < av.alignment.getHeight(); i++) + { + features = av.alignment.getSequenceAt(i).getDatasetSequence(). + getSequenceFeatures(); + if (features == null) + continue; - e = features.elements(); - while(e.hasMoreElements()) - { - sf = (SequenceFeature)e.nextElement(); - if(!allFeatures.contains(sf.getType())) - { - allFeatures.addElement(sf.getType()); - } - } + e = features.elements(); + while (e.hasMoreElements()) + { + sf = (SequenceFeature) e.nextElement(); + if (!allFeatures.contains(sf.getType())) + { + allFeatures.addElement(sf.getType()); + } } + if(allFeatures.size()<1) { try{ @@ -333,6 +334,9 @@ public class FeatureSettings extends JPanel { fr.setFeaturePriority( data ); ap.repaint(); + + if(ap.overviewPanel!=null) + ap.overviewPanel.updateOverviewImage(); } int selectedRow =-1; diff --git a/src/jalview/gui/OverviewPanel.java b/src/jalview/gui/OverviewPanel.java index a35966d..e20084c 100755 --- a/src/jalview/gui/OverviewPanel.java +++ b/src/jalview/gui/OverviewPanel.java @@ -67,7 +67,6 @@ public class OverviewPanel extends JPanel implements Runnable sr.renderGaps( false ); fr = new FeatureRenderer(av); fr.transparency = ap.seqPanel.seqCanvas.getFeatureRenderer().transparency; - fr.featuresDisplayed = ap.seqPanel.seqCanvas.getFeatureRenderer().featuresDisplayed; // scale the initial size of overviewpanel to shape of alignment float initialScale = (float) av.alignment.getWidth() / (float) av.alignment.getHeight(); @@ -287,8 +286,9 @@ public class OverviewPanel extends JPanel implements Runnable av.alignment.getSequenceAt(lastrow), lastcol); if(av.showSequenceFeatures) - color = fr.findFeatureColour(color, av.alignment.getSequenceAt(lastrow), - lastcol); + color = fr.findFeatureColour(color, av.alignment.getSequenceAt(lastrow), + lastcol); + } miniMe.setRGB(col,row,color.getRGB());