use of javax.swing.JEditorPane in project vcell by virtualcell.
the class LoginPanel method getDtrpnUseThisLink.
private JEditorPane getDtrpnUseThisLink() {
if (dtrpnUseThisLink == null) {
dtrpnUseThisLink = new JEditorPane();
dtrpnUseThisLink.setBorder(null);
dtrpnUseThisLink.setBackground(getBackground());
dtrpnUseThisLink.setFont(new Font("Arial", Font.BOLD, 14));
dtrpnUseThisLink.setContentType("text/html");
String s = "<html><body bgcolor=\"#" + Hex.toString(new byte[] { (byte) (getBackground().getRed() & 0xFF), (byte) (getBackground().getGreen() & 0xFF), (byte) (getBackground().getBlue() & 0xFF) }) + "\"><font size=5 face=Arial>Use <a href=\"http://vcell.org/vcell_models/how_submit_publication.html\">this link</a> for details on how to<br>acknowledge Virtual Cell in your<br>publication and how to share your<br>published research through<br>the VCell database.</font></body></html>";
// System.out.println(s);
dtrpnUseThisLink.setText(s);
dtrpnUseThisLink.setEditable(false);
dtrpnUseThisLink.addHyperlinkListener(new HyperlinkListener() {
@Override
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
DialogUtils.browserLauncher(LoginPanel.this, e.getURL().toString(), "Please visit " + "http://vcell.org" + " for Online Help");
}
}
});
}
return dtrpnUseThisLink;
}
use of javax.swing.JEditorPane in project suite by stupidsing.
the class EditorController method format.
public void format() {
JEditorPane editor = view.getEditor();
Node node = Suite.parse(editor.getText());
editor.setText(new PrettyPrinter().prettyPrint(node));
}
use of javax.swing.JEditorPane in project suite by stupidsing.
the class EditorController method run.
private void run(Iterate<String> fun) {
JEditorPane editor = view.getEditor();
String selectedText = editor.getSelectedText();
String text = selectedText != null ? selectedText : editor.getText();
if (runThread == null || !runThread.isAlive())
runThread = Thread_.startThread(() -> {
view.showMessageRunning();
view.showMessage(fun.apply(text));
view.getEditor().requestFocusInWindow();
});
else
JOptionPane.showMessageDialog(view.getFrame(), "Previous evaluation in progress");
}
use of javax.swing.JEditorPane in project knime-core by knime.
the class OneWayANOVANodeView method createMainPanel.
/**
* The content of the view.
*/
private JPanel createMainPanel() {
JPanel p = new JPanel(new GridBagLayout());
GridBagConstraints c = createGridBagConstraints();
c.gridwidth = 2;
m_headerPane = new JEditorPane("text/html", "");
m_headerPane.setEditable(false);
p.add(m_headerPane, c);
c.gridwidth = 1;
c.gridy++;
c.gridx = 0;
c.gridwidth = 2;
m_descrStatPane = new JEditorPane("text/html", "");
m_descrStatPane.setEditable(false);
p.add(m_descrStatPane, c);
c.gridy++;
c.gridx = 0;
c.gridwidth = 2;
m_leveneStatPane = new JEditorPane("text/html", "");
m_leveneStatPane.setEditable(false);
p.add(m_leveneStatPane, c);
c.gridy++;
c.gridx = 0;
c.gridwidth = 2;
m_statPane = new JEditorPane("text/html", "");
m_statPane.setEditable(false);
p.add(m_statPane, c);
c.gridy++;
c.weighty = 1;
JPanel foo = new JPanel();
foo.setBackground(Color.white);
p.add(foo, c);
return p;
}
use of javax.swing.JEditorPane in project knime-core by knime.
the class TwoSampleTTestNodeView method createMainPanel.
/**
* The content of the view.
*/
private JPanel createMainPanel() {
JPanel p = new JPanel(new GridBagLayout());
GridBagConstraints c = createGridBagConstraints();
c.gridwidth = 2;
m_headerPane = new JEditorPane("text/html", "");
m_headerPane.setEditable(false);
p.add(m_headerPane, c);
c.gridwidth = 1;
c.gridy++;
c.gridx = 0;
c.gridwidth = 2;
m_descrStatPane = new JEditorPane("text/html", "");
m_descrStatPane.setEditable(false);
p.add(m_descrStatPane, c);
c.gridy++;
c.gridx = 0;
c.gridwidth = 2;
m_leveneStatPane = new JEditorPane("text/html", "");
m_leveneStatPane.setEditable(false);
p.add(m_leveneStatPane, c);
c.gridy++;
c.gridx = 0;
c.gridwidth = 2;
m_statPane = new JEditorPane("text/html", "");
m_statPane.setEditable(false);
p.add(m_statPane, c);
c.gridy++;
c.weighty = 1;
JPanel foo = new JPanel();
foo.setBackground(Color.white);
p.add(foo, c);
return p;
}
Aggregations