import jalview.datamodel.SequenceFeature
import jalview.gui.Desktop
-def af = jalview.bin.Jalview.currentAlignFrame
+def af = Jalview.getCurrentAlignFrame()
def av = af.viewport
def fr = Desktop.getAlignFrameFor(av.codingComplement).getFeatureRenderer()
def counts = 0
}
af.getFeatureRenderer().featuresAdded()
af.alignPanel.paintAlignment(true, true)
-println "Added " + countm + " missense and " + counts + " synonymous variants"
\ No newline at end of file
+println "Added " + countm + " missense and " + counts + " synonymous variants"
import jalview.gui.*;
import jalview.io.*;
-def class JvLoadTest {
+class JvLoadTest {
FileLoader fl = null;
def String safename = null;
JvLoadTest(String sname) {
System.gc();
jalview.gui.Desktop.instance.desktop.showMemoryUsage(true);
return new JvLoadTest(tempFile)
-}
\ No newline at end of file
+}
void printSimilarityMatrix(boolean selview=false, boolean includeids=true, SimilarityParams pidMethod) {
- def currentAlignFrame = jalview.bin.Jalview.getCurrentAlignFrame()
+ def currentAlignFrame = Jalview.getCurrentAlignFrame()
jalview.gui.AlignViewport av = currentAlignFrame.getCurrentView()
print "\n"
}
-}
\ No newline at end of file
+}
*/
// run an alignment on the current alignFrame
import jalview.ws.jws2.*;
+import jalview.ws.jws2.jabaws2.Jws2Instance;
import jalview.datamodel.*;
// First get the JABA service discoverer and see if there are any services.
disc.run();
}
-for (jalview.ws.jws2.Jws2Discoverer.Jws2Instance service: disc.getServices()) {
+for (jalview.ws.jws2.jabaws2.Jws2Instance service: disc.getServices()) {
if (service.serviceType.indexOf("uscle")>-1) {
// now - go through the services if any, and find a Muscle service
import static java.awt.Toolkit.*
-def curviewport = Jalview.getAlignFrames()[Jalview.getAlignFrames().length-1].getViewport();
+def curviewport = Jalview.getCurrentAlignFrame().getViewport();
// TSV output by default.
// change "\t" to "," to output CSV file
/*
* Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
* Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
+ *
* This file is part of Jalview.
- *
+ *
* Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
+ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with Jalview. If not, see <http://www.gnu.org/licenses/>.
* The Jalview Authors are detailed in the 'AUTHORS' file.
def af = Jalview.getAlignFrames();
def al = af[0].viewport.alignment;
ParseProperties pp = new ParseProperties(al);
-pp.getScoresFromDescription("Score", "ScanPS Raw Score", "([-0-9.+]+)");
+pp.getScoresFromDescription("Score", "ScanPS Raw Score", "([-0-9.+]+)", true);
def sqs = al.getSequenceAt(0);
def annots = sqs.getAnnotation();
/*
* Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
* Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
+ *
* This file is part of Jalview.
- *
+ *
* Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
+ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with Jalview. If not, see <http://www.gnu.org/licenses/>.
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
// do something groovy in jalview
println "Hello World.\n"
-println "First sequence is " + currentAlFrame.viewport.alignment.getSequenceAt(0).getDisplayId(true)
+println "First sequence is " + Jalview.getCurrentAlignFrame().viewport.alignment.getSequenceAt(0).getDisplayId(true)
def alf = Jalview.getAlignFrames()
for (ala in alf)
{
- // ala is an jalview.gui.AlignFrame object
+ // ala is an jalview.gui.AlignFrame object
println ala.getTitle()
// get the parent jalview.datamodel.Alignment from the alignment viewport
def alignment = ala.viewport.alignment
// get the first sequence from the jalview.datamodel.Alignment object
- def seq = alignment.getSequenceAt(0)
+ def seq = alignment.getSequenceAt(0)
}
Jalview.quit()
import jalview.gui.AlignFrame;
import jalview.gui.AlignViewport;
import java.util.BitSet;
-import javax.swing.JOptionPane;
+import jalview.gui.JvOptionPane;
import groovy.swing.SwingBuilder;
def toselect = getFeatureInput(); // change this to select the desired feature type
cs.addElement(i);
}
ala.viewport.setColumnSelection(cs);
- ala.alignPanel.paintAlignment(true);
+ ala.alignPanel.paintAlignment(true, true);
ala.statusBar.setText("Marked "+bs.cardinality()+" columns containing features of type "+toselect)
} else {
ala.statusBar.setText("No features of type "+toselect+" found.");
null, 'Select columns by feature by type','Enter type of feature', JvOptionPane.OK_OPTION)
return response
- }
\ No newline at end of file
+ }
import java.awt.datatransfer.StringSelection
import static java.awt.Toolkit.*
-def curviewport = Jalview.getAlignFrames()[Jalview.getAlignFrames().length-1].getViewport()
+def curviewport = Jalview.getCurrentAlignFrame().getViewport()
def debug = false
for (ala in af)
{
- def al = ala.viewport.alignment;
+ def al = ala.getViewport().getAlignment();
if (al!=null)
{
SequenceI[] seqs = al.getSequencesArray();
}
}
}
-
\ No newline at end of file
+
/*
* Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
* Copyright (C) $$Year-Rel$$ The Jalview Authors
- *
+ *
* This file is part of Jalview.
- *
+ *
* Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
+ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with Jalview. If not, see <http://www.gnu.org/licenses/>.
* The Jalview Authors are detailed in the 'AUTHORS' file.
*/
-import jalview.bin.Jalview
import jalview.workers.FeatureSetCounterI
import jalview.workers.AlignmentAnnotationFactory
/*
* Demonstration of FeatureSetCounterI
- * compute annotation tracks counting number of displayed
+ * compute annotation tracks counting number of displayed
* features of each type in each column
*/
/*
* discover features on the current view
*/
-
-def featuresDisp=Jalview.currentAlignFrame.currentView.featuresDisplayed
+
+def featuresDisp=Jalview.getCurrentAlignFrame().currentView.featuresDisplayed
if (featuresDisp == null) {
print 'Need at least one feature visible on alignment'
}
assert 'java.util.ArrayList' == visibleFeatures.class.name
/*
- * A closure that returns an array of features present
+ * A closure that returns an array of features present
* for each feature type in visibleFeatures
- * Argument 'features' will be a list of SequenceFeature
+ * Argument 'features' will be a list of SequenceFeature
*/
-def getCounts =
- { features ->
+def getCounts =
+ { features ->
int[] obs = new int[visibleFeatures.size]
for (sf in features)
{
* or sf.getValue(attributeName) for GFF 'column 9' properties
*/
int pos = 0
- for (type in visibleFeatures)
+ for (type in visibleFeatures)
{
- if (type.equals(sf.type))
+ if (type.equals(sf.type))
{
obs[pos]++
}
}
obs
}
-
+
/*
* Define something that counts each visible feature type
*/
def columnSetCounter =
[
- getNames: { visibleFeatures as String[] },
+ getNames: { visibleFeatures as String[] },
getDescriptions: { visibleFeatures as String[] },
getMinColour: { [0, 255, 255] as int[] }, // cyan
getMaxColour: { [0, 0, 255] as int[] }, // blue
- count:
- { res, feats ->
- getCounts.call(feats)
+ count:
+ { res, feats ->
+ getCounts.call(feats)
}
] as FeatureSetCounterI
import jalview.bin.argparser.Arg.Type;
import jalview.bin.argparser.ArgParser;
import jalview.bin.argparser.BootstrapArgs;
+import jalview.bin.groovy.JalviewObject;
+import jalview.bin.groovy.JalviewObjectI;
import jalview.ext.so.SequenceOntology;
import jalview.gui.AlignFrame;
import jalview.gui.Desktop;
* @author $author$
* @version $Revision$
*/
-public class Jalview
+public class Jalview implements JalviewObjectI
{
static
{
protected Commands cmds;
- public static AlignFrame currentAlignFrame;
+ public AlignFrame currentAlignFrame = null;
private ArgParser argparser = null;
}
try
{
+ JalviewObjectI j = new JalviewObject(this);
Map<String, java.lang.Object> vbinding = new HashMap<>();
- vbinding.put("Jalview", this);
- if (af != null)
- {
- vbinding.put("currentAlFrame", af);
- }
+ vbinding.put("Jalview", j);
+ vbinding.put("currentAlFrame",
+ af != null ? af : getCurrentAlignFrame());
Binding gbinding = new Binding(vbinding);
GroovyScriptEngine gse = new GroovyScriptEngine(new URL[] { sfile });
gse.run(sfile.toString(), gbinding);
.errPrintln("Exception Whilst trying to execute file " + sfile
+ " as a groovy script.");
e.printStackTrace(System.err);
-
}
}
return false;
}
+ @Override
public AlignFrame[] getAlignFrames()
{
return desktop == null ? new AlignFrame[] { getCurrentAlignFrame() }
- : Desktop.getAlignFrames();
-
+ : Desktop.getDesktopAlignFrames();
}
/**
* jalview.bin.Jalview.quit() will just run the non-GUI shutdownHook and exit
*/
+ @Override
public void quit()
{
// System.exit will run the shutdownHook first
Jalview.exit("Quitting now. Bye!", ExitCode.OK);
}
- public static AlignFrame getCurrentAlignFrame()
+ @Override
+ public AlignFrame getCurrentAlignFrame()
{
- return Jalview.currentAlignFrame;
+ return currentAlignFrame;
}
- public static void setCurrentAlignFrame(AlignFrame currentAlignFrame)
+ public void setCurrentAlignFrame(AlignFrame af)
{
- Jalview.currentAlignFrame = currentAlignFrame;
+ this.currentAlignFrame = af;
}
public Commands getCommands()
// only add new ones to the end of the list (to preserve ordinal values)
OK, FILE_NOT_FOUND, FILE_NOT_READABLE, NO_FILES, INVALID_FORMAT,
INVALID_ARGUMENT, INVALID_VALUE, MIXED_CLI_ARGUMENTS,
- ERROR_RUNNING_COMMANDS, NO_LOGGING;
+ ERROR_RUNNING_COMMANDS, NO_LOGGING, GROOVY_ERROR;
}
/******************************
--- /dev/null
+package jalview.bin.groovy;
+
+import jalview.bin.Jalview.ExitCode;
+import jalview.gui.AlignFrame;
+
+public class JalviewObject implements JalviewObjectI
+{
+ private JalviewObjectI object = null;
+
+ public JalviewObject(JalviewObjectI j)
+ {
+ this.object = j;
+ }
+
+ @Override
+ public AlignFrame[] getAlignFrames()
+ {
+ return object == null ? null : object.getAlignFrames();
+ }
+
+ @Override
+ public AlignFrame getCurrentAlignFrame()
+ {
+ return object == null ? null : object.getCurrentAlignFrame();
+ }
+
+ @Override
+ public void quit()
+ {
+ if (object != null)
+ {
+ object.quit();
+ }
+ else
+ {
+ jalview.bin.Jalview.exit(
+ "Groovy console quit without Jalview object.",
+ ExitCode.GROOVY_ERROR);
+ }
+ }
+
+}
--- /dev/null
+package jalview.bin.groovy;
+
+import jalview.gui.AlignFrame;
+
+public interface JalviewObjectI
+{
+ public AlignFrame[] getAlignFrames();
+
+ public AlignFrame getCurrentAlignFrame();
+
+ public static AlignFrame currentAlFrame = null;
+
+ public void quit();
+}
@Override
public void focusGained(FocusEvent e)
{
- Jalview.setCurrentAlignFrame(AlignFrame.this);
+ Jalview.getInstance().setCurrentAlignFrame(AlignFrame.this);
}
});
@Override
protected void runGroovy_actionPerformed()
{
- Jalview.setCurrentAlignFrame(this);
+ Jalview.getInstance().setCurrentAlignFrame(this);
groovy.console.ui.Console console = Desktop.getGroovyConsole();
if (console != null)
{
*/
protected boolean noReferencesTo(AlignedCodonFrame acf)
{
- AlignFrame[] frames = Desktop.getAlignFrames();
+ AlignFrame[] frames = Desktop.getDesktopAlignFrames();
if (frames == null)
{
return true;
import jalview.bin.Jalview;
import jalview.bin.Jalview.ExitCode;
import jalview.bin.argparser.Arg;
+import jalview.bin.groovy.JalviewObject;
+import jalview.bin.groovy.JalviewObjectI;
import jalview.datamodel.Alignment;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.Sequence;
*/
public class Desktop extends jalview.jbgui.GDesktop
implements DropTargetListener, ClipboardOwner, IProgressIndicator,
- jalview.api.StructureSelectionManagerProvider
+ jalview.api.StructureSelectionManagerProvider, JalviewObjectI
{
private static final String CITATION;
static
{
if (itf instanceof AlignFrame)
{
- Jalview.setCurrentAlignFrame((AlignFrame) itf);
+ Jalview.getInstance().setCurrentAlignFrame((AlignFrame) itf);
}
itf.requestFocus();
}
{
}
}
- Jalview.setCurrentAlignFrame(null);
+ Jalview.getInstance().setCurrentAlignFrame(null);
jalview.bin.Console.info("ALL CLOSED");
/*
return null;
}
List<AlignmentPanel> aps = new ArrayList<>();
- AlignFrame[] frames = getAlignFrames();
+ AlignFrame[] frames = Desktop.getDesktopAlignFrames();
if (frames == null)
{
return null;
List<AlignmentViewport> viewp = new ArrayList<>();
if (desktop != null)
{
- AlignFrame[] frames = Desktop.getAlignFrames();
+ AlignFrame[] frames = Desktop.getDesktopAlignFrames();
for (AlignFrame afr : frames)
{
*
* @return an array of AlignFrame, or null if none found
*/
- public static AlignFrame[] getAlignFrames()
+ @Override
+ public AlignFrame[] getAlignFrames()
{
- if (Jalview.isHeadlessMode())
+ if (desktop == null)
{
- // Desktop.desktop is null in headless mode
- return new AlignFrame[] { Jalview.currentAlignFrame };
+ return null;
}
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
}
/**
+ * static version
+ */
+ public static AlignFrame[] getDesktopAlignFrames()
+ {
+ if (Jalview.isHeadlessMode())
+ {
+ // Desktop.desktop is null in headless mode
+ return Jalview.getInstance().getAlignFrames();
+ }
+
+ if (instance != null && desktop != null)
+ {
+ return instance.getAlignFrames();
+ }
+
+ return null;
+ }
+
+ /**
* Returns an array of any AppJmol frames in the Desktop (or null if none).
*
* @return
{
if (groovyConsole == null)
{
+ JalviewObjectI j = new JalviewObject(this);
groovyConsole = new groovy.console.ui.Console();
- groovyConsole.setVariable("Jalview", this);
+ groovyConsole.setVariable("Jalview", j);
+ groovyConsole.setVariable("currentAlFrame", getCurrentAlignFrame());
groovyConsole.run();
/*
*/
groovyShell.setEnabled(!enabled);
- AlignFrame[] alignFrames = getAlignFrames();
+ AlignFrame[] alignFrames = getDesktopAlignFrames();
if (alignFrames != null)
{
for (AlignFrame af : alignFrames)
{ button }, button, modal, new JButton[] { jb }, false);
}
+ @Override
+ public AlignFrame getCurrentAlignFrame()
+ {
+ return Jalview.getInstance().getCurrentAlignFrame();
+ }
}
return QResponse.QUIT;
int size = 0;
- AlignFrame[] afArray = Desktop.getAlignFrames();
+ AlignFrame[] afArray = Desktop.getDesktopAlignFrames();
if (!(afArray == null || afArray.length == 0))
{
for (int i = 0; i < afArray.length; i++)
*/
protected void updateWebServiceMenus()
{
- for (AlignFrame alignFrame : Desktop.getAlignFrames())
+ for (AlignFrame alignFrame : Desktop.getDesktopAlignFrames())
{
alignFrame.BuildWebServiceMenu();
}
private void buildSkipList()
{
skipList = new Hashtable();
- AlignFrame[] al = Desktop.getAlignFrames();
+ AlignFrame[] al = Desktop.getDesktopAlignFrames();
for (int f = 0; al != null && f < al.length; f++)
{
skipList.put(al[f].getViewport().getSequenceSetId(), al[f]);
*/
public void saveState(JarOutputStream jout)
{
- AlignFrame[] frames = Desktop.getAlignFrames();
+ AlignFrame[] frames = Desktop.getDesktopAlignFrames();
setStateSavedUpToDate(true);
if (stateSavedUpToDate()) // nothing happened since last project save
return true;
- AlignFrame[] frames = Desktop.getAlignFrames();
+ AlignFrame[] frames = Desktop.getDesktopAlignFrames();
if (frames != null)
{
for (int i = 0; i < frames.length; i++)
*/
package jalview.workers;
+import java.awt.Color;
+
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.Jalview;
import jalview.datamodel.Annotation;
import jalview.gui.AlignFrame;
-import java.awt.Color;
-
/**
* Factory class with methods which allow clients (including external scripts
* such as Groovy) to 'register and forget' an alignment annotation calculator.
*/
public static void newCalculator(FeatureSetCounterI counter)
{
- AlignmentViewPanel currentAlignFrame = Jalview
+ AlignmentViewPanel currentAlignFrame = Jalview.getInstance()
.getCurrentAlignFrame().alignPanel;
if (currentAlignFrame == null)
{
{
// TODO need an interface for AlignFrame by which to access
// its AlignViewportI and AlignmentViewPanel
- AlignFrame currentAlignFrame = Jalview.getCurrentAlignFrame();
+ AlignFrame currentAlignFrame = Jalview.getInstance()
+ .getCurrentAlignFrame();
if (currentAlignFrame != null)
{
new AnnotationWorker(currentAlignFrame.getViewport(),
Assert.assertEquals(cmds.argsWereParsed(), cmdArgs,
"Overall command parse and operation is false");
- Assert.assertEquals(Desktop.getAlignFrames().length, numFrames,
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length, numFrames,
"Wrong number of AlignFrames");
if (sequences != null)
{
Set<String> openedSequenceNames = new HashSet<>();
- AlignFrame[] afs = Desktop.getAlignFrames();
+ AlignFrame[] afs = Desktop.getDesktopAlignFrames();
for (AlignFrame af : afs)
{
openedSequenceNames.addAll(
public static boolean lookForSequenceName(String sequenceName)
{
- AlignFrame[] afs = Desktop.getAlignFrames();
+ AlignFrame[] afs = Desktop.getDesktopAlignFrames();
for (AlignFrame af : afs)
{
for (String name : af.getViewport().getAlignment().getSequenceNames())
}
;
- AlignFrame[] afs = Desktop.getAlignFrames();
+ AlignFrame[] afs = Desktop.getDesktopAlignFrames();
Assert.assertNotNull(afs);
Assert.assertTrue(afs.length > 0);
{
Assert.fail("Unexpected exception " + x);
}
- AlignFrame[] alfs = Desktop.getAlignFrames();
+ AlignFrame[] alfs = Desktop.getDesktopAlignFrames();
Assert.assertEquals("Expect just 2 alignment frames", 2, alfs.length);
// internal paste should yield a new alignment window with shared dataset
AlignmentI dataset = internalSource.getViewport().getAlignment()
SequenceFetcher sf = new SequenceFetcher(Desktop.instance,
forSource, forAccession);
sf.run();
- AlignFrame[] afs = Desktop.getAlignFrames();
+ AlignFrame[] afs = Desktop.getDesktopAlignFrames();
if (afs.length == 0)
{
failedDBRetr.add("Didn't retrieve " + first);
@Test(groups = { "Functional" })
public void gatherViewsHere() throws Exception
{
- int origCount = Desktop.getAlignFrames() == null ? 0
- : Desktop.getAlignFrames().length;
+ int origCount = Desktop.getDesktopAlignFrames() == null ? 0
+ : Desktop.getDesktopAlignFrames().length;
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", DataSourceType.FILE);
assertNotNull(af, "Didn't read in the example file correctly.");
- assertTrue(Desktop.getAlignFrames().length == 1 + origCount,
+ assertTrue(Desktop.getDesktopAlignFrames().length == 1 + origCount,
"Didn't gather the views in the example file.");
}
AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
"examples/exampleFile_2_7.jar", DataSourceType.FILE);
- Assert.assertEquals(Desktop.getAlignFrames().length, 1);
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length, 1);
String afid = af.getViewport().getSequenceSetId();
// check FileLoader returned a reference to the one alignFrame that is
Desktop.explodeViews(af);
- int oldviews = Desktop.getAlignFrames().length;
- Assert.assertEquals(Desktop.getAlignFrames().length,
+ int oldviews = Desktop.getDesktopAlignFrames().length;
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length,
Desktop.getAlignmentPanels(afid).length);
File tfile = File.createTempFile("testStoreAndRecoverExpanded", ".jvp");
try
Assert.fail("Didn't save the expanded view state", e);
}
Desktop.instance.closeAll_actionPerformed(null);
- if (Desktop.getAlignFrames() != null)
+ if (Desktop.getDesktopAlignFrames() != null)
{
- Assert.assertEquals(Desktop.getAlignFrames().length, 0);
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length, 0);
}
af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
DataSourceType.FILE);
Assert.assertNotNull(af);
- Assert.assertEquals(Desktop.getAlignFrames().length,
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length,
Desktop.getAlignmentPanels(
af.getViewport().getSequenceSetId()).length);
Assert.assertEquals(Desktop
Assert.fail("Didn't save the expanded view state", e);
}
Desktop.instance.closeAll_actionPerformed(null);
- if (Desktop.getAlignFrames() != null)
+ if (Desktop.getDesktopAlignFrames() != null)
{
- Assert.assertEquals(Desktop.getAlignFrames().length, 0);
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length, 0);
}
af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
Assert.fail("Didn't save the expanded view state", e);
}
Desktop.instance.closeAll_actionPerformed(null);
- if (Desktop.getAlignFrames() != null)
+ if (Desktop.getDesktopAlignFrames() != null)
{
- Assert.assertEquals(Desktop.getAlignFrames().length, 0);
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length, 0);
}
af = new FileLoader().LoadFileWaitTillLoaded(tfile.getAbsolutePath(),
Assert.fail("Didn't save the state", e);
}
Desktop.instance.closeAll_actionPerformed(null);
- if (Desktop.getAlignFrames() != null)
+ if (Desktop.getDesktopAlignFrames() != null)
{
- Assert.assertEquals(Desktop.getAlignFrames().length, 0);
+ Assert.assertEquals(Desktop.getDesktopAlignFrames().length, 0);
}
AlignFrame restoredFrame = new FileLoader().LoadFileWaitTillLoaded(
assertNotNull(af);
AlignmentI ds = null;
- for (AlignFrame alignFrame : Desktop.getAlignFrames())
+ for (AlignFrame alignFrame : Desktop.getDesktopAlignFrames())
{
if (ds == null)
{
/*
* find the complement frames (ugly)
*/
- AlignFrame[] frames = Desktop.getAlignFrames();
+ AlignFrame[] frames = Desktop.getDesktopAlignFrames();
assertEquals(frames.length, 2);
AlignViewport av1 = frames[0].getViewport();
AlignViewport av2 = frames[1].getViewport();