*/
public static void setSynchronous(boolean b)
{
-
isSynchronous = b;
-
}
/**
import jalview.util.HttpUtils;
import jalview.util.MessageManager;
-import java.awt.EventQueue;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
public void setFeatureGroupStateOn(final AlignFrameI alf,
final String groups, boolean state)
{
- java.awt.EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
public void scrollViewToIn(final AlignFrameI alf, final String topRow,
final String leftHandColumn)
{
- java.awt.EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
public void scrollViewToRowIn(final AlignFrameI alf, final String topRow)
{
- java.awt.EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
public void scrollViewToColumnIn(final AlignFrameI alf,
final String leftHandColumn)
{
- java.awt.EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
if (alignedPosition != null && (alignedPosition.trim().length() == 0
|| alignedPosition.toLowerCase().indexOf("false") > -1))
{
- java.awt.EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
}
else
{
- java.awt.EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
}
sel.setStartRes(start);
sel.setEndRes(end);
- EventQueue.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
{
return "";
}
- ;
final AlignmentOrder aorder = new AlignmentOrder(sqs);
if (undoName != null && undoName.trim().length() == 0)
// need to refactor Desktop.addFrame
newframe.featureSettings_actionPerformed(null);
final FeatureSettings nfs = newframe.featureSettings;
- SwingUtilities.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
});
rfetch.add(fetchr);
- new Thread(new Runnable()
+ Jalview.execThread(new Thread(new Runnable()
{
@Override
public void run()
{
- javax.swing.SwingUtilities.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
}
});
}
- }).start();
+ }));
}
import java.io.PrintWriter;
import java.util.List;
-import javax.swing.SwingUtilities;
-
/**
* The main panel of an AlignFrame, containing holders for the IdPanel,
* SeqPanel, AnnotationLabels (a JPanel), and AnnotationPanel.
// This is only called if file loaded is a jar file that
// was wrapped when saved and user has wrap alignment true
// as preference setting
- SwingUtilities.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
}
- this.setDropTarget(new java.awt.dnd.DropTarget(desktopPane, this));
-
- this.addWindowListener(new WindowAdapter()
+ if (!Jalview.isSynchronous())
{
- @Override
- public void windowClosing(WindowEvent evt)
- {
- quit();
- }
- });
+ this.setDropTarget(new java.awt.dnd.DropTarget(desktopPane, this));
- MouseAdapter ma;
- this.addMouseListener(ma = new MouseAdapter()
- {
- @Override
- public void mousePressed(MouseEvent evt)
+ this.addWindowListener(new WindowAdapter()
{
- if (evt.isPopupTrigger()) // Mac
+ @Override
+ public void windowClosing(WindowEvent evt)
{
- showPasteMenu(evt.getX(), evt.getY());
+ quit();
}
- }
+ });
- @Override
- public void mouseReleased(MouseEvent evt)
+ MouseAdapter ma;
+ this.addMouseListener(ma = new MouseAdapter()
{
- if (evt.isPopupTrigger()) // Windows
+ @Override
+ public void mousePressed(MouseEvent evt)
{
- showPasteMenu(evt.getX(), evt.getY());
+ if (evt.isPopupTrigger()) // Mac
+ {
+ showPasteMenu(evt.getX(), evt.getY());
+ }
}
- }
- });
- desktopPane.addMouseListener(ma);
+
+ @Override
+ public void mouseReleased(MouseEvent evt)
+ {
+ if (evt.isPopupTrigger()) // Windows
+ {
+ showPasteMenu(evt.getX(), evt.getY());
+ }
+ }
+ });
+ desktopPane.addMouseListener(ma);
+ }
} catch (Throwable t)
{
t.printStackTrace();