public JInternalFrame PIDSlider;
- /**
- * just an instance (for testng, probably); no actual frames
- *
- * This flag, when set true, allows a headless-like operation, with a Desktop
- * object but no actual frames. Though not headless, this option disallows
- * dialogs to run in test environments.
- *
- * It is set by invoking Desktop.getInstanceOnly().
- *
- */
- static boolean instanceOnly;
-
class MyDesktopManager implements DesktopManager
{
: (Desktop) ApplicationSingletonProvider
.getInstance(Desktop.class);
}
-
- /**
- * For TestNG, this constructor can be utilized to allow the creation of a
- * singleton Desktop instance with the creation of frames, but no addition to
- * the Desktop object, as in headless mode. Dialogs are not initiated.
- * Cache.log is also initialized for some tests that require it despite there
- * being no Desktop.
- *
- */
- public static Desktop getInstanceOnly()
- {
- instanceOnly = true;
- return getInstance();
- }
/**
* Private constructor enforces singleton pattern. It is called by reflection
}
// THIS IS A PUBLIC STATIC METHOD, SO IT MAY BE CALLED EVEN IN
// A HEADLESS STATE WHEN NO DESKTOP EXISTS. MUST RETURN
- // IF JALVIEW IS RUNNING HEADLESS OR IN INSTANCE-ONLY (testNG) MODE
+ // IF JALVIEW IS RUNNING HEADLESS
// ///////////////////////////////////////////////
- if (Jalview.isHeadlessMode() || Desktop.instanceOnly)
+ if (Jalview.isHeadlessMode())
{
return;
}
{
}
}
- if (instanceOnly || Jalview.isHeadlessMode())
+ if (Jalview.isHeadlessMode())
{
return;
}