import jalview.schemes.FeatureColour;
import jalview.schemes.ResidueProperties;
import jalview.schemes.UserColourScheme;
-import jalview.structure.StructureSelectionManager;
import jalview.structures.models.AAStructureBindingModel;
import jalview.util.Format;
import jalview.util.MessageManager;
public boolean isResolvable()
{
return super.isResolvable() && mp.getTo() != null;
- };
+ }
@Override
boolean resolve()
} catch (Exception foo)
{
}
- ;
jout.close();
} catch (Exception ex)
{
} catch (Exception foo)
{
}
- ;
jout.close();
boolean success = true;
* 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--)
{
{
// 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++)
{
/*
* 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)
{
final SequenceI jds, List<String> 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)
if (calcIdParam.getVersion().equals("1.0"))
{
final String[] calcIds = calcIdParam.getServiceURL().toArray(new String[0]);
- Jws2Instance service = Jws2Discoverer.getDiscoverer()
+ Jws2Instance service = Jws2Discoverer.getInstance()
.getPreferredServiceFor(calcIds);
if (service != null)
{
public void run()
{
setLoadingFinishedForNewStructureViewers();
- };
+ }
});
} catch (Exception x)
{
// BH 2018 allow for bytes already attached to File object
try {
String file = (ofile instanceof File ? ((File) ofile).getCanonicalPath() : ofile.toString());
- byte[] bytes = Platform.getFileBytes((File) ofile);
+ byte[] bytes = Platform.isJS() ? Platform.getFileBytes((File) ofile)
+ : null;
URL url = null;
errorMessage = null;
uniqueSetSuffix = null;
{
// 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)
{
*/
for (AlignFrame fr : gatherToThisFrame.values())
{
- Desktop.instance.gatherViews(fr);
+ Desktop.getInstance().gatherViews(fr);
}
restoreSplitFrames();
{
if (ds.getCodonFrames() != null)
{
- StructureSelectionManager
- .getStructureSelectionManager(Desktop.instance)
+ Desktop.getInstance().getStructureSelectionManager()
.registerMappings(ds.getCodonFrames());
}
}
reportErrors();
}
- if (Desktop.instance != null)
+ if (Desktop.getInstance() != null)
{
- Desktop.instance.stopLoading();
+ Desktop.getInstance().stopLoading();
}
return af;
*/
for (SplitFrame sf : gatherTo)
{
- Desktop.instance.gatherViews(sf);
+ Desktop.getInstance().gatherViews(sf);
}
splitFrameCandidates.clear();
@Override
public void run()
{
- JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+ JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(),
finalErrorMessage,
"Error " + (saving ? "saving" : "loading")
+ " Jalview file",
{
entry.setProperty(prop.getName(), prop.getValue());
}
- StructureSelectionManager
- .getStructureSelectionManager(Desktop.instance)
+ Desktop.getInstance().getStructureSelectionManager()
.registerPDBEntry(entry);
// adds PDBEntry to datasequence's set (since Jalview 2.10)
if (al.getSequenceAt(i).getDatasetSequence() != null)
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());
{
try
{
- frames = Desktop.desktop.getAllFrames();
+ frames = Desktop.getDesktopPane().getAllFrames();
} catch (ArrayIndexOutOfBoundsException e)
{
// occasional No such child exceptions are thrown here...