use of javax.swing.JEditorPane in project knime-core by knime.
the class OneSampleTTestNodeView 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_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 BitVectorGeneratorView method setTextArea.
private void setTextArea() {
BitVectorGeneratorNodeModel model = getNodeModel();
StringBuffer buffer = new StringBuffer("<html></body>");
buffer.append("<h2>BitVector Generator Information:</h2>");
buffer.append("<hr>");
buffer.append("<table>");
buffer.append("<tr><td>Number of processed rows: </td>" + "<td align=\"right\">" + model.getNumberOfProcessedRows() + " </td></tr>");
buffer.append("<tr><td>Total number of 0s: </td>" + "<td align=\"right\">" + model.getTotalNrOf0s() + " </td></tr>");
buffer.append("<tr><td>Total number of 1s: </td>" + "<td align=\"right\">" + model.getTotalNrOf1s() + "</td></tr>");
double ratio = 0.0;
if (model.getTotalNrOf0s() > 0) {
ratio = (int) (((double) model.getTotalNrOf1s() / (double) model.getTotalNrOf0s()) * ROUNDING_CONSTANT);
ratio = ratio / ROUNDING_CONSTANT;
}
buffer.append("<tr><td>Ratio of 1s to 0s: </td>" + "<td align=\"right\">" + ratio + "</td></tr></table>");
buffer.append("</body></html>");
m_pane = new JEditorPane("text/html", "");
m_pane.setText(buffer.toString());
m_pane.setEditable(false);
setComponent(new JScrollPane(m_pane));
}
use of javax.swing.JEditorPane in project knime-core by knime.
the class CrosstabNodeView 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.weightx = 1;
m_tablePane = new JEditorPane("text/html", "");
m_tablePane.setEditable(false);
p.add(m_tablePane, c);
c.weightx = 0;
c.gridx++;
p.add(createControlsPanel(), 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 CreateBitVectorView method setTextArea.
private void setTextArea() {
CreateBitVectorNodeModel model = getNodeModel();
StringBuffer buffer = new StringBuffer("<html></body>");
buffer.append("<h2>Bit Vector Generator Information:</h2>");
buffer.append("<hr>");
buffer.append("<table>");
buffer.append("<tr><td>Number of processed rows: </td>" + "<td align=\"right\">" + model.getNumberOfProcessedRows() + " </td></tr>");
buffer.append("<tr><td>Total number of 0s: </td>" + "<td align=\"right\">" + model.getTotalNrOf0s() + " </td></tr>");
buffer.append("<tr><td>Total number of 1s: </td>" + "<td align=\"right\">" + model.getTotalNrOf1s() + "</td></tr>");
double ratio = 0.0;
if (model.getTotalNrOf0s() > 0) {
ratio = (int) (((double) model.getTotalNrOf1s() / (double) model.getTotalNrOf0s()) * ROUNDING_CONSTANT);
ratio = ratio / ROUNDING_CONSTANT;
}
buffer.append("<tr><td>Ratio of 1s to 0s: </td>" + "<td align=\"right\">" + ratio + "</td></tr></table>");
buffer.append("</body></html>");
m_pane = new JEditorPane("text/html", "");
m_pane.setText(buffer.toString());
m_pane.setEditable(false);
setComponent(new JScrollPane(m_pane));
}
use of javax.swing.JEditorPane in project knime-core by knime.
the class DBAggregationFunctionProvider method getDescriptionPane.
/**
* {@inheritDoc}
*/
@Override
public JComponent getDescriptionPane() {
final StringBuilder buf = getHTMLDescription();
final JEditorPane editorPane = new JEditorPane("text/html", buf.toString());
editorPane.setEditable(false);
final JScrollPane scrollPane = new JScrollPane(editorPane, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
return scrollPane;
}
Aggregations