Search in sources :

Example 11 with DataColumnSpecListCellRenderer

use of org.knime.core.node.util.DataColumnSpecListCellRenderer in project knime-core by knime.

the class ColumnResorterNodeDialog method createListBox.

private Box createListBox() {
    // List for the columns
    Box listBox = Box.createVerticalBox();
    listBox.setBorder(new TitledBorder("Columns"));
    m_model = new DefaultListModel();
    m_columnList = new JList(m_model);
    m_columnList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
    m_columnList.setCellRenderer(new DataColumnSpecListCellRenderer());
    m_columnList.setBorder(new EtchedBorder());
    JScrollPane scrollPane = new JScrollPane(m_columnList);
    listBox.add(scrollPane);
    return listBox;
}
Also used : JScrollPane(javax.swing.JScrollPane) DataColumnSpecListCellRenderer(org.knime.core.node.util.DataColumnSpecListCellRenderer) EtchedBorder(javax.swing.border.EtchedBorder) DefaultListModel(javax.swing.DefaultListModel) Box(javax.swing.Box) TitledBorder(javax.swing.border.TitledBorder) JList(javax.swing.JList)

Aggregations

DataColumnSpecListCellRenderer (org.knime.core.node.util.DataColumnSpecListCellRenderer)11 JScrollPane (javax.swing.JScrollPane)9 DataColumnSpec (org.knime.core.data.DataColumnSpec)8 JList (javax.swing.JList)6 Dimension (java.awt.Dimension)5 BorderLayout (java.awt.BorderLayout)4 Component (java.awt.Component)4 Box (javax.swing.Box)4 JPanel (javax.swing.JPanel)4 ListSelectionEvent (javax.swing.event.ListSelectionEvent)4 ListSelectionListener (javax.swing.event.ListSelectionListener)4 JCheckBox (javax.swing.JCheckBox)3 JComponent (javax.swing.JComponent)3 JLabel (javax.swing.JLabel)3 JSplitPane (javax.swing.JSplitPane)3 TitledBorder (javax.swing.border.TitledBorder)3 FlowVariableListCellRenderer (org.knime.core.node.util.FlowVariableListCellRenderer)3 ItemEvent (java.awt.event.ItemEvent)2 ItemListener (java.awt.event.ItemListener)2 MouseAdapter (java.awt.event.MouseAdapter)2