}
/**
+ * adds inital selection value
+ *
+ * @param message
+ * @param initialSelectionValue
+ * @return
+ */
+ public static String showInputDialog(Object message,
+ Object initialSelectionValue)
+ {
+ if (!isInteractiveMode())
+ {
+ return getMockResponse().toString();
+ }
+
+ // AnnotationPanel character option
+
+ return JOptionPane.showInputDialog(message, initialSelectionValue);
+ }
+ /**
* centered on parent
*
* @param parentComponent
initialSelectionValue)
: getMockResponse().toString();
}
+
+
+ /**
+ * input with initial selection
+ *
+ * @param parentComponent
+ * @param message
+ * @param initialSelectionValue
+ * @return
+ */
+ public static String showInputDialog(Component parentComponent,
+ Object message, Object initialSelectionValue)
+ {
+
+ // AnnotationPanel
+
+ return isInteractiveMode()
+ ? JOptionPane.showInputDialog(parentComponent, message,
+ initialSelectionValue)
+ : getMockResponse().toString();
+ }
/**
*
{
switch (messageType)
{
- default:
- case JvOptionPane.INFORMATION_MESSAGE:
- prefix = "Note: ";
- break;
case JvOptionPane.WARNING_MESSAGE:
prefix = "WARNING! ";
break;
case JvOptionPane.ERROR_MESSAGE:
- prefix = "ERRROR! ";
+ prefix = "ERROR! ";
break;
+ default:
+ prefix = "Note: ";
}
}
return prefix;
{
runner.firstRun((int) getMockResponse());
}
- // two uses:
- //
- // TODO
- //
- // 1) AlignViewport for openLinkedAlignment
- //
- // Show a dialog with the option to open and link (cDNA <-> protein) as a
- // new
- // alignment, either as a standalone alignment or in a split frame. Returns
- // true if the new alignment was opened, false if not, because the user
- // declined the offer.
- //
- // 2) UserDefinedColors warning about saving over a name already defined
- //
Component parent;
/**
* @j2sNative parent = this;
{
parent = parentComponent;
}
- ;
ourOptions = Arrays.asList(options);
int response;
}
@Override
- public JvOptionPane response(RunResponse action)
+ public JvOptionPane addResponse(RunResponse action)
{
- runner.response(action);
+ runner.addResponse(action);
return this;
}