{
String warning = MessageManager
.getString("warning.using_old_command_line_arguments");
- String url = "https://www.jalview.org/help/html/features/commandline.html";
+ String url = "<a href=\"https://www.jalview.org/help/html/features/commandline.html\">https://www.jalview.org/help/html/features/commandline.html</a>";
if (Desktop.instance != null)
{
String cont = MessageManager.getString("label.continue");
Desktop.instance.nonBlockingDialog(32, 2, title, warning, url, cont,
- JvOptionPane.WARNING_MESSAGE, false, false);
+ JvOptionPane.WARNING_MESSAGE, false, true, false);
}
}
if (j.getCommands() != null && j.getCommands().getErrors().size() > 0)
Math.max(message.length(), Math.min(60, shortest)),
Math.min(errors.size(), 20), title, message,
j.getCommands().errorsToString(), ok,
- JvOptionPane.WARNING_MESSAGE, true, true);
+ JvOptionPane.WARNING_MESSAGE, true, false, true);
}
}
}
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
+import javax.swing.JTextPane;
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import javax.swing.event.HyperlinkEvent.EventType;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
+import javax.swing.text.JTextComponent;
import org.stackoverflowusers.file.WindowsShortcut;
int type, boolean scrollable, boolean modal)
{
nonBlockingDialog(32, 2, title, message, null, button, type, scrollable,
- modal);
+ false, modal);
}
public void nonBlockingDialog(int width, int height, String title,
String message, String boxtext, String button, int type,
- boolean scrollable, boolean modal)
+ boolean scrollable, boolean html, boolean modal)
{
if (type < 0)
{
}
JLabel jl = new JLabel(message);
- JTextArea jta = new JTextArea(height, width);
- // jta.setLineWrap(true);
- jta.setEditable(false);
- jta.setWrapStyleWord(true);
- jta.setAutoscrolls(true);
- jta.setText(boxtext);
+ JTextComponent jtc = null;
+ if (html)
+ {
+ JTextPane jtp = new JTextPane();
+ jtp.setContentType("text/html");
+ jtp.setEditable(false);
+ jtp.setAutoscrolls(true);
+ jtp.setText(boxtext);
+
+ jtc = jtp;
+ }
+ else
+ {
+ JTextArea jta = new JTextArea(height, width);
+ // jta.setLineWrap(true);
+ jta.setEditable(false);
+ jta.setWrapStyleWord(true);
+ jta.setAutoscrolls(true);
+ jta.setText(boxtext);
+
+ jtc = jta;
+ }
JScrollPane jsp = scrollable
- ? new JScrollPane(jta, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
+ ? new JScrollPane(jtc, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED)
: null;
}
else
{
- jta.setAlignmentX(Component.LEFT_ALIGNMENT);
- jp.add(jta);
+ jtc.setAlignmentX(Component.LEFT_ALIGNMENT);
+ jp.add(jtc);
}
}