+ final AlignViewport us = this;
+
+ /*
+ * options No, Split Window, New Window correspond to
+ * dialog responses 0, 1, 2 (even though JOptionPane shows them
+ * in reverse order)
+ */
+ JvOptionPane dialog = JvOptionPane.newOptionDialog(Desktop.desktop)
+ .setResponseHandler(0, new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ addDataToAlignment(al);
+ }
+ }).setResponseHandler(1, new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ us.openLinkedAlignmentAs(al, title, true);
+ }
+ }).setResponseHandler(2, new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ us.openLinkedAlignmentAs(al, title, false);
+ }
+ });
+ dialog.showDialog(question,