package test;
+import jalview.gui.Desktop;
+import jalview.gui.JvOptionPane;
+import jalview.util.MessageManager;
+
import java.awt.BorderLayout;
import java.awt.ComponentOrientation;
import java.awt.Container;
{
public static void main(String[] args)
{
- new JalviewJSTest().doTest4();
+ new JalviewJSTest().doTest5();
+ }
+
+ /**
+ * Dialog message truncation
+ */
+ void doTest5()
+ {
+ JFrame main = new JFrame();
+ main.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
+ main.setContentPane(new JPanel());
+ main.setMinimumSize(new Dimension(100, 100));
+ main.pack();
+ main.setVisible(true);
+
+ /*
+ * like AlignFrame.delete_actionPerformed()
+ * except here it works fine, also in JS
+ */
+ JvOptionPane dialog = JvOptionPane.newOptionDialog(null);
+ Object[] options = new Object[] { "OK", "Cancel" };
+ String msg = "<html>Deleting all sequences will close the alignment window.<br>Confirm deletion or Cancel.";
+ dialog.showDialog(msg, "", JvOptionPane.DEFAULT_OPTION, JvOptionPane.PLAIN_MESSAGE, null, options, options[0]);
+
}
void doTest4()
System.out.println("f2 hashCode = " + f2.hashCode());
System.out.println(map.get(f2));
}
+
/**
* Put some content in a JFrame and show it
*/
- void doTest()
+ void doTest1()
{
System.out.println("ab;c;".split(";"));
new DecimalFormat("###,###").format((Integer) 1);