From 87256ba36fb105a1115067ffe2563412e9281d2d Mon Sep 17 00:00:00 2001 From: hansonr Date: Wed, 8 May 2019 06:29:37 -0500 Subject: [PATCH] JAL-3253 preliminary static fixes for JavaScript Desktop.instance and Desktop.getInstance() Jalview.instance and Jalview.getInstance() AlignmentSorter.instance and AlignmentSorter.getInstance() ArgsParser static final options *SoapBindingStub static final _operations Clean up of headless business Clean up of ArgsParser options --- doc/parameters.xlsx | Bin 0 -> 44673 bytes src/ext/vamsas/JpredSoapBindingStub.java | 6 +- src/ext/vamsas/MuscleWSSoapBindingStub.java | 6 +- src/ext/vamsas/RegistryServiceSoapBindingStub.java | 3 +- .../vamsas/SeqSearchServiceSoapBindingStub.java | 7 +- src/ext/vamsas/ServiceHandle.java | 4 +- src/jalview/analysis/AlignmentSorter.java | 144 +++++++---- src/jalview/analysis/GeneticCodes.java | 91 ++++--- src/jalview/analysis/scoremodels/ScoreMatrix.java | 3 +- src/jalview/analysis/scoremodels/ScoreModels.java | 33 ++- src/jalview/bin/ArgsParser.java | 51 +++- src/jalview/bin/Cache.java | 13 +- src/jalview/bin/Jalview.java | 257 ++++++++++---------- src/jalview/gui/AlignExportOptions.java | 2 +- src/jalview/gui/AlignFrame.java | 44 ++-- src/jalview/gui/AlignViewport.java | 10 +- src/jalview/gui/AlignmentPanel.java | 3 +- src/jalview/gui/AnnotationColourChooser.java | 2 +- src/jalview/gui/AnnotationLabels.java | 2 +- src/jalview/gui/AppJmol.java | 2 +- src/jalview/gui/AssociatePdbFileWithSeq.java | 2 +- src/jalview/gui/CalculationChooser.java | 2 +- src/jalview/gui/ChimeraViewFrame.java | 4 +- src/jalview/gui/ColourMenuHelper.java | 2 +- src/jalview/gui/CrossRefAction.java | 2 +- src/jalview/gui/CutAndPasteTransfer.java | 6 +- src/jalview/gui/Desktop.java | 193 +++++++++------ src/jalview/gui/FeatureEditor.java | 4 +- src/jalview/gui/Finder.java | 4 +- src/jalview/gui/IdPanel.java | 2 +- src/jalview/gui/JalviewDialog.java | 6 +- src/jalview/gui/LineartOptions.java | 2 +- src/jalview/gui/OOMWarning.java | 2 +- src/jalview/gui/PopupMenu.java | 4 +- src/jalview/gui/Preferences.java | 12 +- src/jalview/gui/PromptUserConfig.java | 2 +- src/jalview/gui/SequenceFetcher.java | 2 +- src/jalview/gui/SplashScreen.java | 12 +- src/jalview/gui/SplitFrame.java | 10 +- src/jalview/gui/StructureChooser.java | 6 +- src/jalview/gui/StructureViewerBase.java | 2 +- src/jalview/gui/UserDefinedColours.java | 10 +- src/jalview/gui/UserQuestionnaireCheck.java | 2 +- src/jalview/gui/VamsasApplication.java | 12 +- src/jalview/gui/WebserviceInfo.java | 2 +- src/jalview/gui/WsJobParameters.java | 8 +- src/jalview/gui/WsParamSetManager.java | 4 +- src/jalview/gui/WsPreferences.java | 18 +- src/jalview/io/BackupFiles.java | 8 +- src/jalview/io/FileLoader.java | 30 +-- src/jalview/io/HTMLOutput.java | 25 +- src/jalview/io/HtmlSvgOutput.java | 4 +- src/jalview/io/VamsasAppDatastore.java | 6 +- src/jalview/io/WSWUBlastClient.java | 2 +- src/jalview/io/vamsas/Sequencemapping.java | 2 +- src/jalview/jbgui/GAlignFrame.java | 3 +- src/jalview/jbgui/GDesktop.java | 11 +- src/jalview/jbgui/GPreferences.java | 2 +- src/jalview/jbgui/GSequenceLink.java | 4 +- src/jalview/project/Jalview2XML.java | 36 +-- src/jalview/schemes/ResidueProperties.java | 3 +- src/jalview/util/Platform.java | 26 +- src/jalview/ws/jws1/Discoverer.java | 4 +- src/jalview/ws/jws1/JPredClient.java | 2 +- src/jalview/ws/jws1/MsaWSClient.java | 4 +- src/jalview/ws/jws1/SeqSearchWSClient.java | 4 +- src/jalview/ws/jws2/MsaWSClient.java | 4 +- .../ws/jws2/SequenceAnnotationWSClient.java | 4 +- src/jalview/ws/jws2/jabaws2/Jws2Instance.java | 2 +- src/jalview/ws/rest/RestClient.java | 2 +- test/jalview/analysis/DnaTest.java | 24 +- test/jalview/ext/jmol/JmolViewerTest.java | 2 +- .../ext/rbvi/chimera/JalviewChimeraView.java | 2 +- test/jalview/gui/AlignFrameTest.java | 2 +- test/jalview/gui/AlignViewportTest.java | 12 +- test/jalview/gui/FreeUpMemoryTest.java | 4 +- test/jalview/gui/SeqPanelTest.java | 2 +- test/jalview/io/AnnotatedPDBFileInputTest.java | 2 +- test/jalview/io/CrossRef2xmlTests.java | 8 +- test/jalview/io/FeaturesFileTest.java | 2 +- test/jalview/io/Jalview2xmlBase.java | 6 +- test/jalview/io/JalviewExportPropertiesTests.java | 2 +- test/jalview/project/Jalview2xmlTests.java | 28 +-- test/jalview/schemes/ColourSchemesTest.java | 2 +- .../structure/StructureSelectionManagerTest.java | 2 +- 85 files changed, 746 insertions(+), 562 deletions(-) create mode 100644 doc/parameters.xlsx mode change 100755 => 100644 src/ext/vamsas/JpredSoapBindingStub.java diff --git a/doc/parameters.xlsx b/doc/parameters.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..fcbd0fda697b85abc998c0c41bcded167bd5f72e GIT binary patch literal 44673 zcmeFZWppG>k0xqnW@ct)W@c(LGh@5W%*@Qp%*@Pfw%g2ho7;S=-*4v3-u-6J-urtu zPn`@^hB8x+LQ+O4L!~4O3Wf#*0R#mE1Vju(E^R}501N~)3JU~;3IqkBBkEx9YG&_h zpyugl=Ay^&-OiS%5DbJW9|#1%|9`jtgEcUny6dpPgfzBG`REt^u8q88UsW1054pi_ zzcTp=WI{Mh(m=nPGT_%2Rp6Sb;@d2IKn_jz=_}~*w9eVC_fx&qKm2Exi0+Y3Lcr3F z7ANg+-EG?rW&$y_h1wB5nlU()eHbPo#DO}{^!Mf=kz}#Gs^oIna`a;X{{v1{LL2dS z)>%`fAGPL0b#EWI6+NVm%S95RaF8BM>Wb)Q&$6Fh@+=JsrbUk)G3vx>P$?^sSZWN} zFJr|gWvW#J-#^rvTw{p?S+qcu^p1$N-J|1#h64)XYjTlk_-0*E)n`dju~IpHk%xUo zirybTmUA5V{&p3!A@Wj6=&i~$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iooB9A@&UShu@mmX&L( zrOTgJEA3J*I3#{Je6Q~4`GE^4oba9}?0bh}iwTKZwo(OWRc@?ITkMj5uL)KwirJdO zbMgB3N|CJYCwku^`}(*!zun`5Rzzz|Ac<(Kl2W${YrM{eTEEv`cy-UYtkJAw>Y04-*fnTuz>ojRPXf9JN4n@pZW#}^bs+A-MQ4xDZq zl%&V*j1TUBj7zU8VDa$skXpze$QMZ3@Z^|IhpB0gH5-CBaoq_c*bM+Mq9elYq64!| z*$!>li)Z>6BfE1W2ZM}83{4fqpxUmwKYAgcmRq86qz+=nLg5g|DjL zk`dNrGS#*UrT%0f`89AOv}%YiE1sfQ2t-UPbs`*P+cLo!HMp?YFfwGVdZUPw3}0$Z z|82fc$WbIOQYLYMkrLiqg)8Y4StU6@!~QXhERtGYKz3T+(GP!AM)nwU+fm^@D6)Z0 zWoY+qt{2m=#Idtp9h5yvxq;6M?C$h)?DWg4kgmLt3u_08*AGtuSuNWsAtf*&0nGZn zXxRro)#pH}DchP6v<@9n)$Xh@g6@htd3OaE7QH=YS3DA2iqG)6P5V4EXS(vX7Ycql zCK*~-ePI-2`3ik?{NJwNkx}l#tqU-a;KQLvG)N5c&)62=rMw;cx82;ouIlftfs`Fw zF9&vhqV?SVsgvQaVy~w7cR-~!h;9#lv=V%v1kU(lA%`oVf5-5-jNO8muv=NkPX&Hv zb@)>;+-UEQMFPGDt`z*8*3HiGnTegp3Zii_A^_2r>k1&@@;e_8ExQm2f1jvxl^zKxHxzCohB$2pF*)Ka ziz@(g_@w~<$(##BD5B2(3d$LI3H_S}A2BteuJ$UmOZ0D%uJm$$+*%0QxqrSJ5LKU7 z{E(Rcod3@^F`_2%ik}>d$iKYV5G21OBW4PslHm$El=#okKUEHhM8u)yDi_@% literal 0 HcmV?d00001 diff --git a/src/ext/vamsas/JpredSoapBindingStub.java b/src/ext/vamsas/JpredSoapBindingStub.java old mode 100755 new mode 100644 index cff8081..8345551 --- a/src/ext/vamsas/JpredSoapBindingStub.java +++ b/src/ext/vamsas/JpredSoapBindingStub.java @@ -31,7 +31,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub private java.util.Vector cachedDeserFactories = new java.util.Vector(); - static org.apache.axis.description.OperationDesc[] _operations; + private static org.apache.axis.description.OperationDesc[] _operations; static { @@ -260,6 +260,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public java.lang.String predict(vamsas.objects.simple.Sequence seq) throws java.rmi.RemoteException { @@ -297,6 +298,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public java.lang.String predictOnMsa( vamsas.objects.simple.Msfalignment msf) throws java.rmi.RemoteException @@ -335,6 +337,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public vamsas.objects.simple.Secstructpred getpredict( java.lang.String job_id) throws java.rmi.RemoteException { @@ -373,6 +376,7 @@ public class JpredSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public vamsas.objects.simple.JpredResult getresult(java.lang.String job_id) throws java.rmi.RemoteException { diff --git a/src/ext/vamsas/MuscleWSSoapBindingStub.java b/src/ext/vamsas/MuscleWSSoapBindingStub.java index 1f8d231..026066c 100755 --- a/src/ext/vamsas/MuscleWSSoapBindingStub.java +++ b/src/ext/vamsas/MuscleWSSoapBindingStub.java @@ -23,7 +23,7 @@ package ext.vamsas; public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub implements ext.vamsas.MuscleWS { - static org.apache.axis.description.OperationDesc[] _operations; + private static final org.apache.axis.description.OperationDesc[] _operations; static { @@ -296,6 +296,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public vamsas.objects.simple.WsJobId align( vamsas.objects.simple.SequenceSet seqSet) throws java.rmi.RemoteException @@ -337,6 +338,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public vamsas.objects.simple.Alignment getalign(java.lang.String job_id) throws java.rmi.RemoteException { @@ -378,6 +380,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public vamsas.objects.simple.MsaResult getResult(java.lang.String job_id) throws java.rmi.RemoteException { @@ -419,6 +422,7 @@ public class MuscleWSSoapBindingStub extends org.apache.axis.client.Stub } } + @Override public vamsas.objects.simple.WsJobId cancel(java.lang.String jobId) throws java.rmi.RemoteException { diff --git a/src/ext/vamsas/RegistryServiceSoapBindingStub.java b/src/ext/vamsas/RegistryServiceSoapBindingStub.java index 08b2a6b..f010ee8 100755 --- a/src/ext/vamsas/RegistryServiceSoapBindingStub.java +++ b/src/ext/vamsas/RegistryServiceSoapBindingStub.java @@ -31,7 +31,7 @@ public class RegistryServiceSoapBindingStub extends private java.util.Vector cachedDeserFactories = new java.util.Vector(); - static org.apache.axis.description.OperationDesc[] _operations; + private static org.apache.axis.description.OperationDesc[] _operations; static { @@ -192,6 +192,7 @@ public class RegistryServiceSoapBindingStub extends } } + @Override public ext.vamsas.ServiceHandles getServices() throws java.rmi.RemoteException { diff --git a/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java b/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java index 390ceb6..df0a504 100644 --- a/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java +++ b/src/ext/vamsas/SeqSearchServiceSoapBindingStub.java @@ -31,7 +31,7 @@ public class SeqSearchServiceSoapBindingStub extends private java.util.Vector cachedDeserFactories = new java.util.Vector(); - static org.apache.axis.description.OperationDesc[] _operations; + private static final org.apache.axis.description.OperationDesc[] _operations; static { @@ -299,6 +299,7 @@ public class SeqSearchServiceSoapBindingStub extends } } + @Override public java.lang.String getDatabase() throws java.rmi.RemoteException { if (super.cachedEndpoint == null) @@ -335,6 +336,7 @@ public class SeqSearchServiceSoapBindingStub extends } } + @Override public vamsas.objects.simple.SeqSearchResult getResult( java.lang.String job_id) throws java.rmi.RemoteException { @@ -373,6 +375,7 @@ public class SeqSearchServiceSoapBindingStub extends } } + @Override public vamsas.objects.simple.WsJobId psearch( vamsas.objects.simple.Alignment al, java.lang.String database) throws java.rmi.RemoteException @@ -412,6 +415,7 @@ public class SeqSearchServiceSoapBindingStub extends } } + @Override public vamsas.objects.simple.WsJobId search( vamsas.objects.simple.Sequence s, java.lang.String database) throws java.rmi.RemoteException @@ -450,6 +454,7 @@ public class SeqSearchServiceSoapBindingStub extends } } + @Override public vamsas.objects.simple.WsJobId cancel(java.lang.String jobId) throws java.rmi.RemoteException { diff --git a/src/ext/vamsas/ServiceHandle.java b/src/ext/vamsas/ServiceHandle.java index 83412ea..428b5ea 100755 --- a/src/ext/vamsas/ServiceHandle.java +++ b/src/ext/vamsas/ServiceHandle.java @@ -126,6 +126,7 @@ public class ServiceHandle implements java.io.Serializable private java.lang.Object __equalsCalc = null; + @Override public synchronized boolean equals(java.lang.Object obj) { if (obj == null) @@ -162,6 +163,7 @@ public class ServiceHandle implements java.io.Serializable private boolean __hashCodeCalc = false; + @Override public synchronized int hashCode() { if (__hashCodeCalc) @@ -191,7 +193,7 @@ public class ServiceHandle implements java.io.Serializable } // Type metadata - private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc( + private static final org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc( ServiceHandle.class, true); static diff --git a/src/jalview/analysis/AlignmentSorter.java b/src/jalview/analysis/AlignmentSorter.java index 7ecce49..e5038ba 100755 --- a/src/jalview/analysis/AlignmentSorter.java +++ b/src/jalview/analysis/AlignmentSorter.java @@ -29,6 +29,7 @@ import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.datamodel.SequenceNode; +import jalview.util.Platform; import jalview.util.QuickSort; import java.util.ArrayList; @@ -53,38 +54,77 @@ import java.util.List; */ public class AlignmentSorter { + + static AlignmentSorter instance; + + public static AlignmentSorter getInstance() + { + + // BH 2019.05.08 need to isolate static fields in JavaScript + + AlignmentSorter i = instance; + @SuppressWarnings("unused") + ThreadGroup g = null; + if (Platform.isJS()) + { + g = Thread.currentThread().getThreadGroup(); + /** + * @j2sNative i = g._jalviewScoreModelsInstance; + * + */ + } + if (i == null) + { + i = new AlignmentSorter(); + + if (Platform.isJS()) + { + /** + * @j2sNative g._jalviewScoreModelsInstance = i; + * + */ + } + else + { + instance = i; + } + } + return i; + } + /* * todo: refactor searches to follow a basic pattern: (search property, last * search state, current sort direction) */ - static boolean sortIdAscending = true; + boolean sortIdAscending = true; - static int lastGroupHash = 0; + int lastGroupHash = 0; - static boolean sortGroupAscending = true; + boolean sortGroupAscending = true; - static AlignmentOrder lastOrder = null; + AlignmentOrder lastOrder = null; - static boolean sortOrderAscending = true; + boolean sortOrderAscending = true; - static TreeModel lastTree = null; + TreeModel lastTree = null; - static boolean sortTreeAscending = true; + boolean sortTreeAscending = true; - /* + + /** * last Annotation Label used for sort by Annotation score */ - private static String lastSortByAnnotation; + private String lastSortByAnnotation; - /* - * string hash of last arguments to sortByFeature - * (sort order toggles if this is unchanged between sorts) + /** + * string hash of last arguments to sortByFeature (sort order toggles if this + * is unchanged between sorts) */ - private static String sortByFeatureCriteria; + private String sortByFeatureCriteria; - private static boolean sortByFeatureAscending = true; + private boolean sortByFeatureAscending = true; - private static boolean sortLengthAscending; + private boolean sortLengthAscending; /** * Sorts sequences in the alignment by Percentage Identity with the given @@ -222,7 +262,8 @@ public class AlignmentSorter QuickSort.sort(ids, seqs); - if (sortIdAscending) + AlignmentSorter as = getInstance(); + if (as.sortIdAscending) { setReverseOrder(align, seqs); } @@ -231,7 +272,7 @@ public class AlignmentSorter setOrder(align, seqs); } - sortIdAscending = !sortIdAscending; + as.sortIdAscending = !as.sortIdAscending; } /** @@ -255,7 +296,9 @@ public class AlignmentSorter QuickSort.sort(length, seqs); - if (sortLengthAscending) + AlignmentSorter as = getInstance(); + + if (as.sortLengthAscending) { setReverseOrder(align, seqs); } @@ -264,7 +307,7 @@ public class AlignmentSorter setOrder(align, seqs); } - sortLengthAscending = !sortLengthAscending; + as.sortLengthAscending = !as.sortLengthAscending; } /** @@ -281,14 +324,16 @@ public class AlignmentSorter // ORDERS BY GROUP SIZE List groups = new ArrayList<>(); - if (groups.hashCode() != lastGroupHash) + AlignmentSorter as = getInstance(); + + if (groups.hashCode() != as.lastGroupHash) { - sortGroupAscending = true; - lastGroupHash = groups.hashCode(); + as.sortGroupAscending = true; + as.lastGroupHash = groups.hashCode(); } else { - sortGroupAscending = !sortGroupAscending; + as.sortGroupAscending = !as.sortGroupAscending; } // SORTS GROUPS BY SIZE @@ -328,7 +373,7 @@ public class AlignmentSorter } } - if (sortGroupAscending) + if (as.sortGroupAscending) { setOrder(align, seqs); } @@ -401,16 +446,18 @@ public class AlignmentSorter // Get an ordered vector of sequences which may also be present in align List tmp = order.getOrder(); - if (lastOrder == order) + AlignmentSorter as = getInstance(); + + if (as.lastOrder == order) { - sortOrderAscending = !sortOrderAscending; + as.sortOrderAscending = !as.sortOrderAscending; } else { - sortOrderAscending = true; + as.sortOrderAscending = true; } - if (sortOrderAscending) + if (as.sortOrderAscending) { setOrder(align, tmp); } @@ -473,18 +520,20 @@ public class AlignmentSorter { List tmp = getOrderByTree(align, tree); + AlignmentSorter as = getInstance(); + // tmp should properly permute align with tree. - if (lastTree != tree) + if (as.lastTree != tree) { - sortTreeAscending = true; - lastTree = tree; + as.sortTreeAscending = true; + as.lastTree = tree; } else { - sortTreeAscending = !sortTreeAscending; + as.sortTreeAscending = !as.sortTreeAscending; } - if (sortTreeAscending) + if (as.sortTreeAscending) { setOrder(align, tmp); } @@ -658,9 +707,12 @@ public class AlignmentSorter } jalview.util.QuickSort.sort(scores, seqs); - if (lastSortByAnnotation != scoreLabel) + + AlignmentSorter as = getInstance(); + + if (as.lastSortByAnnotation != scoreLabel) { - lastSortByAnnotation = scoreLabel; + as.lastSortByAnnotation = scoreLabel; setOrder(alignment, seqs); } else @@ -809,6 +861,8 @@ public class AlignmentSorter } } + boolean doSort = false; + if (FEATURE_SCORE.equals(method)) { if (hasScores == 0) @@ -834,7 +888,7 @@ public class AlignmentSorter } } } - QuickSort.sortByDouble(scores, seqs, sortByFeatureAscending); + doSort = true; } else if (FEATURE_DENSITY.equals(method)) { @@ -846,9 +900,12 @@ public class AlignmentSorter // System.err.println("Sorting on Density: seq "+seqs[i].getName()+ // " Feats: "+featureCount+" Score : "+scores[i]); } - QuickSort.sortByDouble(scores, seqs, sortByFeatureAscending); + doSort = true; + } + if (doSort) + { + QuickSort.sortByDouble(scores, seqs, getInstance().sortByFeatureAscending); } - setOrder(alignment, seqs); } @@ -883,16 +940,17 @@ public class AlignmentSorter /* * if resorting on the same criteria, toggle sort order */ - if (sortByFeatureCriteria == null - || !scoreCriteria.equals(sortByFeatureCriteria)) + AlignmentSorter as = getInstance(); + if (as.sortByFeatureCriteria == null + || !scoreCriteria.equals(as.sortByFeatureCriteria)) { - sortByFeatureAscending = true; + as.sortByFeatureAscending = true; } else { - sortByFeatureAscending = !sortByFeatureAscending; + as.sortByFeatureAscending = !as.sortByFeatureAscending; } - sortByFeatureCriteria = scoreCriteria; + as.sortByFeatureCriteria = scoreCriteria; } } diff --git a/src/jalview/analysis/GeneticCodes.java b/src/jalview/analysis/GeneticCodes.java index 137b7f8..69a3846 100644 --- a/src/jalview/analysis/GeneticCodes.java +++ b/src/jalview/analysis/GeneticCodes.java @@ -12,13 +12,30 @@ import java.util.Map; import java.util.StringTokenizer; /** - * A singleton that provides instances of genetic code translation tables + * A static class that provides instances of genetic code translation tables * * @author gmcarstairs * @see https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi */ public final class GeneticCodes { + + /** + * As implemented, this has to be the first table defined in the data file. + */ + private static GeneticCodeI standardTable; + + /** + * + * @return the standard code table (table 1) + */ + public static GeneticCodeI getStandardCodeTable() + { + return (standardTable == null + ? standardTable = codeTables.values().iterator().next() + : standardTable); + } + private static final int CODON_LENGTH = 3; private static final String QUOTE = "\""; @@ -39,42 +56,31 @@ public final class GeneticCodes private static final String RESOURCE_FILE = "/GeneticCodes.dat"; - private static GeneticCodes instance = new GeneticCodes(); - - private Map ambiguityCodes; + private static final Map ambiguityCodes; /* * loaded code tables, with keys in order of loading */ - private Map codeTables; + private static final Map codeTables; - /** - * Private constructor enforces singleton - */ - private GeneticCodes() + static { - if (instance == null) - { - ambiguityCodes = new HashMap<>(); + ambiguityCodes = new HashMap<>(); - /* - * LinkedHashMap preserves order of addition of entries, - * so we can assume the Standard Code Table is the first - */ - codeTables = new LinkedHashMap<>(); - loadAmbiguityCodes(AMBIGUITY_CODES_FILE); - loadCodes(RESOURCE_FILE); - } + /* + * LinkedHashMap preserves order of addition of entries, + * so we can assume the Standard Code Table is the first + */ + codeTables = new LinkedHashMap<>(); + loadAmbiguityCodes(AMBIGUITY_CODES_FILE); + loadCodes(RESOURCE_FILE); } /** - * Returns the singleton instance of this class - * - * @return + * Private constructor enforces no instantiation */ - public static GeneticCodes getInstance() + private GeneticCodes() { - return instance; } /** @@ -82,41 +88,30 @@ public final class GeneticCodes * * @return */ - public Iterable getCodeTables() + public static Iterable getCodeTables() { return codeTables.values(); } /** - * Answers the code table with the given id + * Answers the code table with the given id -- test suite only * * @param id * @return */ - public GeneticCodeI getCodeTable(String id) + public static GeneticCodeI getCodeTable(String id) { return codeTables.get(id); } /** - * A convenience method that returns the standard code table (table 1). As - * implemented, this has to be the first table defined in the data file. - * - * @return - */ - public GeneticCodeI getStandardCodeTable() - { - return codeTables.values().iterator().next(); - } - - /** * Loads the code tables from a data file */ - protected void loadCodes(String fileName) + private static void loadCodes(String fileName) { try { - InputStream is = getClass().getResourceAsStream(fileName); + InputStream is = GeneticCodes.class.getResourceAsStream(fileName); if (is == null) { System.err.println("Resource file not found: " + fileName); @@ -163,11 +158,11 @@ public final class GeneticCodes * * @param fileName */ - protected void loadAmbiguityCodes(String fileName) + private static void loadAmbiguityCodes(String fileName) { try { - InputStream is = getClass().getResourceAsStream(fileName); + InputStream is = GeneticCodes.class.getResourceAsStream(fileName); if (is == null) { System.err.println("Resource file not found: " + fileName); @@ -209,7 +204,7 @@ public final class GeneticCodes * @return * @throws IOException */ - protected String readLine(BufferedReader dataIn) throws IOException + private static String readLine(BufferedReader dataIn) throws IOException { String line = dataIn.readLine(); while (line != null && line.startsWith("#")) @@ -247,7 +242,8 @@ public final class GeneticCodes * @return * @throws IOException */ - protected String loadOneTable(BufferedReader dataIn) throws IOException + private static String loadOneTable(BufferedReader dataIn) + throws IOException { String name = null; String id = null; @@ -307,7 +303,7 @@ public final class GeneticCodes * @param name * @param codons */ - protected void registerCodeTable(final String id, final String name, + private static void registerCodeTable(final String id, final String name, final Map codons) { codeTables.put(id, new GeneticCodeI() @@ -365,7 +361,7 @@ public final class GeneticCodes * @param codeTable * @return */ - protected String getAmbiguousTranslation(String codon, + protected static String getAmbiguousTranslation(String codon, Map ambiguous, GeneticCodeI codeTable) { if (codon.length() != CODON_LENGTH) @@ -423,4 +419,5 @@ public final class GeneticCodes ambiguous.put(codon, peptide); return peptide; } + } diff --git a/src/jalview/analysis/scoremodels/ScoreMatrix.java b/src/jalview/analysis/scoremodels/ScoreMatrix.java index b206339..c53ecdb 100644 --- a/src/jalview/analysis/scoremodels/ScoreMatrix.java +++ b/src/jalview/analysis/scoremodels/ScoreMatrix.java @@ -54,7 +54,8 @@ public class ScoreMatrix extends SimilarityScoreModel * score matrix (JAL-2397) * Set this flag to true (via Groovy) for 2.10.1 behaviour */ - private static boolean scoreGapAsAny = false; + // BH 2019.05.08 was static but not ever set + private boolean scoreGapAsAny = false; public static final short UNMAPPED = (short) -1; diff --git a/src/jalview/analysis/scoremodels/ScoreModels.java b/src/jalview/analysis/scoremodels/ScoreModels.java index ebc9a26..fd579dc 100644 --- a/src/jalview/analysis/scoremodels/ScoreModels.java +++ b/src/jalview/analysis/scoremodels/ScoreModels.java @@ -25,6 +25,7 @@ import jalview.api.analysis.ScoreModelI; import jalview.io.DataSourceType; import jalview.io.FileParse; import jalview.io.ScoreMatrixFile; +import jalview.util.Platform; import java.io.IOException; import java.util.LinkedHashMap; @@ -43,8 +44,6 @@ public class ScoreModels private static ScoreModels instance; - private Map models; - /** * Answers the singleton instance of this class, with lazy initialisation * (built-in score models are loaded on the first call to this method) @@ -53,13 +52,37 @@ public class ScoreModels */ public static ScoreModels getInstance() { - if (instance == null) + ScoreModels m = instance; + @SuppressWarnings("unused") + ThreadGroup g = null; + if (Platform.isJS()) { - instance = new ScoreModels(); + g = Thread.currentThread().getThreadGroup(); + /** + * @j2sNative m = g._jalviewScoreModelsInstance; + * + */ } - return instance; + if (m == null) + { + m = new ScoreModels(); + if (Platform.isJS()) + { + /** + * @j2sNative g._jalviewScoreModelsInstance = m; + * + */ + } + else + { + instance = m; + } + } + return m; } + private Map models; + /** * Private constructor to enforce use of singleton. Registers Jalview's * "built-in" score models: diff --git a/src/jalview/bin/ArgsParser.java b/src/jalview/bin/ArgsParser.java index c927f1f..2c6cea7 100644 --- a/src/jalview/bin/ArgsParser.java +++ b/src/jalview/bin/ArgsParser.java @@ -34,11 +34,58 @@ import java.util.Vector; */ public class ArgsParser { - Vector vargs = null; + + public static final String ANNOTATIONS = "annotations"; + + public static final String COLOUR = "colour"; + + public static final String FEATURES = "features"; + + public static final String GROOVY = "groovy"; + + public static final String GROUPS = "groups"; + + public static final String HEADLESS = "headless"; + + public static final String JABAWS = "jabaws"; + + public static final String NOANNOTATION = "no-annotation"; + + public static final String NOANNOTATION2 = "noannotation"; // BH 2019.05.07 + + public static final String NODISPLAY = "nodisplay"; + + public static final String NOGUI = "nogui"; + + public static final String NONEWS = "nonews"; + + public static final String NOQUESTIONNAIRE = "noquestionnaire"; + + public static final String NOSORTBYTREE = "nosortbytree"; + + public static final String NOUSAGESTATS = "nousagestats"; + + public static final String OPEN = "open"; + + public static final String PROPS = "props"; + + public static final String QUESTIONNAIRE = "questionnaire"; + + public static final String SETPROP = "setprop"; + + public static final String SORTBYTREE = "sortbytree"; + + public static final String TREE = "tree"; + + public static final String VDOC = "vdoc"; + + public static final String VSESS = "vsess"; + + private Vector vargs = null; public ArgsParser(String[] args) { - vargs = new Vector(); + vargs = new Vector<>(); for (int i = 0; i < args.length; i++) { String arg = args[i].trim(); diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index b6ff253..fe136bc 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -417,9 +417,9 @@ public class Cache } if (authorDetails == null) { - applicationProperties.remove("AUTHORS"); - applicationProperties.remove("AUTHORFNAMES"); - applicationProperties.remove("YEAR"); + applicationProperties.remove("AUTHORS"); + applicationProperties.remove("AUTHORFNAMES"); + applicationProperties.remove("YEAR"); } // FIND THE VERSION NUMBER AND BUILD DATE FROM jalview.jar @@ -445,7 +445,7 @@ public class Cache } if (buildDetails == null) { - applicationProperties.remove("VERSION"); + applicationProperties.remove("VERSION"); } String jnlpVersion = System.getProperty("jalview.version"); String codeVersion = getProperty("VERSION"); @@ -493,9 +493,8 @@ public class Cache // "DEFAULT_PDB_FILE_PARSER", DEFAULT_PDB_FILE_PARSER)); // jnlpVersion will be null if we're using InstallAnywhere // Dont do this check if running in headless mode - if (jnlpVersion == null && getDefault("VERSION_CHECK", true) - && (System.getProperty("java.awt.headless") == null || System - .getProperty("java.awt.headless").equals("false"))) + if (jnlpVersion == null && !Jalview.isHeadlessMode() + && getDefault("VERSION_CHECK", true)) { class VersionChecker extends Thread diff --git a/src/jalview/bin/Jalview.java b/src/jalview/bin/Jalview.java index 694fe00..fcda026 100755 --- a/src/jalview/bin/Jalview.java +++ b/src/jalview/bin/Jalview.java @@ -92,13 +92,58 @@ public class Jalview Platform.getURLCommandArguments(); } - // singleton instance of this class + private boolean headless; + + public static boolean isHeadlessMode() + { + return getInstance().headless; + } + + /** + * singleton instance of this class in Java only + */ private static Jalview instance; + public static Jalview getInstance() + { + Jalview j; + @SuppressWarnings("unused") + ThreadGroup g = Thread.currentThread().getThreadGroup(); + /** + * @j2sNative j = g._jalviewInstance; + */ + { + j = instance; + } + return j; + } + + private static void setInstance(Jalview j) + { + @SuppressWarnings("unused") + ThreadGroup g = Thread.currentThread().getThreadGroup(); + /** + * @j2s g._jalviewInstance = j; + */ + { + instance = j; + } + } + private Desktop desktop; - public static AlignFrame currentAlignFrame; + private AlignFrame currentAlignFrame; + + public static AlignFrame getCurrentAlignFrame() + { + return getInstance().currentAlignFrame; + } + + public static void setCurrentAlignFrame(AlignFrame currentAlignFrame) + { + getInstance().currentAlignFrame = currentAlignFrame; + } static { @@ -110,21 +155,21 @@ public class Jalview */ { // grab all the rights we can for the JVM - Policy.setPolicy(new Policy() - { - @Override - public PermissionCollection getPermissions(CodeSource codesource) - { - Permissions perms = new Permissions(); - perms.add(new AllPermission()); - return (perms); - } - - @Override - public void refresh() - { - } - }); + Policy.setPolicy(new Policy() + { + @Override + public PermissionCollection getPermissions(CodeSource codesource) + { + Permissions perms = new Permissions(); + perms.add(new AllPermission()); + return (perms); + } + + @Override + public void refresh() + { + } + }); } } @@ -187,11 +232,6 @@ public class Jalview } - public static Jalview getInstance() - { - return instance; - } - /** * main class for Jalview application * @@ -200,23 +240,23 @@ public class Jalview */ public static void main(String[] args) { -// setLogging(); // BH - for event debugging in JavaScript - instance = new Jalview(); - instance.doMain(args); -} + // setLogging(); // BH - for event debugging in JavaScript + setInstance(new Jalview()); + getInstance().doMain(args); + } - private static void logClass(String name) - { - // BH - for event debugging in JavaScript - ConsoleHandler consoleHandler = new ConsoleHandler(); - consoleHandler.setLevel(Level.ALL); - Logger logger = Logger.getLogger(name); - logger.setLevel(Level.ALL); - logger.addHandler(consoleHandler); + private static void logClass(String name) + { + // BH - for event debugging in JavaScript + ConsoleHandler consoleHandler = new ConsoleHandler(); + consoleHandler.setLevel(Level.ALL); + Logger logger = Logger.getLogger(name); + logger.setLevel(Level.ALL); + logger.addHandler(consoleHandler); } @SuppressWarnings("unused") - private static void setLogging() + private static void setLogging() { /** @@ -227,26 +267,23 @@ public class Jalview System.out.println("not in js"); } - // BH - for event debugging in JavaScript (Java mode only) + // BH - for event debugging in JavaScript (Java mode only) if (!Platform.isJS()) /** * Java only * * @j2sIgnore */ - { - Logger.getLogger("").setLevel(Level.ALL); - logClass("java.awt.EventDispatchThread"); - logClass("java.awt.EventQueue"); - logClass("java.awt.Component"); - logClass("java.awt.focus.Component"); - logClass("java.awt.focus.DefaultKeyboardFocusManager"); - } + { + Logger.getLogger("").setLevel(Level.ALL); + logClass("java.awt.EventDispatchThread"); + logClass("java.awt.EventQueue"); + logClass("java.awt.Component"); + logClass("java.awt.focus.Component"); + logClass("java.awt.focus.DefaultKeyboardFocusManager"); + } } - - - /** * @param args @@ -266,10 +303,9 @@ public class Jalview + System.getProperty("os.version")); ArgsParser aparser = new ArgsParser(args); - boolean headless = false; - String usrPropsFile = aparser.getValue("props"); - Cache.loadProperties(usrPropsFile); // must do this before + String usrPropsFile = aparser.getValue(ArgsParser.PROPS); + Cache.loadProperties(usrPropsFile); if (usrPropsFile != null) { System.out.println( @@ -288,15 +324,17 @@ public class Jalview showUsage(); System.exit(0); } - if (aparser.contains("nodisplay") || aparser.contains("nogui") - || aparser.contains("headless")) + if (aparser.contains(ArgsParser.NODISPLAY) + || aparser.contains(ArgsParser.NOGUI) + || aparser.contains(ArgsParser.HEADLESS) + || "true".equals(System.getProperty("java.awt.headless"))) { - System.setProperty("java.awt.headless", "true"); headless = true; } + // anything else! - final String jabawsUrl = aparser.getValue("jabaws"); + final String jabawsUrl = aparser.getValue(ArgsParser.JABAWS); if (jabawsUrl != null) { try @@ -312,7 +350,8 @@ public class Jalview } } - String defs = aparser.getValue("setprop"); + // check for property setting + String defs = aparser.getValue(ArgsParser.SETPROP); while (defs != null) { int p = defs.indexOf('='); @@ -325,15 +364,10 @@ public class Jalview System.out.println("Executing setprop argument: " + defs); if (Platform.isJS()) { - Cache.setProperty(defs.substring(0,p), defs.substring(p+1)); + Cache.setProperty(defs.substring(0, p), defs.substring(p + 1)); } } - defs = aparser.getValue("setprop"); - } - if (System.getProperty("java.awt.headless") != null - && System.getProperty("java.awt.headless").equals("true")) - { - headless = true; + defs = aparser.getValue(ArgsParser.SETPROP); } System.setProperty("http.agent", "Jalview Desktop/" + Cache.getDefault("VERSION", "Unknown")); @@ -377,8 +411,9 @@ public class Jalview "Failed to set QuaQua look and feel: " + e.toString()); } } - if (lookAndFeel == null || !(lookAndFeel.getClass() - .isAssignableFrom(UIManager.getLookAndFeel().getClass())) + if (lookAndFeel == null + || !(lookAndFeel.getClass().isAssignableFrom( + UIManager.getLookAndFeel().getClass())) || !UIManager.getLookAndFeel().getClass().toString() .toLowerCase().contains("quaqua")) { @@ -406,16 +441,7 @@ public class Jalview if (!headless) { - desktop = new Desktop() -// { -// // BH testing -// @Override -// protected void processEvent(AWTEvent e) { -// System.out.println("Jalview.java " + e); -// super.processEvent(e); -// } -// } - ; + desktop = new Desktop(); desktop.setInBatchMode(true); // indicate we are starting up desktop.setVisible(true); @@ -427,7 +453,7 @@ public class Jalview */ { desktop.startServiceDiscovery(); - if (!aparser.contains("nousagestats")) + if (!aparser.contains(ArgsParser.NOUSAGESTATS)) { startUsageStats(desktop); } @@ -436,9 +462,9 @@ public class Jalview System.err.println("CMD [-nousagestats] executed successfully!"); } - if (!aparser.contains("noquestionnaire")) + if (!aparser.contains(ArgsParser.NOQUESTIONNAIRE)) { - String url = aparser.getValue("questionnaire"); + String url = aparser.getValue(ArgsParser.QUESTIONNAIRE); if (url != null) { // Start the desktop questionnaire prompter with the specified @@ -470,7 +496,7 @@ public class Jalview .println("CMD [-noquestionnaire] executed successfully!"); } - if (!aparser.contains("nonews")) + if (!aparser.contains(ArgsParser.NONEWS)) { desktop.checkForNews(); } @@ -479,24 +505,24 @@ public class Jalview } } - String file = null, data = null; + String data = null; FileFormatI format = null; DataSourceType protocol = null; FileLoader fileLoader = new FileLoader(!headless); - String groovyscript = null; // script to execute after all loading is + // script to execute after all loading is // completed one way or another // extract groovy argument and execute if necessary - groovyscript = aparser.getValue("groovy", true); - file = aparser.getValue("open", true); + String groovyscript = aparser.getValue(ArgsParser.GROOVY, true); + String file = aparser.getValue(ArgsParser.OPEN, true); if (file == null && desktop == null) { System.out.println("No files to open!"); System.exit(1); } - String vamsasImport = aparser.getValue("vdoc"); - String vamsasSession = aparser.getValue("vsess"); + String vamsasImport = aparser.getValue(ArgsParser.VDOC); + String vamsasSession = aparser.getValue(ArgsParser.VSESS); if (vamsasImport != null || vamsasSession != null) { if (desktop == null || headless) @@ -594,11 +620,12 @@ public class Jalview System.out.println("CMD [-open " + file + "] executed successfully!"); if (!Platform.isJS()) - /** - * ignore in JavaScript -- can't just file existence - could load it? - * - * @j2sIgnore - */ + /** + * ignore in JavaScript -- can't just check file existence - could load + * it? + * + * @j2sIgnore + */ { if (!file.startsWith("http://") && !file.startsWith("https://")) // BH 2019 added https check for Java @@ -614,7 +641,7 @@ public class Jalview } } - protocol = AppletFormatAdapter.checkProtocol(file); + protocol = AppletFormatAdapter.checkProtocol(file); try { @@ -633,14 +660,13 @@ public class Jalview else { setCurrentAlignFrame(af); - data = aparser.getValue("colour", true); + data = aparser.getValue(ArgsParser.COLOUR, true); if (data != null) { data.replaceAll("%20", " "); - ColourSchemeI cs = ColourSchemeProperty - .getColourScheme(af.getViewport(), - af.getViewport().getAlignment(), data); + ColourSchemeI cs = ColourSchemeProperty.getColourScheme( + af.getViewport(), af.getViewport().getAlignment(), data); if (cs != null) { @@ -651,7 +677,7 @@ public class Jalview } // Must maintain ability to use the groups flag - data = aparser.getValue("groups", true); + data = aparser.getValue(ArgsParser.GROUPS, true); if (data != null) { af.parseFeaturesFile(data, @@ -660,7 +686,7 @@ public class Jalview System.out.println( "CMD groups[-" + data + "] executed successfully!"); } - data = aparser.getValue("features", true); + data = aparser.getValue(ArgsParser.FEATURES, true); if (data != null) { af.parseFeaturesFile(data, @@ -670,7 +696,7 @@ public class Jalview "CMD [-features " + data + "] executed successfully!"); } - data = aparser.getValue("annotations", true); + data = aparser.getValue(ArgsParser.ANNOTATIONS, true); if (data != null) { af.loadJalviewDataFile(data, null, null, null); @@ -679,7 +705,7 @@ public class Jalview "CMD [-annotations " + data + "] executed successfully!"); } // set or clear the sortbytree flag. - if (aparser.contains("sortbytree")) + if (aparser.contains(ArgsParser.SORTBYTREE)) { af.getViewport().setSortByTree(true); if (af.getViewport().getSortByTree()) @@ -687,7 +713,8 @@ public class Jalview System.out.println("CMD [-sortbytree] executed successfully!"); } } - if (aparser.contains("no-annotation")) + if (aparser.contains(ArgsParser.NOANNOTATION) + || aparser.contains(ArgsParser.NOANNOTATION2)) { af.getViewport().setShowAnnotation(false); if (!af.getViewport().isShowAnnotation()) @@ -695,7 +722,7 @@ public class Jalview System.out.println("CMD no-annotation executed successfully!"); } } - if (aparser.contains("nosortbytree")) + if (aparser.contains(ArgsParser.NOSORTBYTREE)) { af.getViewport().setSortByTree(false); if (!af.getViewport().getSortByTree()) @@ -704,7 +731,7 @@ public class Jalview .println("CMD [-nosortbytree] executed successfully!"); } } - data = aparser.getValue("tree", true); + data = aparser.getValue(ArgsParser.TREE, true); if (data != null) { try @@ -737,6 +764,10 @@ public class Jalview String imageName = "unnamed.png"; while (aparser.getSize() > 1) { + // PNG filename + // SVG filename + // HTML filename + // biojsmsa filename String outputFormat = aparser.nextValue(); file = aparser.nextValue(); @@ -951,8 +982,9 @@ public class Jalview /** * start a User Config prompt asking if we can log usage statistics. */ - PromptUserConfig prompter = new PromptUserConfig(Desktop.desktop, - "USAGESTATS", "Jalview Usage Statistics", + PromptUserConfig prompter = new PromptUserConfig( + Desktop.getDesktopPane(), "USAGESTATS", + "Jalview Usage Statistics", "Do you want to help make Jalview better by enabling " + "the collection of usage statistics with Google Analytics ?" + "\n\n(you can enable or disable usage tracking in the preferences)", @@ -1095,16 +1127,6 @@ public class Jalview } } - public static boolean isHeadlessMode() - { - String isheadless = System.getProperty("java.awt.headless"); - if (isheadless != null && isheadless.equalsIgnoreCase("true")) - { - return true; - } - return false; - } - public AlignFrame[] getAlignFrames() { return desktop == null ? new AlignFrame[] { getCurrentAlignFrame() } @@ -1128,13 +1150,4 @@ public class Jalview } } - public static AlignFrame getCurrentAlignFrame() - { - return Jalview.currentAlignFrame; - } - - public static void setCurrentAlignFrame(AlignFrame currentAlignFrame) - { - Jalview.currentAlignFrame = currentAlignFrame; - } } diff --git a/src/jalview/gui/AlignExportOptions.java b/src/jalview/gui/AlignExportOptions.java index 70601c9..3a8fb7c 100644 --- a/src/jalview/gui/AlignExportOptions.java +++ b/src/jalview/gui/AlignExportOptions.java @@ -96,7 +96,7 @@ public class AlignExportOptions extends JPanel this.settings = defaults; this.isComplexAlignFile = format.isComplexAlignFile(); init(viewport.hasHiddenRows(), viewport.hasHiddenColumns()); - dialog = JvOptionPane.newOptionDialog(Desktop.desktop); + dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane()); } /** diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 27a0f76..594319f 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -392,7 +392,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, }); buildColourMenu(); - if (Desktop.desktop != null) + if (Desktop.getDesktopPane() != null) { this.setDropTarget(new java.awt.dnd.DropTarget(this, this)); if (!Platform.isJS()) @@ -815,7 +815,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, private void addServiceListeners() { final java.beans.PropertyChangeListener thisListener; - Desktop.instance.addJalviewPropertyChangeListener("services", + Desktop.getInstance().addJalviewPropertyChangeListener("services", thisListener = new java.beans.PropertyChangeListener() { @Override @@ -846,7 +846,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, javax.swing.event.InternalFrameEvent evt) { // System.out.println("deregistering discoverer listener"); - Desktop.instance.removeJalviewPropertyChangeListener("services", + Desktop.getInstance().removeJalviewPropertyChangeListener("services", thisListener); closeMenuItem_actionPerformed(true); } @@ -1027,7 +1027,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void addFromFile_actionPerformed(ActionEvent e) { - Desktop.instance.inputLocalFileMenuItem_actionPerformed(viewport); + Desktop.getInstance().inputLocalFileMenuItem_actionPerformed(viewport); } @Override @@ -1041,7 +1041,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // file is reloaded. if (FileFormat.Jalview.equals(currentFileFormat)) { - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); for (int i = 0; i < frames.length; i++) { if (frames[i] instanceof AlignFrame && frames[i] != this @@ -1051,14 +1051,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, try { frames[i].setSelected(true); - Desktop.instance.closeAssociatedWindows(); + Desktop.getInstance().closeAssociatedWindows(); } catch (java.beans.PropertyVetoException ex) { } } } - Desktop.instance.closeAssociatedWindows(); + Desktop.getInstance().closeAssociatedWindows(); FileLoader loader = new FileLoader(); DataSourceType protocol = fileName.startsWith("http:") @@ -1116,14 +1116,14 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void addFromText_actionPerformed(ActionEvent e) { - Desktop.instance + Desktop.getInstance() .inputTextboxMenuItem_actionPerformed(viewport.getAlignPanel()); } @Override public void addFromURL_actionPerformed(ActionEvent e) { - Desktop.instance.inputURLMenuItem_actionPerformed(viewport); + Desktop.getInstance().inputURLMenuItem_actionPerformed(viewport); } @Override @@ -1167,7 +1167,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // todo is this (2005) test now obsolete - value is never null? while (currentFileFormat == null) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager .getString("label.select_file_format_before_saving"), MessageManager.getString("label.file_format_not_specified"), @@ -1939,7 +1939,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, .setContents(new StringSelection(""), null); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, - Desktop.instance); + Desktop.getInstance()); } catch (OutOfMemoryError er) { new OOMWarning("copying region", er); @@ -2439,7 +2439,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, + 1) == viewport.getAlignment().getWidth()) ? true : false; if (wholeHeight && wholeWidth) { - JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop); + JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane()); dialog.setResponseHandler(0, okAction); // 0 = OK_OPTION Object[] options = new Object[] { MessageManager.getString("action.ok"), MessageManager.getString("action.cancel") }; @@ -2913,7 +2913,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void gatherViews_actionPerformed(ActionEvent e) { - Desktop.instance.gatherViews(this); + Desktop.getInstance().gatherViews(this); } /** @@ -3690,7 +3690,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { if (_s.getLength() < sg.getEndRes()) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.getString( "label.selected_region_to_tree_may_only_contain_residues_or_gaps"), MessageManager.getString( @@ -4012,7 +4012,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, viewport.setCurrentTree(showNewickTree(fin, filePath).getTree()); } catch (Exception ex) { - JvOptionPane.showMessageDialog(Desktop.desktop, ex.getMessage(), + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), ex.getMessage(), MessageManager .getString("label.problem_reading_tree_file"), JvOptionPane.WARNING_MESSAGE); @@ -4020,7 +4020,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } if (fin != null && fin.hasWarningMessage()) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), fin.getWarningMessage(), MessageManager.getString( "label.possible_problem_with_tree_file"), @@ -4400,7 +4400,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, final String errorTitle = MessageManager .getString("label.implementation_error") + MessageManager.getString("label.translation_failed"); - JvOptionPane.showMessageDialog(Desktop.desktop, msg, errorTitle, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msg, errorTitle, JvOptionPane.ERROR_MESSAGE); return; } @@ -4410,7 +4410,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, "label.select_at_least_three_bases_in_at_least_one_sequence_to_cDNA_translation"); final String errorTitle = MessageManager .getString("label.translation_failed"); - JvOptionPane.showMessageDialog(Desktop.desktop, msg, errorTitle, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msg, errorTitle, JvOptionPane.WARNING_MESSAGE); } else @@ -4626,7 +4626,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, PDBEntry pe = new AssociatePdbFileWithSeq() .associatePdbWithSeq(fm[0].toString(), (DataSourceType) fm[1], toassoc, false, - Desktop.instance); + Desktop.getInstance()); if (pe != null) { System.err.println("Associated file : " @@ -4737,7 +4737,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { // some problem - if no warning its probable that the ID matching // process didn't work - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), tcf.getWarningMessage() == null ? MessageManager.getString( "label.check_file_matches_sequence_ids_alignment") @@ -4830,7 +4830,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, + (format != null ? "(parsing as '" + format + "' file)" : ""), - oom, Desktop.desktop); + oom, Desktop.getDesktopPane()); } } @@ -5639,7 +5639,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } catch (Exception ex) { System.err.println((ex.toString())); - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.couldnt_run_groovy_script"), MessageManager.getString("label.groovy_support_failed"), JvOptionPane.ERROR_MESSAGE); diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 7d01222..5f56fd9 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -384,7 +384,7 @@ public class AlignViewport extends AlignmentViewport if (align != null) { StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.registerMappings(align.getCodonFrames()); } @@ -406,7 +406,7 @@ public class AlignViewport extends AlignmentViewport if (mappings != null) { StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); for (AlignedCodonFrame acf : mappings) { if (noReferencesTo(acf)) @@ -532,7 +532,7 @@ public class AlignViewport extends AlignmentViewport public void sendSelection() { jalview.structure.StructureSelectionManager - .getStructureSelectionManager(Desktop.instance) + .getStructureSelectionManager(Desktop.getInstance()) .sendSelection(new SequenceGroup(getSelectionGroup()), new ColumnSelection(getColumnSelection()), new HiddenColumns(getAlignment().getHiddenColumns()), @@ -578,7 +578,7 @@ public class AlignViewport extends AlignmentViewport public StructureSelectionManager getStructureSelectionManager() { return StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); } @Override @@ -770,7 +770,7 @@ public class AlignViewport extends AlignmentViewport * dialog responses 0, 1, 2 (even though JOptionPane shows them * in reverse order) */ - JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop) + JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane()) .setResponseHandler(0, new Runnable() { @Override diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 9cb690f..20d06e9 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1376,8 +1376,7 @@ public class AlignmentPanel extends GAlignmentPanel implements { int seqPanelWidth = getSeqPanel().seqCanvas.getWidth(); - if (System.getProperty("java.awt.headless") != null - && System.getProperty("java.awt.headless").equals("true")) + if (Jalview.isHeadlessMode()) { seqPanelWidth = alignFrame.getWidth() - getVisibleIdWidth() - vscroll.getPreferredSize().width diff --git a/src/jalview/gui/AnnotationColourChooser.java b/src/jalview/gui/AnnotationColourChooser.java index e89c1c2..bd05be1 100644 --- a/src/jalview/gui/AnnotationColourChooser.java +++ b/src/jalview/gui/AnnotationColourChooser.java @@ -301,7 +301,7 @@ public class AnnotationColourChooser extends AnnotationRowFilter updateView(); } }; - JalviewColourChooser.showColourChooser(Desktop.getDesktop(), ttl, + JalviewColourChooser.showColourChooser(Desktop.getDesktopPane(), ttl, colourPanel.getBackground(), listener); } diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index a0a0df8..399f70f 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -971,7 +971,7 @@ public class AnnotationLabels extends JPanel seqs, omitHidden, alignmentStartEnd); Toolkit.getDefaultToolkit().getSystemClipboard() - .setContents(new StringSelection(output), Desktop.instance); + .setContents(new StringSelection(output), Desktop.getInstance()); HiddenColumns hiddenColumns = null; diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 7179a18..b88ac35 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -546,7 +546,7 @@ public class AppJmol extends StructureViewerBase } if (errormsgs.length() > 0) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.pdb_entries_couldnt_be_retrieved", new String[] { errormsgs.toString() }), diff --git a/src/jalview/gui/AssociatePdbFileWithSeq.java b/src/jalview/gui/AssociatePdbFileWithSeq.java index fe0aedf..154582f 100644 --- a/src/jalview/gui/AssociatePdbFileWithSeq.java +++ b/src/jalview/gui/AssociatePdbFileWithSeq.java @@ -65,7 +65,7 @@ public class AssociatePdbFileWithSeq if (prompt) { - reply = JvOptionPane.showInternalInputDialog(Desktop.desktop, + reply = JvOptionPane.showInternalInputDialog(Desktop.getDesktopPane(), MessageManager .getString("label.couldnt_find_pdb_id_in_file"), MessageManager.getString("label.no_pdb_id_in_file"), diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index 097a5a0..093eb48 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -545,7 +545,7 @@ public class CalculationChooser extends JPanel SequenceGroup sg = viewport.getSelectionGroup(); if (sg != null && sg.getSize() < MIN_TREE_SELECTION) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.you_need_at_least_n_sequences", MIN_TREE_SELECTION), diff --git a/src/jalview/gui/ChimeraViewFrame.java b/src/jalview/gui/ChimeraViewFrame.java index 9167c00..fff1eed 100644 --- a/src/jalview/gui/ChimeraViewFrame.java +++ b/src/jalview/gui/ChimeraViewFrame.java @@ -336,7 +336,7 @@ public class ChimeraViewFrame extends StructureViewerBase if (!jmb.launchChimera()) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.chimera_failed"), MessageManager.getString("label.error_loading_file"), JvOptionPane.ERROR_MESSAGE); @@ -497,7 +497,7 @@ public class ChimeraViewFrame extends StructureViewerBase if (errormsgs.length() > 0) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.pdb_entries_couldnt_be_retrieved", new Object[] { errormsgs.toString() }), diff --git a/src/jalview/gui/ColourMenuHelper.java b/src/jalview/gui/ColourMenuHelper.java index 6eab07d..6d0d0c9 100644 --- a/src/jalview/gui/ColourMenuHelper.java +++ b/src/jalview/gui/ColourMenuHelper.java @@ -158,7 +158,7 @@ public class ColourMenuHelper ActionListener al = radioItem.getActionListeners()[0]; radioItem.removeActionListener(al); int option = JvOptionPane.showInternalConfirmDialog( - Desktop.desktop, + Desktop.getDesktopPane(), MessageManager .getString("label.remove_from_default_list"), MessageManager diff --git a/src/jalview/gui/CrossRefAction.java b/src/jalview/gui/CrossRefAction.java index b5275e8..1feb15a 100644 --- a/src/jalview/gui/CrossRefAction.java +++ b/src/jalview/gui/CrossRefAction.java @@ -437,7 +437,7 @@ public class CrossRefAction implements Runnable .setGapCharacter(alignFrame.viewport.getGapCharacter()); StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); /* * register any new mappings for sequence mouseover etc diff --git a/src/jalview/gui/CutAndPasteTransfer.java b/src/jalview/gui/CutAndPasteTransfer.java index d328a0d..4badcba 100644 --- a/src/jalview/gui/CutAndPasteTransfer.java +++ b/src/jalview/gui/CutAndPasteTransfer.java @@ -234,7 +234,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer .println(MessageManager.getString("label.couldnt_read_data")); if (!Jalview.isHeadlessMode()) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), AppletFormatAdapter.getSupportedFormats(), MessageManager.getString("label.couldnt_read_data"), JvOptionPane.WARNING_MESSAGE); @@ -253,7 +253,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer } catch (IOException ex) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager .formatMessage("label.couldnt_read_pasted_text", new String[] { ex.toString() }), MessageManager.getString("label.error_parsing_text"), @@ -342,7 +342,7 @@ public class CutAndPasteTransfer extends GCutAndPasteTransfer .println(MessageManager.getString("label.couldnt_read_data")); if (!Jalview.isHeadlessMode()) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), AppletFormatAdapter.getSupportedFormats(), MessageManager.getString("label.couldnt_read_data"), JvOptionPane.WARNING_MESSAGE); diff --git a/src/jalview/gui/Desktop.java b/src/jalview/gui/Desktop.java index cd8330a..d2967d7 100644 --- a/src/jalview/gui/Desktop.java +++ b/src/jalview/gui/Desktop.java @@ -20,8 +20,6 @@ */ package jalview.gui; -import static jalview.util.UrlConstants.SEQUENCE_ID; - import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; import jalview.bin.Cache; @@ -134,26 +132,27 @@ import org.stackoverflowusers.file.WindowsShortcut; * @author $author$ * @version $Revision: 1.155 $ */ +@SuppressWarnings("serial") public class Desktop extends jalview.jbgui.GDesktop implements DropTargetListener, ClipboardOwner, IProgressIndicator, jalview.api.StructureSelectionManagerProvider { - private static int DEFAULT_MIN_WIDTH = 300; + private final static int DEFAULT_MIN_WIDTH = 300; - private static int DEFAULT_MIN_HEIGHT = 250; + private final static int DEFAULT_MIN_HEIGHT = 250; - private static int ALIGN_FRAME_DEFAULT_MIN_WIDTH = 600; + private final static int ALIGN_FRAME_DEFAULT_MIN_WIDTH = 600; - private static int ALIGN_FRAME_DEFAULT_MIN_HEIGHT = 70; + private final static int ALIGN_FRAME_DEFAULT_MIN_HEIGHT = 70; - private static final String EXPERIMENTAL_FEATURES = "EXPERIMENTAL_FEATURES"; + private final static String EXPERIMENTAL_FEATURES = "EXPERIMENTAL_FEATURES"; private JalviewChangeSupport changeSupport = new JalviewChangeSupport(); /** * news reader - null if it was never started. */ - private BlogReader jvnews = null; + BlogReader jvnews = null; private File projectFile; @@ -192,16 +191,47 @@ public class Desktop extends jalview.jbgui.GDesktop listener); } - /** Singleton Desktop instance */ - public static Desktop instance; + /** + * Singleton Desktop instance only in Java; + */ + private static Desktop instance; - public static MyDesktopPane desktop; + public static Desktop getInstance() + { + Desktop d; + @SuppressWarnings("unused") + ThreadGroup g = Thread.currentThread().getThreadGroup(); + /** + * @j2sNative d = g._jalviewDesktopInstance; + */ + { + d = instance; + } + return d; + } - public static MyDesktopPane getDesktop() + private static void setInstance(Desktop d) { - // BH 2018 could use currentThread() here as a reference to a - // Hashtable in JavaScript - return desktop; + @SuppressWarnings("unused") + ThreadGroup g = Thread.currentThread().getThreadGroup(); + /** + * @j2s g._jalviewDesktopInstance = d; + */ + { + instance = d; + } + } + + private MyDesktopPane desktopPane; + + public static MyDesktopPane getDesktopPane() + { + return getInstance().desktopPane; + } + + private void setDesktopPane(MyDesktopPane pane) + { + getInstance().desktopPane = pane; } static int openFrameCount = 0; @@ -237,7 +267,7 @@ public class Desktop extends jalview.jbgui.GDesktop } catch (NullPointerException npe) { Point p = getMousePosition(); - instance.showPasteMenu(p.x, p.y); + getInstance().showPasteMenu(p.x, p.y); } } @@ -285,14 +315,14 @@ public class Desktop extends jalview.jbgui.GDesktop public void endDraggingFrame(JComponent f) { delegate.endDraggingFrame(f); - desktop.repaint(); + getDesktopPane().repaint(); } @Override public void endResizingFrame(JComponent f) { delegate.endResizingFrame(f); - desktop.repaint(); + getDesktopPane().repaint(); } @Override @@ -352,7 +382,7 @@ public class Desktop extends jalview.jbgui.GDesktop * block are spawned off as threads rather than waited for during this * constructor. */ - instance = this; + setInstance(this); if (!Platform.isJS()) { doVamsasClientCheck(); @@ -365,10 +395,10 @@ public class Desktop extends jalview.jbgui.GDesktop false); boolean showjconsole = jalview.bin.Cache.getDefault("SHOW_JAVA_CONSOLE", false); - desktop = new MyDesktopPane(selmemusage); + setDesktopPane(new MyDesktopPane(selmemusage)); showMemusage.setSelected(selmemusage); - desktop.setBackground(Color.white); + getDesktopPane().setBackground(Color.white); getContentPane().setLayout(new BorderLayout()); // alternate config - have scrollbars - see notes in JAL-153 // JScrollPane sp = new JScrollPane(); @@ -381,17 +411,17 @@ public class Desktop extends jalview.jbgui.GDesktop getRootPane().putClientProperty("swingjs.overflow.hidden", "false"); } - getContentPane().add(desktop, BorderLayout.CENTER); - desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE); + getContentPane().add(getDesktopPane(), BorderLayout.CENTER); + getDesktopPane().setDragMode(JDesktopPane.OUTLINE_DRAG_MODE); // This line prevents Windows Look&Feel resizing all new windows to maximum // if previous window was maximised - desktop.setDesktopManager(new MyDesktopManager( + getDesktopPane().setDesktopManager(new MyDesktopManager( (Platform.isWindowsAndNotJS() ? new DefaultDesktopManager() : Platform.isAMacAndNotJS() ? new AquaInternalFrameManager( - desktop.getDesktopManager()) - : desktop.getDesktopManager()))); + getDesktopPane().getDesktopManager()) + : getDesktopPane().getDesktopManager()))); Rectangle dims = getLastKnownDimensions(""); if (dims != null) @@ -480,7 +510,7 @@ public class Desktop extends jalview.jbgui.GDesktop } - this.setDropTarget(new java.awt.dnd.DropTarget(desktop, this)); + this.setDropTarget(new java.awt.dnd.DropTarget(getDesktopPane(), this)); this.addWindowListener(new WindowAdapter() { @@ -512,7 +542,7 @@ public class Desktop extends jalview.jbgui.GDesktop } } }); - desktop.addMouseListener(ma); + getDesktopPane().addMouseListener(ma); } @@ -577,10 +607,10 @@ public class Desktop extends jalview.jbgui.GDesktop public void run() { Cache.log.debug("Downloading data from identifiers.org"); - UrlDownloadClient client = new UrlDownloadClient(); + // UrlDownloadClient client = new UrlDownloadClient(); try { - client.download(IdOrgSettings.getUrl(), + UrlDownloadClient.download(IdOrgSettings.getUrl(), IdOrgSettings.getDownloadLocation()); } catch (IOException e) { @@ -598,7 +628,7 @@ public class Desktop extends jalview.jbgui.GDesktop showNews(showNews.isSelected()); } - void showNews(boolean visible) + protected void showNews(boolean visible) { Cache.log.debug((visible ? "Showing" : "Hiding") + " news."); showNews.setSelected(visible); @@ -610,10 +640,10 @@ public class Desktop extends jalview.jbgui.GDesktop public void run() { long now = System.currentTimeMillis(); - Desktop.instance.setProgressBar( + Desktop.getInstance().setProgressBar( MessageManager.getString("status.refreshing_news"), now); jvnews.refreshNews(); - Desktop.instance.setProgressBar(null, now); + Desktop.getInstance().setProgressBar(null, now); jvnews.showNews(); } }).start(); @@ -718,7 +748,7 @@ public class Desktop extends jalview.jbgui.GDesktop } } - void showPasteMenu(int x, int y) + protected void showPasteMenu(int x, int y) { JPopupMenu popup = new JPopupMenu(); JMenuItem item = new JMenuItem( @@ -860,8 +890,7 @@ public class Desktop extends jalview.jbgui.GDesktop // A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN // IF JALVIEW IS RUNNING HEADLESS // /////////////////////////////////////////////// - if (instance == null || (System.getProperty("java.awt.headless") != null - && System.getProperty("java.awt.headless").equals("true"))) + if (instance == null || Jalview.isHeadlessMode()) { return; } @@ -901,13 +930,13 @@ public class Desktop extends jalview.jbgui.GDesktop * add an entry for the new frame in the Window menu * (and remove it when the frame is closed) */ - final JMenuItem menuItem = new JMenuItem(title); + JMenuItem menuItem = new JMenuItem(title); frame.addInternalFrameListener(new InternalFrameAdapter() { @Override public void internalFrameActivated(InternalFrameEvent evt) { - JInternalFrame itf = desktop.getSelectedFrame(); + JInternalFrame itf = getDesktopPane().getSelectedFrame(); if (itf != null) { if (itf instanceof AlignFrame) @@ -939,7 +968,7 @@ public class Desktop extends jalview.jbgui.GDesktop { menuItem.removeActionListener(menuItem.getActionListeners()[0]); } - windowMenu.remove(menuItem); + getInstance().windowMenu.remove(menuItem); }; }); @@ -961,9 +990,9 @@ public class Desktop extends jalview.jbgui.GDesktop setKeyBindings(frame); - desktop.add(frame); + getDesktopPane().add(frame); - windowMenu.add(menuItem); + getInstance().windowMenu.add(menuItem); frame.toFront(); try @@ -988,7 +1017,6 @@ public class Desktop extends jalview.jbgui.GDesktop */ private static void setKeyBindings(JInternalFrame frame) { - @SuppressWarnings("serial") final Action closeAction = new AbstractAction() { @Override @@ -1256,7 +1284,8 @@ public class Desktop extends jalview.jbgui.GDesktop { String msg = MessageManager .formatMessage("label.couldnt_locate", url); - JvOptionPane.showInternalMessageDialog(Desktop.desktop, msg, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), + msg, MessageManager.getString("label.url_not_found"), JvOptionPane.WARNING_MESSAGE); @@ -1277,7 +1306,8 @@ public class Desktop extends jalview.jbgui.GDesktop }; String dialogOption = MessageManager .getString("label.input_alignment_from_url"); - JvOptionPane.newOptionDialog(desktop).setResponseHandler(0, action) + JvOptionPane.newOptionDialog(getDesktopPane()) + .setResponseHandler(0, action) .showInternalDialog(panel, dialogOption, JvOptionPane.YES_NO_CANCEL_OPTION, JvOptionPane.PLAIN_MESSAGE, null, options, @@ -1363,7 +1393,7 @@ public class Desktop extends jalview.jbgui.GDesktop public void aboutMenuItem_actionPerformed(ActionEvent e) { // StringBuffer message = getAboutMessage(false); - // JvOptionPane.showInternalMessageDialog(Desktop.desktop, + // JvOptionPane.showInternalMessageDialog(Desktop.getDesktop(), // // message.toString(), "About Jalview", JvOptionPane.INFORMATION_MESSAGE); new Thread(new Runnable() @@ -1473,7 +1503,7 @@ public class Desktop extends jalview.jbgui.GDesktop public void closeAll_actionPerformed(ActionEvent e) { // TODO show a progress bar while closing? - JInternalFrame[] frames = desktop.getAllFrames(); + JInternalFrame[] frames = getDesktopPane().getAllFrames(); for (int i = 0; i < frames.length; i++) { try @@ -1544,7 +1574,7 @@ public class Desktop extends jalview.jbgui.GDesktop @Override protected void showMemusage_actionPerformed(ActionEvent e) { - desktop.showMemoryUsage(showMemusage.isSelected()); + getDesktopPane().showMemoryUsage(showMemusage.isSelected()); } /* @@ -1581,7 +1611,7 @@ public class Desktop extends jalview.jbgui.GDesktop void reorderAssociatedWindows(boolean minimize, boolean close) { - JInternalFrame[] frames = desktop.getAllFrames(); + JInternalFrame[] frames = getDesktopPane().getAllFrames(); if (frames == null || frames.length < 1) { return; @@ -1765,7 +1795,7 @@ public class Desktop extends jalview.jbgui.GDesktop saveState_actionPerformed(true); } - private void setProjectFile(File choice) + protected void setProjectFile(File choice) { this.projectFile = choice; } @@ -1815,7 +1845,7 @@ public class Desktop extends jalview.jbgui.GDesktop { Cache.log.error( "Problems whilst loading project from " + choice, ex); - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.error_whilst_loading_project_from", new Object[] @@ -1925,7 +1955,7 @@ public class Desktop extends jalview.jbgui.GDesktop */ public static AlignmentPanel[] getAlignmentPanels(String alignmentId) { - if (Desktop.desktop == null) + if (Desktop.getDesktopPane() == null) { // no frames created and in headless mode // TODO: verify that frames are recoverable when in headless mode @@ -1967,7 +1997,7 @@ public class Desktop extends jalview.jbgui.GDesktop public static AlignmentViewport[] getViewports(String sequenceSetId) { List viewp = new ArrayList<>(); - if (desktop != null) + if (getDesktopPane() != null) { AlignFrame[] frames = Desktop.getAlignFrames(); @@ -2053,7 +2083,7 @@ public class Desktop extends jalview.jbgui.GDesktop { source.viewport.setGatherViewsHere(true); source.viewport.setExplodedGeometry(source.getBounds()); - JInternalFrame[] frames = desktop.getAllFrames(); + JInternalFrame[] frames = getDesktopPane().getAllFrames(); String viewId = source.viewport.getSequenceSetId(); for (int t = 0; t < frames.length; t++) @@ -2110,7 +2140,7 @@ public class Desktop extends jalview.jbgui.GDesktop String fle = chooser.getSelectedFile().toString(); if (!vamsasImport(chooser.getSelectedFile())) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.couldnt_import_as_vamsas_session", new Object[] @@ -2411,7 +2441,7 @@ public class Desktop extends jalview.jbgui.GDesktop removeProgressPanel(progpanel); if (warnmsg != null) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), warnmsg, warnttl, JvOptionPane.ERROR_MESSAGE); } @@ -2448,7 +2478,7 @@ public class Desktop extends jalview.jbgui.GDesktop public JInternalFrame[] getAllFrames() { - return desktop.getAllFrames(); + return getDesktopPane().getAllFrames(); } /** @@ -2487,7 +2517,7 @@ public class Desktop extends jalview.jbgui.GDesktop while (li.hasNext()) { String link = li.next(); - if (link.contains(SEQUENCE_ID) + if (link.contains(UrlConstants.SEQUENCE_ID) && !UrlConstants.isDefaultString(link)) { check = true; @@ -2534,7 +2564,7 @@ public class Desktop extends jalview.jbgui.GDesktop }); msgPanel.add(jcb); - JvOptionPane.showMessageDialog(Desktop.desktop, msgPanel, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), msgPanel, MessageManager .getString("label.SEQUENCE_ID_no_longer_used"), JvOptionPane.WARNING_MESSAGE); @@ -2649,11 +2679,11 @@ public class Desktop extends jalview.jbgui.GDesktop { if (Jalview.isHeadlessMode()) { - // Desktop.desktop is null in headless mode - return new AlignFrame[] { Jalview.currentAlignFrame }; + // Desktop.getDesktop() is null in headless mode + return new AlignFrame[] { Jalview.getCurrentAlignFrame() }; } - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); if (frames == null) { @@ -2698,7 +2728,7 @@ public class Desktop extends jalview.jbgui.GDesktop */ public GStructureViewer[] getJmols() { - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); if (frames == null) { @@ -2734,7 +2764,7 @@ public class Desktop extends jalview.jbgui.GDesktop } catch (Exception ex) { jalview.bin.Cache.log.error("Groovy Shell Creation failed.", ex); - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.couldnt_create_groovy_shell"), MessageManager.getString("label.groovy_support_failed"), @@ -2745,7 +2775,7 @@ public class Desktop extends jalview.jbgui.GDesktop /** * Open the Groovy console */ - void openGroovyConsole() + private void openGroovyConsole() { if (groovyConsole == null) { @@ -2931,7 +2961,7 @@ public class Desktop extends jalview.jbgui.GDesktop */ public static AlignFrame getAlignFrameFor(AlignViewportI viewport) { - if (desktop != null) + if (getDesktopPane() != null) { AlignmentPanel[] aps = getAlignmentPanels( viewport.getSequenceSetId()); @@ -2993,7 +3023,7 @@ public class Desktop extends jalview.jbgui.GDesktop if (discoverer == null) { discoverer = new jalview.ws.jws1.Discoverer(); - // register PCS handler for desktop. + // register PCS handler for getDesktop(). discoverer.addPropertyChangeListener(changeSupport); } // JAL-940 - disabled JWS1 service configuration - always start discoverer @@ -3075,7 +3105,7 @@ public class Desktop extends jalview.jbgui.GDesktop * * jd.waitForInput(); */ - JvOptionPane.showConfirmDialog(Desktop.desktop, + JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), new JLabel("
" + ermsg + "
" + "

It may be that you have invalid JABA URLs
in your web service preferences," @@ -3101,7 +3131,7 @@ public class Desktop extends jalview.jbgui.GDesktop } } - private Runnable serviceChangedDialog = null; + Runnable serviceChangedDialog = null; /** * start a thread to open a URL in the configured browser. Pops up a warning @@ -3112,7 +3142,7 @@ public class Desktop extends jalview.jbgui.GDesktop */ public static void showUrl(final String url) { - showUrl(url, Desktop.instance); + showUrl(url, Desktop.getInstance()); } /** @@ -3141,7 +3171,7 @@ public class Desktop extends jalview.jbgui.GDesktop jalview.util.BrowserLauncher.openURL(url); } catch (Exception ex) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager .getString("label.web_browser_not_found_unix"), MessageManager.getString("label.web_browser_not_found"), @@ -3157,15 +3187,16 @@ public class Desktop extends jalview.jbgui.GDesktop }).start(); } - public static WsParamSetManager wsparamManager = null; + private WsParamSetManager wsparamManager = null; public static ParamManager getUserParameterStore() { - if (wsparamManager == null) + Desktop d = getInstance(); + if (d.wsparamManager == null) { - wsparamManager = new WsParamSetManager(); + d.wsparamManager = new WsParamSetManager(); } - return wsparamManager; + return d.wsparamManager; } /** @@ -3210,12 +3241,12 @@ public class Desktop extends jalview.jbgui.GDesktop /** * flag indicating if dialogExecutor should try to acquire a permit */ - private volatile boolean dialogPause = true; + volatile boolean dialogPause = true; /** * pause the queue */ - private java.util.concurrent.Semaphore block = new Semaphore(0); + java.util.concurrent.Semaphore block = new Semaphore(0); private static groovy.ui.Console groovyConsole; @@ -3241,7 +3272,7 @@ public class Desktop extends jalview.jbgui.GDesktop } ; } - if (instance == null) + if (getInstance() == null) { return; } @@ -3405,7 +3436,7 @@ public class Desktop extends jalview.jbgui.GDesktop String topViewId = myTopFrame.viewport.getSequenceSetId(); String bottomViewId = myBottomFrame.viewport.getSequenceSetId(); - JInternalFrame[] frames = desktop.getAllFrames(); + JInternalFrame[] frames = getDesktopPane().getAllFrames(); for (JInternalFrame frame : frames) { if (frame instanceof SplitFrame && frame != source) @@ -3468,6 +3499,7 @@ public class Desktop extends jalview.jbgui.GDesktop * - the payload from the drop event * @throws Exception */ + @SuppressWarnings("unchecked") public static void transferFromDropTarget(List files, List protocols, DropTargetDropEvent evt, Transferable t) throws Exception @@ -3538,7 +3570,7 @@ public class Desktop extends jalview.jbgui.GDesktop { // Works on Windows and MacOSX Cache.log.debug("Drop handled as javaFileListFlavor"); - for (Object file : (List) t + for (Object file : (List) t .getTransferData(DataFlavor.javaFileListFlavor)) { files.add(file); @@ -3702,7 +3734,7 @@ public class Desktop extends jalview.jbgui.GDesktop Class structureViewerClass) { List result = new ArrayList<>(); - JInternalFrame[] frames = Desktop.instance.getAllFrames(); + JInternalFrame[] frames = Desktop.getInstance().getAllFrames(); for (JInternalFrame frame : frames) { @@ -3721,4 +3753,5 @@ public class Desktop extends jalview.jbgui.GDesktop } return result; } + } diff --git a/src/jalview/gui/FeatureEditor.java b/src/jalview/gui/FeatureEditor.java index d547c58..a02ec36 100644 --- a/src/jalview/gui/FeatureEditor.java +++ b/src/jalview/gui/FeatureEditor.java @@ -222,7 +222,7 @@ public class FeatureEditor updateColourButton(mainPanel, colour, featureColour); }; }; - JalviewColourChooser.showColourChooser(Desktop.getDesktop(), + JalviewColourChooser.showColourChooser(Desktop.getDesktopPane(), title, featureColour.getColour(), listener); } else @@ -412,7 +412,7 @@ public class FeatureEditor * set dialog action handlers for OK (create/Amend) and Cancel options * also for Delete if applicable (when amending features) */ - JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop) + JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane()) .setResponseHandler(0, okAction).setResponseHandler(2, cancelAction); if (!forCreate) { diff --git a/src/jalview/gui/Finder.java b/src/jalview/gui/Finder.java index a1693f7..2a6adda 100755 --- a/src/jalview/gui/Finder.java +++ b/src/jalview/gui/Finder.java @@ -176,7 +176,7 @@ public class Finder extends GFinder */ boolean getFocusedViewport() { - if (focusfixed || Desktop.desktop == null) + if (focusfixed || Desktop.getDesktopPane() == null) { if (ap != null && av != null) { @@ -187,7 +187,7 @@ public class Finder extends GFinder } // now checks further down the window stack to fix bug // https://mantis.lifesci.dundee.ac.uk/view.php?id=36008 - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); for (int f = 0; f < frames.length; f++) { JInternalFrame alignFrame = frames[f]; diff --git a/src/jalview/gui/IdPanel.java b/src/jalview/gui/IdPanel.java index 6b312ad..dc94dee 100755 --- a/src/jalview/gui/IdPanel.java +++ b/src/jalview/gui/IdPanel.java @@ -246,7 +246,7 @@ public class IdPanel extends JPanel jalview.util.BrowserLauncher.openURL(url); } catch (Exception ex) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.web_browser_not_found_unix"), MessageManager.getString("label.web_browser_not_found"), JvOptionPane.WARNING_MESSAGE); diff --git a/src/jalview/gui/JalviewDialog.java b/src/jalview/gui/JalviewDialog.java index 1d7bf3d..0ff5606 100644 --- a/src/jalview/gui/JalviewDialog.java +++ b/src/jalview/gui/JalviewDialog.java @@ -78,11 +78,11 @@ public abstract class JalviewDialog extends JPanel boolean block, String title, int width, int height) { - frame = new JDialog(Desktop.instance, modal); + frame = new JDialog(Desktop.getInstance(), modal); frame.setTitle(title); - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { - Rectangle deskr = Desktop.instance.getBounds(); + Rectangle deskr = Desktop.getInstance().getBounds(); frame.setBounds(new Rectangle((int) (deskr.getCenterX() - width / 2), (int) (deskr.getCenterY() - height / 2), width, height)); } diff --git a/src/jalview/gui/LineartOptions.java b/src/jalview/gui/LineartOptions.java index d55733c..fc6fd23 100644 --- a/src/jalview/gui/LineartOptions.java +++ b/src/jalview/gui/LineartOptions.java @@ -86,7 +86,7 @@ public class LineartOptions extends JPanel ex.printStackTrace(); } - dialog = JvOptionPane.newOptionDialog(Desktop.desktop); + dialog = JvOptionPane.newOptionDialog(Desktop.getDesktopPane()); } /** diff --git a/src/jalview/gui/OOMWarning.java b/src/jalview/gui/OOMWarning.java index 02c8fe1..dc5d0f5 100644 --- a/src/jalview/gui/OOMWarning.java +++ b/src/jalview/gui/OOMWarning.java @@ -72,7 +72,7 @@ public class OOMWarning implements Runnable public OOMWarning(String string, OutOfMemoryError oomerror) { - this(string, oomerror, Desktop.desktop); + this(string, oomerror, Desktop.getDesktopPane()); } @Override diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index ad33110..a356def 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -307,7 +307,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener jalview.util.BrowserLauncher.openURL(url); } catch (Exception ex) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.web_browser_not_found_unix"), MessageManager.getString("label.web_browser_not_found"), JvOptionPane.WARNING_MESSAGE); @@ -1985,7 +1985,7 @@ public class PopupMenu extends JPopupMenu implements ColourChangeListener refresh(); }; }; - JalviewColourChooser.showColourChooser(Desktop.getDesktop(), + JalviewColourChooser.showColourChooser(Desktop.getDesktopPane(), title, Color.BLUE, listener); } diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 9d5596e..cc2961f 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -857,7 +857,7 @@ public class Preferences extends GPreferences Integer.toString(getComboIntStringKey(backupfilesPresetsCombo))); Cache.saveProperties(); - Desktop.instance.doConfigureStructurePrefs(); + Desktop.getInstance().doConfigureStructurePrefs(); try { frame.setClosed(true); @@ -968,7 +968,7 @@ public class Preferences extends GPreferences boolean valid = false; while (!valid) { - if (JvOptionPane.showInternalConfirmDialog(Desktop.desktop, link, + if (JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(), link, MessageManager.getString("label.new_sequence_url_link"), JvOptionPane.OK_CANCEL_OPTION, -1, null) == JvOptionPane.OK_OPTION) @@ -1020,7 +1020,7 @@ public class Preferences extends GPreferences boolean valid = false; while (!valid) { - if (JvOptionPane.showInternalConfirmDialog(Desktop.desktop, link, + if (JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(), link, MessageManager.getString("label.edit_sequence_url_link"), JvOptionPane.OK_CANCEL_OPTION, -1, null) == JvOptionPane.OK_OPTION) @@ -1193,7 +1193,7 @@ public class Preferences extends GPreferences } catch (NumberFormatException x) { userIdWidth.setText(""); - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager .getString("warn.user_defined_width_requirements"), MessageManager.getString("label.invalid_id_column_width"), @@ -1219,7 +1219,7 @@ public class Preferences extends GPreferences File f = new File(chimeraPath.getText()); if (!f.canExecute()) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.invalid_chimera_path"), MessageManager.getString("label.invalid_name"), JvOptionPane.ERROR_MESSAGE); @@ -1258,7 +1258,7 @@ public class Preferences extends GPreferences if (!found) { String[] options = { "OK", "Help" }; - int showHelp = JvOptionPane.showInternalOptionDialog(Desktop.desktop, + int showHelp = JvOptionPane.showInternalOptionDialog(Desktop.getDesktopPane(), JvSwingUtils.wrapTooltip(true, MessageManager.getString("label.chimera_missing")), "", JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE, diff --git a/src/jalview/gui/PromptUserConfig.java b/src/jalview/gui/PromptUserConfig.java index cb59452..77d83a8 100644 --- a/src/jalview/gui/PromptUserConfig.java +++ b/src/jalview/gui/PromptUserConfig.java @@ -200,7 +200,7 @@ public class PromptUserConfig implements Runnable } try { - int reply = JvOptionPane.showConfirmDialog(Desktop.desktop, // component, + int reply = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), // component, dialogText, dialogTitle, (allowCancel) ? JvOptionPane.YES_NO_CANCEL_OPTION : JvOptionPane.YES_NO_OPTION, diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 646a7f1..7b408a4 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -860,7 +860,7 @@ public class SequenceFetcher extends JPanel implements Runnable @Override public void run() { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, error, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), error, MessageManager.getString("label.error_retrieving_data"), JvOptionPane.WARNING_MESSAGE); } diff --git a/src/jalview/gui/SplashScreen.java b/src/jalview/gui/SplashScreen.java index 2b87e10..98b24d1 100755 --- a/src/jalview/gui/SplashScreen.java +++ b/src/jalview/gui/SplashScreen.java @@ -160,7 +160,7 @@ public class SplashScreen extends JPanel System.err.println("Error when loading images!"); } } while (!mt.checkAll()); - Desktop.instance.setIconImage(logo); + Desktop.getInstance().setIconImage(logo); } } catch (Exception ex) { @@ -191,7 +191,7 @@ public class SplashScreen extends JPanel } add(authlist, BorderLayout.CENTER); authlist.addMouseListener(closer); - Desktop.desktop.add(iframe); + Desktop.getDesktopPane().add(iframe); refreshText(); } @@ -203,7 +203,7 @@ public class SplashScreen extends JPanel @SuppressWarnings("unused") protected boolean refreshText() { - String newtext = Desktop.instance.getAboutMessage(true).toString(); + String newtext = Desktop.getInstance().getAboutMessage(true).toString(); // System.err.println("Text found: \n"+newtext+"\nEnd of newtext."); if (oldtext != newtext.length()) { @@ -236,8 +236,8 @@ public class SplashScreen extends JPanel authlist.setSize(new Dimension(750, 375)); add(authlist, BorderLayout.CENTER); revalidate(); - iframe.setBounds((Desktop.instance.getWidth() - 750) / 2, - (Desktop.instance.getHeight() - 375) / 2, 750, + iframe.setBounds((Desktop.getInstance().getWidth() - 750) / 2, + (Desktop.getInstance().getHeight() - 375) / 2, 750, authlist.getHeight() + iconimg.getHeight()); iframe.validate(); iframe.setVisible(true); @@ -287,7 +287,7 @@ public class SplashScreen extends JPanel } closeSplash(); - Desktop.instance.startDialogQueue(); + Desktop.getInstance().startDialogQueue(); } /** diff --git a/src/jalview/gui/SplitFrame.java b/src/jalview/gui/SplitFrame.java index e066c75..55a9c61 100644 --- a/src/jalview/gui/SplitFrame.java +++ b/src/jalview/gui/SplitFrame.java @@ -132,7 +132,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI // allow about 65 pixels for Desktop decorators on Windows int newHeight = Math.min(height, - Desktop.instance.getHeight() - DESKTOP_DECORATORS_HEIGHT); + Desktop.getInstance().getHeight() - DESKTOP_DECORATORS_HEIGHT); if (newHeight != height) { int oldDividerLocation = getDividerLocation(); @@ -150,7 +150,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI // TODO if CommandListener is only ever 1:1 for complementary views, // may change broadcast pattern to direct messaging (more efficient) final StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.addCommandListener(((AlignFrame) getTopFrame()).getViewport()); ssm.addCommandListener(((AlignFrame) getBottomFrame()).getViewport()); } @@ -556,7 +556,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI adjustLayout(); final StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.addCommandListener(newTopPanel.av); ssm.addCommandListener(newBottomPanel.av); } @@ -683,7 +683,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI */ protected void expandViews_actionPerformed() { - Desktop.instance.explodeViews(this); + Desktop.getInstance().explodeViews(this); } /** @@ -692,7 +692,7 @@ public class SplitFrame extends GSplitFrame implements SplitContainerI */ protected void gatherViews_actionPerformed() { - Desktop.instance.gatherViews(this); + Desktop.getInstance().gatherViews(this); } /** diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 23b7fcf..5b15ef1 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -148,7 +148,7 @@ public class StructureChooser extends GStructureChooser */ private void discoverStructureViews() { - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { targetView.removeAllItems(); if (lastTargetedView != null && !lastTargetedView.isVisible()) @@ -156,7 +156,7 @@ public class StructureChooser extends GStructureChooser lastTargetedView = null; } int linkedViewsAt = 0; - for (StructureViewerBase view : Desktop.instance + for (StructureViewerBase view : Desktop.getInstance() .getStructureViewers(null, null)) { StructureViewer viewHandler = (lastTargetedView != null @@ -998,7 +998,7 @@ public class StructureChooser extends GStructureChooser PDBEntry fileEntry = new AssociatePdbFileWithSeq() .associatePdbWithSeq(selectedPdbFileName, DataSourceType.FILE, selectedSequence, true, - Desktop.instance); + Desktop.getInstance()); sViewer = launchStructureViewer( ssm, new PDBEntry[] diff --git a/src/jalview/gui/StructureViewerBase.java b/src/jalview/gui/StructureViewerBase.java index 418a84d..af48093 100644 --- a/src/jalview/gui/StructureViewerBase.java +++ b/src/jalview/gui/StructureViewerBase.java @@ -407,7 +407,7 @@ public abstract class StructureViewerBase extends GStructureViewer */ protected List getViewersFor(AlignmentPanel alp) { - return Desktop.instance.getStructureViewers(alp, this.getClass()); + return Desktop.getInstance().getStructureViewers(alp, this.getClass()); } @Override diff --git a/src/jalview/gui/UserDefinedColours.java b/src/jalview/gui/UserDefinedColours.java index 4846049..2f18f43 100755 --- a/src/jalview/gui/UserDefinedColours.java +++ b/src/jalview/gui/UserDefinedColours.java @@ -448,7 +448,7 @@ public class UserDefinedColours extends GUserDefinedColours { if (isNoSelectionMade()) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager .getString("label.no_colour_selection_in_scheme"), MessageManager.getString("label.no_colour_selection_warn"), @@ -503,7 +503,7 @@ public class UserDefinedColours extends GUserDefinedColours String[] options = new String[] { title, MessageManager.getString("label.dont_save_changes"), }; final String question = JvSwingUtils.wrapTooltip(true, message); - int response = JvOptionPane.showOptionDialog(Desktop.desktop, + int response = JvOptionPane.showOptionDialog(Desktop.getDesktopPane(), question, title, JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null, options, options[0]); @@ -557,7 +557,7 @@ public class UserDefinedColours extends GUserDefinedColours { if (isNoSelectionMade()) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager .getString("label.no_colour_selection_in_scheme"), MessageManager.getString("label.no_colour_selection_warn"), @@ -741,7 +741,7 @@ public class UserDefinedColours extends GUserDefinedColours String name = schemeName.getText().trim(); if (name.length() < 1) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager .getString("label.user_colour_scheme_must_have_name"), MessageManager.getString("label.no_name_colour_scheme"), @@ -756,7 +756,7 @@ public class UserDefinedColours extends GUserDefinedColours * @j2sIgnore */ { - int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop, + int reply = JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.colour_scheme_exists_overwrite", new Object[] { name, name }), diff --git a/src/jalview/gui/UserQuestionnaireCheck.java b/src/jalview/gui/UserQuestionnaireCheck.java index ef86756..e12586a 100644 --- a/src/jalview/gui/UserQuestionnaireCheck.java +++ b/src/jalview/gui/UserQuestionnaireCheck.java @@ -141,7 +141,7 @@ public class UserQuestionnaireCheck implements Runnable + qid + "&rid=" + rid; jalview.bin.Cache.log .info("Prompting user for questionnaire at " + qurl); - int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop, + int reply = JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(), MessageManager.getString("label.jalview_new_questionnaire"), MessageManager.getString("label.jalview_user_survey"), JvOptionPane.YES_NO_OPTION, JvOptionPane.QUESTION_MESSAGE); diff --git a/src/jalview/gui/VamsasApplication.java b/src/jalview/gui/VamsasApplication.java index c094b1c..2053fb2 100644 --- a/src/jalview/gui/VamsasApplication.java +++ b/src/jalview/gui/VamsasApplication.java @@ -173,7 +173,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource } } catch (InvalidSessionDocumentException e) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString( "label.vamsas_doc_couldnt_be_opened_as_new_session"), @@ -455,7 +455,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource VamsasAppDatastore vds = new VamsasAppDatastore(doc, vobj2jv, jv2vobj, baseProvEntry(), alRedoState); // wander through frames - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); if (frames == null) { @@ -660,7 +660,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource Cache.log.debug( "Asking user if the vamsas session should be stored."); int reply = JvOptionPane.showInternalConfirmDialog( - Desktop.desktop, + Desktop.getDesktopPane(), "The current VAMSAS session has unsaved data - do you want to save it ?", "VAMSAS Session Shutdown", JvOptionPane.YES_NO_OPTION, @@ -669,7 +669,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource if (reply == JvOptionPane.YES_OPTION) { Cache.log.debug("Prompting for vamsas store filename."); - Desktop.instance.vamsasSave_actionPerformed(null); + Desktop.getInstance().vamsasSave_actionPerformed(null); Cache.log .debug("Finished attempt at storing document."); } @@ -688,7 +688,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource public void disableGui(boolean b) { - Desktop.instance.setVamsasUpdate(b); + Desktop.getInstance().setVamsasUpdate(b); } Hashtable _backup_vobj2jv; @@ -763,7 +763,7 @@ public class VamsasApplication implements SelectionSource, VamsasSource { final IPickManager pm = vclient.getPickManager(); final StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); final VamsasApplication me = this; pm.registerMessageHandler(new IMessageHandler() { diff --git a/src/jalview/gui/WebserviceInfo.java b/src/jalview/gui/WebserviceInfo.java index c6137cc..ae013ec 100644 --- a/src/jalview/gui/WebserviceInfo.java +++ b/src/jalview/gui/WebserviceInfo.java @@ -711,7 +711,7 @@ public class WebserviceInfo extends GWebserviceInfo @Override public void run() { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, message, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), message, title, JvOptionPane.WARNING_MESSAGE); } diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index 976e551..da00a25 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -215,12 +215,12 @@ public class WsJobParameters extends JPanel implements ItemListener, public boolean showRunDialog() { - frame = new JDialog(Desktop.instance, true); + frame = new JDialog(Desktop.getInstance(), true); frame.setTitle(MessageManager.formatMessage("label.edit_params_for", new String[] { service.getActionText() })); - Rectangle deskr = Desktop.instance.getBounds(); + Rectangle deskr = Desktop.getInstance().getBounds(); Dimension pref = this.getPreferredSize(); frame.setBounds( new Rectangle((int) (deskr.getCenterX() - pref.width / 2), @@ -436,8 +436,8 @@ public class WsJobParameters extends JPanel implements ItemListener, dialogpanel.add(canceljob); // JAL-1580: setMaximumSize() doesn't work, so just size for the worst case: // check for null is for JUnit usage - final int windowHeight = Desktop.instance == null ? 540 - : Desktop.instance.getHeight(); + final int windowHeight = Desktop.getInstance() == null ? 540 + : Desktop.getInstance().getHeight(); setPreferredSize(new Dimension(540, windowHeight)); add(dialogpanel, BorderLayout.SOUTH); validate(); diff --git a/src/jalview/gui/WsParamSetManager.java b/src/jalview/gui/WsParamSetManager.java index bb5d996..0f315eb 100644 --- a/src/jalview/gui/WsParamSetManager.java +++ b/src/jalview/gui/WsParamSetManager.java @@ -203,7 +203,7 @@ public class WsParamSetManager implements ParamManager chooser.setDialogTitle(MessageManager .getString("label.choose_filename_for_param_file")); chooser.setToolTipText(MessageManager.getString("action.save")); - int value = chooser.showSaveDialog(Desktop.instance); + int value = chooser.showSaveDialog(Desktop.getInstance()); if (value == JalviewFileChooser.APPROVE_OPTION) { outfile = chooser.getSelectedFile(); @@ -311,7 +311,7 @@ public class WsParamSetManager implements ParamManager File pfile = new File(filename); if (pfile.exists() && pfile.canWrite()) { - if (JvOptionPane.showConfirmDialog(Desktop.instance, + if (JvOptionPane.showConfirmDialog(Desktop.getInstance(), "Delete the preset's file, too ?", "Delete User Preset ?", JvOptionPane.OK_CANCEL_OPTION) == JvOptionPane.OK_OPTION) { diff --git a/src/jalview/gui/WsPreferences.java b/src/jalview/gui/WsPreferences.java index 850ef21..9966c02 100644 --- a/src/jalview/gui/WsPreferences.java +++ b/src/jalview/gui/WsPreferences.java @@ -454,7 +454,7 @@ public class WsPreferences extends GWsPreferences boolean valid = false; int resp = JvOptionPane.CANCEL_OPTION; while (!valid && (resp = JvOptionPane.showInternalConfirmDialog( - Desktop.desktop, panel, title, + Desktop.getDesktopPane(), panel, title, JvOptionPane.OK_CANCEL_OPTION)) == JvOptionPane.OK_OPTION) { try @@ -472,13 +472,13 @@ public class WsPreferences extends GWsPreferences } catch (Exception e) { valid = false; - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.invalid_url")); } } if (valid && resp == JvOptionPane.OK_OPTION) { - int validate = JvOptionPane.showInternalConfirmDialog(Desktop.desktop, + int validate = JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(), MessageManager.getString("info.validate_jabaws_server"), MessageManager.getString("label.test_server"), JvOptionPane.YES_NO_OPTION); @@ -491,7 +491,7 @@ public class WsPreferences extends GWsPreferences } else { - int opt = JvOptionPane.showInternalOptionDialog(Desktop.desktop, + int opt = JvOptionPane.showInternalOptionDialog(Desktop.getDesktopPane(), "The Server '" + foo.toString() + "' failed validation,\ndo you want to add it anyway? ", "Server Validation Failed", JvOptionPane.YES_NO_OPTION, @@ -502,7 +502,7 @@ public class WsPreferences extends GWsPreferences } else { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString( "warn.server_didnt_pass_validation")); } @@ -595,7 +595,7 @@ public class WsPreferences extends GWsPreferences if (lastrefresh != update) { lastrefresh = update; - Desktop.instance.startServiceDiscovery(true); // wait around for all + Desktop.getInstance().startServiceDiscovery(true); // wait around for all // threads to complete updateList(); @@ -616,15 +616,15 @@ public class WsPreferences extends GWsPreferences public void run() { long ct = System.currentTimeMillis(); - Desktop.instance.setProgressBar(MessageManager + Desktop.getInstance().setProgressBar(MessageManager .getString("status.refreshing_web_service_menus"), ct); if (lastrefresh != update) { lastrefresh = update; - Desktop.instance.startServiceDiscovery(true); + Desktop.getInstance().startServiceDiscovery(true); updateList(); } - Desktop.instance.setProgressBar(null, ct); + Desktop.getInstance().setProgressBar(null, ct); } }).start(); diff --git a/src/jalview/io/BackupFiles.java b/src/jalview/io/BackupFiles.java index dae1c02..c697a99 100644 --- a/src/jalview/io/BackupFiles.java +++ b/src/jalview/io/BackupFiles.java @@ -539,7 +539,7 @@ public class BackupFiles MessageManager.getString("label.delete"), MessageManager.getString("label.rename") }; - confirmButton = JvOptionPane.showOptionDialog(Desktop.desktop, + confirmButton = JvOptionPane.showOptionDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager.getString("label.backupfiles_confirm_delete"), JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE, @@ -559,7 +559,7 @@ public class BackupFiles MessageManager.getString("label.delete"), MessageManager.getString("label.keep") }; - confirmButton = JvOptionPane.showOptionDialog(Desktop.desktop, + confirmButton = JvOptionPane.showOptionDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager.getString("label.backupfiles_confirm_delete"), JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE, @@ -594,7 +594,7 @@ public class BackupFiles Long.toString(df.length()) })); } - int confirmButton = JvOptionPane.showConfirmDialog(Desktop.desktop, + int confirmButton = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager .getString("label.backupfiles_confirm_delete"), @@ -683,7 +683,7 @@ public class BackupFiles "label.backupfiles_confirm_save_new_saved_file_not_ok")); } - int confirmButton = JvOptionPane.showConfirmDialog(Desktop.desktop, + int confirmButton = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), messageSB.toString(), MessageManager .getString("label.backupfiles_confirm_save_file"), diff --git a/src/jalview/io/FileLoader.java b/src/jalview/io/FileLoader.java index 95f85e6..0d46e76 100755 --- a/src/jalview/io/FileLoader.java +++ b/src/jalview/io/FileLoader.java @@ -278,9 +278,9 @@ public class FileLoader implements Runnable Runtime rt = Runtime.getRuntime(); try { - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { - Desktop.instance.startLoading(file); + Desktop.getInstance().startLoading(file); } if (format == null) { @@ -302,12 +302,12 @@ public class FileLoader implements Runnable if (format == null) { - Desktop.instance.stopLoading(); + Desktop.getInstance().stopLoading(); System.err.println("The input file \"" + file + "\" has null or unidentifiable data content!"); if (!Jalview.isHeadlessMode()) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.getString("label.couldnt_read_data") + " in " + file + "\n" + AppletFormatAdapter.getSupportedFormats(), @@ -318,7 +318,7 @@ public class FileLoader implements Runnable } // TODO: cache any stream datasources as a temporary file (eg. PDBs // retrieved via URL) - if (Desktop.desktop != null && Desktop.desktop.isShowMemoryUsage()) + if (Desktop.getDesktopPane() != null && Desktop.getDesktopPane().isShowMemoryUsage()) { System.gc(); memused = (rt.maxMemory() - rt.totalMemory() + rt.freeMemory()); // free @@ -411,7 +411,7 @@ public class FileLoader implements Runnable // register PDB entries with desktop's structure selection // manager StructureSelectionManager - .getStructureSelectionManager(Desktop.instance) + .getStructureSelectionManager(Desktop.getInstance()) .registerPDBEntry(pdbe); } } @@ -500,23 +500,23 @@ public class FileLoader implements Runnable } else { - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { - Desktop.instance.stopLoading(); + Desktop.getInstance().stopLoading(); } final String errorMessage = MessageManager.getString( "label.couldnt_load_file") + " " + title + "\n" + error; // TODO: refactor FileLoader to be independent of Desktop / Applet GUI // bits ? - if (raiseGUI && Desktop.desktop != null) + if (raiseGUI && Desktop.getDesktopPane() != null) { javax.swing.SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), errorMessage, MessageManager .getString("label.error_loading_file"), @@ -544,7 +544,7 @@ public class FileLoader implements Runnable @Override public void run() { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.problems_opening_file", new String[] { file }), @@ -566,7 +566,7 @@ public class FileLoader implements Runnable @Override public void run() { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "warn.out_of_memory_loading_file", new String[] { file }), @@ -588,7 +588,7 @@ public class FileLoader implements Runnable // memory // after // load - if (Desktop.desktop != null && Desktop.desktop.isShowMemoryUsage()) + if (Desktop.getDesktopPane() != null && Desktop.getDesktopPane().isShowMemoryUsage()) { if (alignFrame != null) { @@ -610,9 +610,9 @@ public class FileLoader implements Runnable } } // remove the visual delay indicator - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { - Desktop.instance.stopLoading(); + Desktop.getInstance().stopLoading(); } } diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java index 54e7e4b..6b6dc24 100644 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -22,6 +22,7 @@ package jalview.io; import jalview.api.AlignExportSettingsI; import jalview.bin.Cache; +import jalview.bin.Jalview; import jalview.datamodel.AlignExportSettingsAdapter; import jalview.datamodel.AlignmentExportData; import jalview.gui.AlignmentPanel; @@ -231,7 +232,7 @@ public abstract class HTMLOutput implements Runnable protected void setProgressMessage(String message) { - if (pIndicator != null && !isHeadless()) + if (pIndicator != null && !Jalview.isHeadlessMode()) { pIndicator.setProgressBar(message, pSessionId); } @@ -241,16 +242,16 @@ public abstract class HTMLOutput implements Runnable } } - /** - * Answers true if HTML export is invoke in headless mode or false otherwise - * - * @return - */ - protected boolean isHeadless() - { - return System.getProperty("java.awt.headless") != null - && System.getProperty("java.awt.headless").equals("true"); - } + // /** + // * Answers true if HTML export is invoke in headless mode or false otherwise + // * + // * @return + // */ + // protected boolean isHeadless() + // { + // return System.getProperty("java.awt.headless") != null + // && System.getProperty("java.awt.headless").equals("true"); + // } /** * This method provides implementation of consistent behaviour which should @@ -259,7 +260,7 @@ public abstract class HTMLOutput implements Runnable */ protected void exportCompleted() { - if (isLaunchInBrowserAfterExport() && !isHeadless()) + if (isLaunchInBrowserAfterExport() && !Jalview.isHeadlessMode()) { try { diff --git a/src/jalview/io/HtmlSvgOutput.java b/src/jalview/io/HtmlSvgOutput.java index b8241c8..d4a4651 100644 --- a/src/jalview/io/HtmlSvgOutput.java +++ b/src/jalview/io/HtmlSvgOutput.java @@ -21,6 +21,7 @@ package jalview.io; import jalview.bin.Cache; +import jalview.bin.Jalview; import jalview.gui.AlignmentPanel; import jalview.gui.LineartOptions; import jalview.gui.OOMWarning; @@ -223,7 +224,8 @@ public class HtmlSvgOutput extends HTMLOutput /* * Prompt for character rendering style if preference is not set */ - if (renderStyle.equalsIgnoreCase("Prompt each time") && !isHeadless()) + if (renderStyle.equalsIgnoreCase("Prompt each time") + && !Jalview.isHeadlessMode()) { LineartOptions svgOption = new LineartOptions("HTML", textOption); svgOption.setResponseAction(1, new Runnable() diff --git a/src/jalview/io/VamsasAppDatastore.java b/src/jalview/io/VamsasAppDatastore.java index adf4447..c2954f0 100644 --- a/src/jalview/io/VamsasAppDatastore.java +++ b/src/jalview/io/VamsasAppDatastore.java @@ -720,9 +720,9 @@ public class VamsasAppDatastore // /SAVE THE TREES // ///////////////////////////////// // FIND ANY ASSOCIATED TREES - if (Desktop.desktop != null) + if (Desktop.getDesktopPane() != null) { - javax.swing.JInternalFrame[] frames = Desktop.instance + javax.swing.JInternalFrame[] frames = Desktop.getInstance() .getAllFrames(); for (int t = 0; t < frames.length; t++) @@ -1479,7 +1479,7 @@ public class VamsasAppDatastore if (mappings != null) { jalview.structure.StructureSelectionManager - .getStructureSelectionManager(Desktop.instance) + .getStructureSelectionManager(Desktop.getInstance()) .registerMappings(mappings); } } diff --git a/src/jalview/io/WSWUBlastClient.java b/src/jalview/io/WSWUBlastClient.java index 63b78b2..e24c2f3 100755 --- a/src/jalview/io/WSWUBlastClient.java +++ b/src/jalview/io/WSWUBlastClient.java @@ -150,7 +150,7 @@ public class WSWUBlastClient { // This must be outside the run() body as java 1.5 // will not return any value from the OptionPane to the expired thread. - int reply = JvOptionPane.showConfirmDialog(Desktop.desktop, + int reply = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), "Automatically update suggested ids?", "Auto replace sequence ids", JvOptionPane.YES_NO_OPTION); diff --git a/src/jalview/io/vamsas/Sequencemapping.java b/src/jalview/io/vamsas/Sequencemapping.java index 0a582e5..402ffdf 100644 --- a/src/jalview/io/vamsas/Sequencemapping.java +++ b/src/jalview/io/vamsas/Sequencemapping.java @@ -365,7 +365,7 @@ public class Sequencemapping extends Rangetype } bindjvvobj(mapping, sequenceMapping); jalview.structure.StructureSelectionManager - .getStructureSelectionManager(Desktop.instance) + .getStructureSelectionManager(Desktop.getInstance()) .registerMapping(acf); // Try to link up any conjugate database references in the two sequences // matchConjugateDBRefs(from, to, mapping); diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index 8bbfb8d..de20556 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -1242,8 +1242,7 @@ public class GAlignFrame extends JInternalFrame showTranslation .setText(MessageManager.getString("label.translate_cDNA")); boolean first = true; - for (final GeneticCodeI table : GeneticCodes.getInstance() - .getCodeTables()) + for (final GeneticCodeI table : GeneticCodes.getCodeTables()) { JMenuItem item = new JMenuItem(table.getId() + " " + table.getName()); showTranslation.add(item); diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index 2ea3774..943e705 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -37,16 +37,14 @@ import javax.swing.JMenuBar; import javax.swing.JMenuItem; /** - * DOCUMENT ME! + * abstract class super to jalview.gui.Desktop * - * @author $author$ - * @version $Revision$ */ @SuppressWarnings("serial") -public class GDesktop extends JFrame +public abstract class GDesktop extends JFrame { - protected static JMenu windowMenu = new JMenu(); + public JMenu windowMenu = new JMenu(); // BH 2019.05.07 was static JMenuBar desktopMenubar = new JMenuBar(); @@ -110,7 +108,7 @@ public class GDesktop extends JFrame protected JCheckBoxMenuItem showConsole = new JCheckBoxMenuItem(); - protected JCheckBoxMenuItem showNews = new JCheckBoxMenuItem(); + public JCheckBoxMenuItem showNews = new JCheckBoxMenuItem(); protected JMenuItem snapShotWindow = new JMenuItem(); @@ -119,7 +117,6 @@ public class GDesktop extends JFrame */ public GDesktop() { - super(); try { jbInit(); diff --git a/src/jalview/jbgui/GPreferences.java b/src/jalview/jbgui/GPreferences.java index 3c35e4e..5fbc3d7 100755 --- a/src/jalview/jbgui/GPreferences.java +++ b/src/jalview/jbgui/GPreferences.java @@ -2193,7 +2193,7 @@ public class GPreferences extends JPanel boolean ret = false; String warningMessage = MessageManager .getString("label.warning_confirm_change_reverse"); - int confirm = JvOptionPane.showConfirmDialog(Desktop.desktop, + int confirm = JvOptionPane.showConfirmDialog(Desktop.getDesktopPane(), warningMessage, MessageManager.getString("label.change_increment_decrement"), JvOptionPane.YES_NO_OPTION, JvOptionPane.WARNING_MESSAGE); diff --git a/src/jalview/jbgui/GSequenceLink.java b/src/jalview/jbgui/GSequenceLink.java index a43e504..2ec7051 100755 --- a/src/jalview/jbgui/GSequenceLink.java +++ b/src/jalview/jbgui/GSequenceLink.java @@ -219,7 +219,7 @@ public class GSequenceLink extends JPanel return true; } - JvOptionPane.showInternalMessageDialog(jalview.gui.Desktop.desktop, + JvOptionPane.showInternalMessageDialog(jalview.gui.Desktop.getDesktopPane(), MessageManager.getString("warn.url_must_contain"), MessageManager.getString("label.invalid_url"), JvOptionPane.WARNING_MESSAGE); @@ -228,7 +228,7 @@ public class GSequenceLink extends JPanel public void notifyDuplicate() { - JvOptionPane.showInternalMessageDialog(jalview.gui.Desktop.desktop, + JvOptionPane.showInternalMessageDialog(jalview.gui.Desktop.getDesktopPane(), MessageManager.getString("warn.name_cannot_be_duplicate"), MessageManager.getString("label.invalid_name"), JvOptionPane.WARNING_MESSAGE); diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 4d772a1..1aac037 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -1081,7 +1081,7 @@ public class Jalview2XML * only view *should* be coped with sensibly. */ // This must have been loaded, is it still visible? - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); String matchedFile = null; for (int f = frames.length - 1; f > -1; f--) { @@ -1233,9 +1233,9 @@ public class Jalview2XML { // FIND ANY ASSOCIATED TREES // NOT IMPLEMENTED FOR HEADLESS STATE AT PRESENT - if (Desktop.desktop != null) + if (Desktop.getDesktopPane() != null) { - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); for (int t = 0; t < frames.length; t++) { @@ -1279,9 +1279,9 @@ public class Jalview2XML /* * save PCA viewers */ - if (!storeDS && Desktop.desktop != null) + if (!storeDS && Desktop.getDesktopPane() != null) { - for (JInternalFrame frame : Desktop.desktop.getAllFrames()) + for (JInternalFrame frame : Desktop.getDesktopPane().getAllFrames()) { if (frame instanceof PCAPanel) { @@ -1919,11 +1919,11 @@ public class Jalview2XML final SequenceI jds, List viewIds, AlignmentPanel ap, boolean storeDataset) { - if (Desktop.desktop == null) + if (Desktop.getDesktopPane() == null) { return; } - JInternalFrame[] frames = Desktop.desktop.getAllFrames(); + JInternalFrame[] frames = Desktop.getDesktopPane().getAllFrames(); for (int f = frames.length - 1; f > -1; f--) { if (frames[f] instanceof AppVarna) @@ -2915,9 +2915,9 @@ public class Jalview2XML { // used to attempt to parse as V1 castor-generated xml } - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { - Desktop.instance.stopLoading(); + Desktop.getInstance().stopLoading(); } if (af != null) { @@ -2945,7 +2945,7 @@ public class Jalview2XML */ for (AlignFrame fr : gatherToThisFrame.values()) { - Desktop.instance.gatherViews(fr); + Desktop.getInstance().gatherViews(fr); } restoreSplitFrames(); @@ -2954,7 +2954,7 @@ public class Jalview2XML if (ds.getCodonFrames() != null) { StructureSelectionManager - .getStructureSelectionManager(Desktop.instance) + .getStructureSelectionManager(Desktop.getInstance()) .registerMappings(ds.getCodonFrames()); } } @@ -2963,9 +2963,9 @@ public class Jalview2XML reportErrors(); } - if (Desktop.instance != null) + if (Desktop.getInstance() != null) { - Desktop.instance.stopLoading(); + Desktop.getInstance().stopLoading(); } return af; @@ -3046,7 +3046,7 @@ public class Jalview2XML */ for (SplitFrame sf : gatherTo) { - Desktop.instance.gatherViews(sf); + Desktop.getInstance().gatherViews(sf); } splitFrameCandidates.clear(); @@ -3105,7 +3105,7 @@ public class Jalview2XML @Override public void run() { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, + JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), finalErrorMessage, "Error " + (saving ? "saving" : "loading") + " Jalview file", @@ -3576,7 +3576,7 @@ public class Jalview2XML entry.setProperty(prop.getName(), prop.getValue()); } StructureSelectionManager - .getStructureSelectionManager(Desktop.instance) + .getStructureSelectionManager(Desktop.getInstance()) .registerPDBEntry(entry); // adds PDBEntry to datasequence's set (since Jalview 2.10) if (al.getSequenceAt(i).getDatasetSequence() != null) @@ -4294,7 +4294,7 @@ public class Jalview2XML int height = safeInt(structureState.getHeight()); // Probably don't need to do this anymore... - // Desktop.desktop.getComponentAt(x, y); + // Desktop.getDesktop().getComponentAt(x, y); // TODO: NOW: check that this recovers the PDB file correctly. String pdbFile = loadPDBFile(jprovider, pdbid.getId(), pdbid.getFile()); @@ -4778,7 +4778,7 @@ public class Jalview2XML { try { - frames = Desktop.desktop.getAllFrames(); + frames = Desktop.getDesktopPane().getAllFrames(); } catch (ArrayIndexOutOfBoundsException e) { // occasional No such child exceptions are thrown here... diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index 5f84ca0..5bbe46d 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -896,8 +896,7 @@ public class ResidueProperties public static String codonTranslate(String lccodon) { - String peptide = GeneticCodes.getInstance().getStandardCodeTable() - .translate(lccodon); + String peptide = GeneticCodes.getStandardCodeTable().translate(lccodon); if ("*".equals(peptide)) { return "STOP"; diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index f9eb2a6..523f816 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -54,7 +54,7 @@ public class Platform private static Boolean isNoJSMac = null, isNoJSWin = null, isMac = null, isWin = null; - private static Boolean isHeadless = null; + // private static Boolean isHeadless = null; /** * added to group mouse events into Windows and nonWindows (mac, unix, linux) @@ -111,18 +111,18 @@ public class Platform return (isNoJSWin == null ? (isNoJSWin = !isJS && isWin()) : isNoJSWin); } - /** - * - * @return true if we are running in non-interactive no UI mode - */ - public static boolean isHeadless() - { - if (isHeadless == null) - { - isHeadless = "true".equals(System.getProperty("java.awt.headless")); - } - return isHeadless; - } + // /** + // * + // * @return true if we are running in non-interactive no UI mode + // */ + // public static boolean isHeadless() + // { + // if (isHeadless == null) + // { + // isHeadless = "true".equals(System.getProperty("java.awt.headless")); + // } + // return isHeadless; + // } /** * diff --git a/src/jalview/ws/jws1/Discoverer.java b/src/jalview/ws/jws1/Discoverer.java index bee9fad..ec8c89c 100644 --- a/src/jalview/ws/jws1/Discoverer.java +++ b/src/jalview/ws/jws1/Discoverer.java @@ -246,9 +246,9 @@ public class Discoverer implements Runnable // JBPNote - should do this a better way! if (f.getFaultReason().indexOf("(407)") > -1) { - if (jalview.gui.Desktop.desktop != null) + if (jalview.gui.Desktop.getDesktopPane() != null) { - JvOptionPane.showMessageDialog(jalview.gui.Desktop.desktop, + JvOptionPane.showMessageDialog(jalview.gui.Desktop.getDesktopPane(), MessageManager.getString("label.set_proxy_settings"), MessageManager .getString("label.proxy_authorization_failed"), diff --git a/src/jalview/ws/jws1/JPredClient.java b/src/jalview/ws/jws1/JPredClient.java index 3b7bdb6..3dd8104 100644 --- a/src/jalview/ws/jws1/JPredClient.java +++ b/src/jalview/ws/jws1/JPredClient.java @@ -323,7 +323,7 @@ public class JPredClient extends WS1Client } catch (Exception ex) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.secondary_structure_prediction_service_couldnt_be_located", new String[] diff --git a/src/jalview/ws/jws1/MsaWSClient.java b/src/jalview/ws/jws1/MsaWSClient.java index 4a09625..e97d309 100644 --- a/src/jalview/ws/jws1/MsaWSClient.java +++ b/src/jalview/ws/jws1/MsaWSClient.java @@ -78,7 +78,7 @@ public class MsaWSClient extends WS1Client alignFrame = _alignFrame; if (!sh.getAbstractName().equals("MsaWS")) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.service_called_is_not_msa_service", new String[] @@ -91,7 +91,7 @@ public class MsaWSClient extends WS1Client if ((wsInfo = setWebService(sh)) == null) { - JvOptionPane.showMessageDialog(Desktop.desktop, MessageManager + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager .formatMessage("label.msa_service_is_unknown", new String[] { sh.getName() }), MessageManager.getString("label.internal_jalview_error"), diff --git a/src/jalview/ws/jws1/SeqSearchWSClient.java b/src/jalview/ws/jws1/SeqSearchWSClient.java index 53338d3..cb965f0 100644 --- a/src/jalview/ws/jws1/SeqSearchWSClient.java +++ b/src/jalview/ws/jws1/SeqSearchWSClient.java @@ -84,7 +84,7 @@ public class SeqSearchWSClient extends WS1Client // name to service client name if (!sh.getAbstractName().equals(this.getServiceActionKey())) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.service_called_is_not_seq_search_service", new String[] @@ -97,7 +97,7 @@ public class SeqSearchWSClient extends WS1Client if ((wsInfo = setWebService(sh)) == null) { - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.seq_search_service_is_unknown", new String[] { sh.getName() }), diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 23c6949..319252a 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -107,7 +107,7 @@ public class MsaWSClient extends Jws2Client if (!(sh.service instanceof MsaWS)) { // redundant at mo - but may change - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager.formatMessage( "label.service_called_is_not_msa_service", new String[] @@ -120,7 +120,7 @@ public class MsaWSClient extends Jws2Client server = (MsaWS) sh.service; if ((wsInfo = setWebService(sh, false)) == null) { - JvOptionPane.showMessageDialog(Desktop.desktop, MessageManager + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), MessageManager .formatMessage("label.msa_service_is_unknown", new String[] { sh.serviceType }), MessageManager.getString("label.internal_jalview_error"), diff --git a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java index 45bddac..9358c76 100644 --- a/src/jalview/ws/jws2/SequenceAnnotationWSClient.java +++ b/src/jalview/ws/jws2/SequenceAnnotationWSClient.java @@ -67,7 +67,7 @@ public class SequenceAnnotationWSClient extends Jws2Client // dan changed! dan test. comment out if conditional // if (alignFrame.getViewport().getAlignment().isNucleotide()) // { - // JvOptionPane.showMessageDialog(Desktop.desktop, sh.serviceType + // JvOptionPane.showMessageDialog(Desktop.getDesktop(), sh.serviceType // + " can only be used\nfor amino acid alignments.", // "Wrong type of sequences!", JvOptionPane.WARNING_MESSAGE); // return; @@ -242,7 +242,7 @@ public class SequenceAnnotationWSClient extends Jws2Client @Override public void actionPerformed(ActionEvent arg0) { - Desktop.instance.showUrl(service.docUrl); + Desktop.getInstance().showUrl(service.docUrl); } }); annotservice.setToolTipText( diff --git a/src/jalview/ws/jws2/jabaws2/Jws2Instance.java b/src/jalview/ws/jws2/jabaws2/Jws2Instance.java index 2f3c298..a4e2e75 100644 --- a/src/jalview/ws/jws2/jabaws2/Jws2Instance.java +++ b/src/jalview/ws/jws2/jabaws2/Jws2Instance.java @@ -186,7 +186,7 @@ public class Jws2Instance try { paramStore = new JabaParamStore(this, - (Desktop.instance != null ? Desktop.getUserParameterStore() + (Desktop.getInstance() != null ? Desktop.getUserParameterStore() : null)); } catch (Exception ex) { diff --git a/src/jalview/ws/rest/RestClient.java b/src/jalview/ws/rest/RestClient.java index a71b70d..08f137d 100644 --- a/src/jalview/ws/rest/RestClient.java +++ b/src/jalview/ws/rest/RestClient.java @@ -329,7 +329,7 @@ public class RestClient extends WSClient else { // TODO: try to tell the user why the job couldn't be started. - JvOptionPane.showMessageDialog(Desktop.desktop, + JvOptionPane.showMessageDialog(Desktop.getDesktopPane(), (jobsthread.hasWarnings() ? jobsthread.getWarnings() : MessageManager.getString( "label.job_couldnt_be_started_check_input")), diff --git a/test/jalview/analysis/DnaTest.java b/test/jalview/analysis/DnaTest.java index 27ae8cd..631b535 100644 --- a/test/jalview/analysis/DnaTest.java +++ b/test/jalview/analysis/DnaTest.java @@ -139,8 +139,8 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, alf.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna + .translateCdna(GeneticCodes.getStandardCodeTable()); assertNotNull("Couldn't do a full width translation of test data.", translated); } @@ -171,8 +171,8 @@ public class DnaTest alf.getWidth(), false); AlignViewportI av = new AlignViewport(alf, cs); Dna dna = new Dna(av, vcontigs); - AlignmentI transAlf = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI transAlf = dna + .translateCdna(GeneticCodes.getStandardCodeTable()); assertTrue("Translation failed (ipos=" + ipos + ") No alignment data.", transAlf != null); @@ -199,8 +199,8 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, alf.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna + .translateCdna(GeneticCodes.getStandardCodeTable()); String aa = translated.getSequenceAt(0).getSequenceAsString(); assertEquals( "AAAACCDDEEFFGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVWYY***", @@ -225,8 +225,8 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, alf.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna + .translateCdna(GeneticCodes.getStandardCodeTable()); String aa = translated.getSequenceAt(0).getSequenceAsString(); assertEquals("AACDDGGGGHHIIIKKLLLLLLMNNPPPPQQRRRRRRSSSSSSTTTTVVVVW", aa); } @@ -313,8 +313,8 @@ public class DnaTest Iterator contigs = cs.getVisContigsIterator(0, cdna.getWidth(), false); Dna dna = new Dna(av, contigs); - AlignmentI translated = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated = dna + .translateCdna(GeneticCodes.getStandardCodeTable()); /* * Jumble the cDNA sequences and translate. @@ -330,8 +330,8 @@ public class DnaTest av = new AlignViewport(cdnaReordered, cs); contigs = cs.getVisContigsIterator(0, cdna.getWidth(), false); dna = new Dna(av, contigs); - AlignmentI translated2 = dna.translateCdna(GeneticCodes.getInstance() - .getStandardCodeTable()); + AlignmentI translated2 = dna + .translateCdna(GeneticCodes.getStandardCodeTable()); /* * Check translated sequences are the same in both alignments. diff --git a/test/jalview/ext/jmol/JmolViewerTest.java b/test/jalview/ext/jmol/JmolViewerTest.java index e451ed2..7ef0d16 100644 --- a/test/jalview/ext/jmol/JmolViewerTest.java +++ b/test/jalview/ext/jmol/JmolViewerTest.java @@ -74,7 +74,7 @@ public class JmolViewerTest @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - jalview.gui.Desktop.instance.closeAll_actionPerformed(null); + jalview.gui.Desktop.getInstance().closeAll_actionPerformed(null); } @Test(groups = { "Functional" }) diff --git a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java index 734f7eb..194d34a 100644 --- a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java +++ b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java @@ -95,7 +95,7 @@ public class JalviewChimeraView @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); } @AfterMethod(alwaysRun = true) diff --git a/test/jalview/gui/AlignFrameTest.java b/test/jalview/gui/AlignFrameTest.java index 454ff61..fd10d99 100644 --- a/test/jalview/gui/AlignFrameTest.java +++ b/test/jalview/gui/AlignFrameTest.java @@ -164,7 +164,7 @@ public class AlignFrameTest @AfterMethod(alwaysRun = true) public void tearDown() { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); } /** diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index 959abb0..75e8065 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -80,7 +80,7 @@ public class AlignViewportTest * remove any sequence mappings left lying around by other tests */ StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.resetAll(); } @@ -128,7 +128,7 @@ public class AlignViewportTest * mappings */ StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); List sequenceMappings = ssm.getSequenceMappings(); assertEquals(2, sequenceMappings.size()); assertTrue(sequenceMappings.contains(acf1)); @@ -150,10 +150,10 @@ public class AlignViewportTest @Test(groups = { "Functional" }) public void testDeregisterMapping_withNoReference() { - Desktop d = Desktop.instance; + Desktop d = Desktop.getInstance(); assertNotNull(d); StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.resetAll(); AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded( @@ -213,10 +213,10 @@ public class AlignViewportTest @Test(groups = { "Functional" }) public void testDeregisterMapping_withReference() { - Desktop d = Desktop.instance; + Desktop d = Desktop.getInstance(); assertNotNull(d); StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.resetAll(); AlignFrame af1 = new FileLoader().LoadFileWaitTillLoaded( diff --git a/test/jalview/gui/FreeUpMemoryTest.java b/test/jalview/gui/FreeUpMemoryTest.java index 9b21274..ee2b898 100644 --- a/test/jalview/gui/FreeUpMemoryTest.java +++ b/test/jalview/gui/FreeUpMemoryTest.java @@ -70,7 +70,7 @@ public class FreeUpMemoryTest doStuffInJalview(f); - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); checkUsedMemory(35L); } @@ -109,7 +109,7 @@ public class FreeUpMemoryTest * sanity check - fails if any frame was added after * closeAll_actionPerformed */ - assertEquals(Desktop.instance.getAllFrames().length, 0); + assertEquals(Desktop.getInstance().getAllFrames().length, 0); /* * if this assertion fails diff --git a/test/jalview/gui/SeqPanelTest.java b/test/jalview/gui/SeqPanelTest.java index 6783514..54c967f 100644 --- a/test/jalview/gui/SeqPanelTest.java +++ b/test/jalview/gui/SeqPanelTest.java @@ -252,7 +252,7 @@ public class SeqPanelTest @AfterMethod(alwaysRun = true) public void tearDown() { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); } @Test(groups = "Functional") diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java index 8eb3796..b8ac0fa 100644 --- a/test/jalview/io/AnnotatedPDBFileInputTest.java +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java @@ -207,7 +207,7 @@ public class AnnotatedPDBFileInputTest @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - jalview.gui.Desktop.instance.closeAll_actionPerformed(null); + jalview.gui.Desktop.getInstance().closeAll_actionPerformed(null); } diff --git a/test/jalview/io/CrossRef2xmlTests.java b/test/jalview/io/CrossRef2xmlTests.java index 6e4593d..daadfa5 100644 --- a/test/jalview/io/CrossRef2xmlTests.java +++ b/test/jalview/io/CrossRef2xmlTests.java @@ -135,7 +135,7 @@ public class CrossRef2xmlTests extends Jalview2xmlBase { // retrieve dbref - SequenceFetcher sf = new SequenceFetcher(Desktop.instance, + SequenceFetcher sf = new SequenceFetcher(Desktop.getInstance(), forSource, forAccession); sf.run(); AlignFrame[] afs = Desktop.getAlignFrames(); @@ -162,7 +162,7 @@ public class CrossRef2xmlTests extends Jalview2xmlBase } else { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); // recover stored project af = new FileLoader(false).LoadFileWaitTillLoaded( savedProjects.get(first).toString(), DataSourceType.FILE); @@ -229,7 +229,7 @@ public class CrossRef2xmlTests extends Jalview2xmlBase } else { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); pass3 = 0; // recover stored project File storedProject = savedProjects.get(nextxref); @@ -340,7 +340,7 @@ public class CrossRef2xmlTests extends Jalview2xmlBase } else { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); // recover stored project File storedProject = savedProjects.get(nextnextxref); if (storedProject == null) diff --git a/test/jalview/io/FeaturesFileTest.java b/test/jalview/io/FeaturesFileTest.java index 77c18db..fdef53d 100644 --- a/test/jalview/io/FeaturesFileTest.java +++ b/test/jalview/io/FeaturesFileTest.java @@ -71,7 +71,7 @@ public class FeaturesFileTest * remove any sequence mappings created so they don't pollute other tests */ StructureSelectionManager ssm = StructureSelectionManager - .getStructureSelectionManager(Desktop.instance); + .getStructureSelectionManager(Desktop.getInstance()); ssm.resetAll(); } diff --git a/test/jalview/io/Jalview2xmlBase.java b/test/jalview/io/Jalview2xmlBase.java index fbdd782..3a0560c 100644 --- a/test/jalview/io/Jalview2xmlBase.java +++ b/test/jalview/io/Jalview2xmlBase.java @@ -70,16 +70,16 @@ public class Jalview2xmlBase @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - jalview.gui.Desktop.instance.closeAll_actionPerformed(null); + jalview.gui.Desktop.getInstance().closeAll_actionPerformed(null); } @BeforeTest(alwaysRun = true) public static void clearDesktop() { - if (Desktop.instance != null && Desktop.getFrames() != null + if (Desktop.getInstance() != null && Desktop.getFrames() != null && Desktop.getFrames().length > 0) { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); } } diff --git a/test/jalview/io/JalviewExportPropertiesTests.java b/test/jalview/io/JalviewExportPropertiesTests.java index 06d177d..1614453 100644 --- a/test/jalview/io/JalviewExportPropertiesTests.java +++ b/test/jalview/io/JalviewExportPropertiesTests.java @@ -63,7 +63,7 @@ public class JalviewExportPropertiesTests @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - jalview.gui.Desktop.instance.closeAll_actionPerformed(null); + jalview.gui.Desktop.getInstance().closeAll_actionPerformed(null); } diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index e9221e0..830a759 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -405,7 +405,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = { "Functional" }, enabled = true) public void testStoreAndRecoverExpandedviews() throws Exception { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/exampleFile_2_7.jar", DataSourceType.FILE); @@ -433,7 +433,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase { Assert.fail("Didn't save the expanded view state", e); } - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); if (Desktop.getAlignFrames() != null) { Assert.assertEquals(Desktop.getAlignFrames().length, 0); @@ -459,7 +459,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = { "Functional" }) public void testStoreAndRecoverReferenceSeqSettings() throws Exception { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/exampleFile_2_7.jar", DataSourceType.FILE); assertNotNull(af, "Didn't read in the example file correctly."); @@ -498,7 +498,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase { Assert.fail("Didn't save the expanded view state", e); } - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); if (Desktop.getAlignFrames() != null) { Assert.assertEquals(Desktop.getAlignFrames().length, 0); @@ -592,7 +592,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = { "Functional" }) public void testStoreAndRecoverGroupRepSeqs() throws Exception { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/uniref50.fa", DataSourceType.FILE); assertNotNull(af, "Didn't read in the example file correctly."); @@ -667,7 +667,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase { Assert.fail("Didn't save the expanded view state", e); } - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); if (Desktop.getAlignFrames() != null) { Assert.assertEquals(Desktop.getAlignFrames().length, 0); @@ -712,7 +712,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = { "Functional" }) public void testStoreAndRecoverPDBEntry() throws Exception { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); String exampleFile = "examples/3W5V.pdb"; AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(exampleFile, DataSourceType.FILE); @@ -761,7 +761,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase { Assert.fail("Didn't save the state", e); } - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); if (Desktop.getAlignFrames() != null) { Assert.assertEquals(Desktop.getAlignFrames().length, 0); @@ -812,7 +812,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = { "Functional" }) public void testStoreAndRecoverColourThresholds() throws IOException { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( "examples/uniref50.fa", DataSourceType.FILE); @@ -872,7 +872,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase ".jvp"); tfile.deleteOnExit(); new Jalview2XML(false).saveState(tfile); - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(), DataSourceType.FILE); Assert.assertNotNull(af, "Failed to reload project"); @@ -1081,7 +1081,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = { "Functional" }) public void testMergeDatasetsforManyViews() throws IOException { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); // complex project - one dataset, several views on several alignments AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded( @@ -1125,7 +1125,7 @@ public class Jalview2xmlTests extends Jalview2xmlBase @Test(groups = "Functional") public void testPcaViewAssociation() throws IOException { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); final String PCAVIEWNAME = "With PCA"; // create a new tempfile File tempfile = File.createTempFile("jvPCAviewAssoc", "jvp"); @@ -1159,10 +1159,10 @@ public class Jalview2xmlTests extends Jalview2xmlBase } // load again. - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); AlignFrame af = new FileLoader().LoadFileWaitTillLoaded( tempfile.getCanonicalPath(), DataSourceType.FILE); - JInternalFrame[] frames = Desktop.instance.getAllFrames(); + JInternalFrame[] frames = Desktop.getInstance().getAllFrames(); // PCA and the tabbed alignment view should be the only two windows on the // desktop assertEquals(frames.length, 2, diff --git a/test/jalview/schemes/ColourSchemesTest.java b/test/jalview/schemes/ColourSchemesTest.java index 5db3743..06be31e 100644 --- a/test/jalview/schemes/ColourSchemesTest.java +++ b/test/jalview/schemes/ColourSchemesTest.java @@ -172,7 +172,7 @@ public class ColourSchemesTest @AfterClass(alwaysRun = true) public static void tearDownAfterClass() throws Exception { - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); } @Test(groups = "Functional") diff --git a/test/jalview/structure/StructureSelectionManagerTest.java b/test/jalview/structure/StructureSelectionManagerTest.java index e59648f..dab692f 100644 --- a/test/jalview/structure/StructureSelectionManagerTest.java +++ b/test/jalview/structure/StructureSelectionManagerTest.java @@ -199,7 +199,7 @@ public class StructureSelectionManagerTest extends Jalview2xmlBase { // for some reason 'BeforeMethod' (which should be inherited from // Jalview2XmlBase isn't always called)... - Desktop.instance.closeAll_actionPerformed(null); + Desktop.getInstance().closeAll_actionPerformed(null); try { Thread.sleep(200); } catch (Exception foo) {}; -- 1.7.10.2