git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1988 JAL-3772 Fixes highlighted by tests
[jalview.git]
/
src
/
jalview
/
gui
/
JvOptionPane.java
diff --git
a/src/jalview/gui/JvOptionPane.java
b/src/jalview/gui/JvOptionPane.java
index
b58ea41
..
6e89fe2
100644
(file)
--- a/
src/jalview/gui/JvOptionPane.java
+++ b/
src/jalview/gui/JvOptionPane.java
@@
-793,6
+793,7
@@
public class JvOptionPane extends JOptionPane
if (!isInteractiveMode())
{
handleResponse(getMockResponse());
if (!isInteractiveMode())
{
handleResponse(getMockResponse());
+ return;
}
// two uses:
//
}
// two uses:
//
@@
-1002,6
+1003,10
@@
public class JvOptionPane extends JOptionPane
public static int showDialogOnTop(String label, String actionString,
int JOPTIONPANE_OPTION, int JOPTIONPANE_MESSAGETYPE)
{
public static int showDialogOnTop(String label, String actionString,
int JOPTIONPANE_OPTION, int JOPTIONPANE_MESSAGETYPE)
{
+ if (!isInteractiveMode())
+ {
+ return (int) getMockResponse();
+ }
// Ensure Jalview window is brought to front (primarily for Quit
// confirmation window to be visible)
// Ensure Jalview window is brought to front (primarily for Quit
// confirmation window to be visible)
@@
-1047,6
+1052,11
@@
public class JvOptionPane extends JOptionPane
int JOPTIONPANE_MESSAGETYPE, Icon icon, Object[] options,
Object initialValue, boolean modal, JButton[] buttons)
{
int JOPTIONPANE_MESSAGETYPE, Icon icon, Object[] options,
Object initialValue, boolean modal, JButton[] buttons)
{
+ if (!isInteractiveMode())
+ {
+ handleResponse(getMockResponse());
+ return;
+ }
// Ensure Jalview window is brought to front (primarily for Quit
// confirmation window to be visible)
// Ensure Jalview window is brought to front (primarily for Quit
// confirmation window to be visible)
@@
-1131,6
+1141,11
@@
public class JvOptionPane extends JOptionPane
Object[] options, Object initialValue, boolean modal,
JButton[] buttons)
{
Object[] options, Object initialValue, boolean modal,
JButton[] buttons)
{
+ if (!isInteractiveMode())
+ {
+ handleResponse(getMockResponse());
+ return null;
+ }
JButton[] optionsButtons = null;
Object initialValueButton = null;
JOptionPane joptionpane = new JOptionPane();
JButton[] optionsButtons = null;
Object initialValueButton = null;
JOptionPane joptionpane = new JOptionPane();