X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=de61be3a87b23d907cef9e0d19d361a2939c9c37;hb=32c4c7d4e5db964461c541ee2252510aa3e9e563;hp=acd7694cff9475c792a1db99a3a3523d6577efcd;hpb=798e27eb283041b2153bf456b07618f345f88e86;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index acd7694..de61be3 100755 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -37,7 +37,7 @@ public class FeatureSettings extends JPanel { DasSourceBrowser dassourceBrowser; - jalview.io.DasSequenceFeatureFetcher dasFeatureFetcher; + jalview.ws.DasSequenceFeatureFetcher dasFeatureFetcher; JPanel settingsPane = new JPanel(); JPanel dasSettingsPane = new JPanel(); @@ -136,9 +136,9 @@ public class FeatureSettings fs.handlingUpdate=false; } } - + }); - + frame = new JInternalFrame(); frame.setContentPane(this); Desktop.addInternalFrame(frame, "Sequence Feature Settings", 400, 450); @@ -157,7 +157,7 @@ public class FeatureSettings * true when Feature Settings are updating from feature renderer */ private boolean handlingUpdate=false; - + /** * contains a float[3] for each feature type string. created by setTableData */ @@ -198,9 +198,9 @@ public class FeatureSettings if (!allGroups.contains(group)) { allGroups.addElement(group); - if (checkGroupState(group)) + if (group!=null) { - // continue; // skip this group's feature - we've done it already ? + checkGroupState(group); } } } @@ -212,13 +212,13 @@ public class FeatureSettings index++; } } - + resetTable(null); validate(); } /** - * + * * @param group * @return true if group has been seen before and is already added to set. */ @@ -228,7 +228,7 @@ public class FeatureSettings { visible = ( (Boolean) fr.featureGroups.get(group)).booleanValue(); } else { - visible=true; // new group is always made visible + visible=true; // new group is always made visible } if (groupPanel == null) @@ -250,7 +250,7 @@ public class FeatureSettings if (alreadyAdded) { - + return true; } @@ -277,8 +277,12 @@ public class FeatureSettings return false; } boolean resettingTable=false; - void resetTable(String[] groupChanged) + synchronized void resetTable(String[] groupChanged) { + if (resettingTable==true) + { + return; + } resettingTable=true; typeWidth=new Hashtable(); // TODO: change avWidth calculation to 'per-sequence' average and use long rather than float @@ -314,7 +318,8 @@ public class FeatureSettings if (group == null || fr.featureGroups.get(group) == null || ( (Boolean) fr.featureGroups.get(group)).booleanValue()) { - checkGroupState(group); + if (group!=null) + checkGroupState(group); type = tmpfeatures[index].getType(); if (!visibleChecks.contains(type)) { @@ -563,16 +568,16 @@ public class FeatureSettings boolean sort=false; for (int i=0;i0) sort = sort || width[i-1]>width[i]; @@ -580,7 +585,7 @@ public class FeatureSettings if (sort) jalview.util.QuickSort.sort(width, data); // update global priority order - + updateFeatureRenderer(data,false); table.repaint(); } @@ -603,11 +608,6 @@ public class FeatureSettings { fr.setFeaturePriority(data, visibleNew); af.alignPanel.paintAlignment(true); - - if (af.alignPanel.overviewPanel != null) - { - af.alignPanel.overviewPanel.updateOverviewImage(); - } } int selectedRow = -1; @@ -778,7 +778,7 @@ public class FeatureSettings } dasFeatureFetcher = - new jalview.io.DasSequenceFeatureFetcher( + new jalview.ws.DasSequenceFeatureFetcher( dataset, this, selectedSources); @@ -804,6 +804,17 @@ public class FeatureSettings fetchDAS.setEnabled(true); cancelDAS.setEnabled(false); } + public void noDasSourceActive() + { + JOptionPane.showInternalConfirmDialog(Desktop.desktop, + "No das sources were selected.\n" + + "Please select some sources and\n" + +" try again.", + "No Sources Selected", + JOptionPane.DEFAULT_OPTION, + JOptionPane.INFORMATION_MESSAGE); + complete(); + } ///////////////////////////////////////////////////////////////////////// // http://java.sun.com/docs/books/tutorial/uiswing/components/table.html @@ -918,6 +929,7 @@ public class FeatureSettings return this; } } + } class ColorEditor