Java 8 TableRowSorter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 TableRowSorter class.

This code example shows how to use the following methods:
         
        this.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        this.table = table;
        this.column = column;
         
        this.sorter = new TableRowSorter<TableModel>(table.getModel());
        this.table.setRowSorter(sorter);
         
        // Listen for changes to the text field 
        field.getDocument().addDocumentListener(new DocumentListener() {
 
            @Override 
            public void changedUpdate(DocumentEvent e)
            { 
                update(); 
            } 
 
            @Override 
            public void insertUpdate(DocumentEvent e)
            { 
5
CodeRank
This code example shows how to use the following methods:setRowFilter
            // Create case-insensitive filter using "(?i)" 
            rf = RowFilter.regexFilter("(?i)" + filterText);
        } catch (java.util.regex.PatternSyntaxException e) {
            return; 
        } 
        sorter.setRowFilter(rf);
    } 
 
    class CRSEntry { 
 
        public String authority;
        public String code;
        public String description;
 
        public CRSEntry(String authority, String code, String description) {
            this.code = code;
            this.authority = authority;
            this.description = description;
        } 
 
4
CodeRank
This code example shows how to use the following methods:
 
    public JItemTable(String title, JItemTableModel<T> model) {
        this.model = model;
        table = new JTable(model);
        registerRenderers(); 
        rowSorter = new TableRowSorter<JItemTableModel<T>>(model);
        registerComparators(); 
        table.setRowSorter(rowSorter);
 
        if (title != null && "".compareTo(title) != 0)
            label = new JLabel(title);
 
        JScrollPane scrollPane = new JScrollPane(table);
        this.setLayout(new BorderLayout());
        if (label != null)
            add(label, BorderLayout.NORTH);
        add(scrollPane, BorderLayout.CENTER);
    } 
 
    protected void registerRenderers() { 
4
CodeRank
This code example shows how to use the following methods:
     
    public JEdgeTable(String title, JEdgeTableModel model) {
        this.model = model;        
        table = new JTable(model);
        registerRenderers(); 
        rowSorter = new TableRowSorter<JEdgeTableModel>(model);
        registerComparators(); 
        table.setRowSorter(rowSorter);
         
        if( title != null && "".compareTo(title)!=0)
            label = new JLabel(title); 
 
        JScrollPane scrollPane = new JScrollPane(table);
        this.setLayout(new BorderLayout());
        if(label != null)
            add(label, BorderLayout.NORTH);
        add(scrollPane, BorderLayout.CENTER);
    } 
     
    protected void registerRenderers(){ 
4
CodeRank
See Code Examples for Java 8 TableRowSorter Methods: