@Test public void testChangingUIDelegate() throws Exception { Assume.assumeFalse(Boolean.getBoolean("java.awt.headless")); String[] properties = {"text"}; String[] labels = {"Text"}; TableFormat<JLabel> tableFormat = GlazedLists.tableFormat(properties, labels); EventList<JLabel> source = new BasicEventList<>(); JTable table = new JTable(new DefaultEventTableModel<>(source, tableFormat)); SortedList<JLabel> sorted = new SortedList<>(source); TableComparatorChooser.install(table, sorted, AbstractTableComparatorChooser.SINGLE_COLUMN); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); SwingUtilities.updateComponentTreeUI(table); UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); SwingUtilities.updateComponentTreeUI(table); final TableCellRenderer defaultRenderer = table.getTableHeader().getDefaultRenderer(); defaultRenderer.getTableCellRendererComponent(table, "Text", false, false, 0, 0); }
public static <E> TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy) { return install(table, sortedList, strategy, ((AdvancedTableModel<E>)table.getModel()).getTableFormat()); }
TableComparatorChooser extends AbstractTableComparatorChooser<E> { public static <E> TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy) { return install(table, sortedList, strategy, ((AdvancedTableModel<E>)table.getModel()).getTableFormat()); } }
TableComparatorChooser extends AbstractTableComparatorChooser<E> { public static <E> TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy) { return install(table, sortedList, strategy, ((AdvancedTableModel<E>)table.getModel()).getTableFormat()); } @Deprecated  TableComparatorChooser(JTable table, SortedList<E> sortedList, boolean multipleColumnSort); @Deprecated  TableComparatorChooser(JTable table, SortedList<E> sortedList, Object strategy); protected  TableComparatorChooser(JTable table, SortedList<E> sortedList, Object strategy, TableFormat<? super E> tableFormat); }
TableComparatorChooser extends AbstractTableComparatorChooser<E> { public static <E> TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy) { return install(table, sortedList, strategy, ((AdvancedTableModel<E>)table.getModel()).getTableFormat()); } @Deprecated  TableComparatorChooser(JTable table, SortedList<E> sortedList, boolean multipleColumnSort); @Deprecated  TableComparatorChooser(JTable table, SortedList<E> sortedList, Object strategy); protected  TableComparatorChooser(JTable table, SortedList<E> sortedList, Object strategy, TableFormat<? super E> tableFormat); static TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy); static TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy, TableFormat<? super E> tableFormat); void addSortActionListener(ActionListener sortActionListener); void removeSortActionListener(ActionListener sortActionListener); TableCellRenderer createSortArrowHeaderRenderer(TableCellRenderer delegateRenderer); static void setIconPath(String path); @Override void dispose(); }
TableComparatorChooser extends AbstractTableComparatorChooser<E> { public static <E> TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy) { return install(table, sortedList, strategy, ((AdvancedTableModel<E>)table.getModel()).getTableFormat()); } @Deprecated  TableComparatorChooser(JTable table, SortedList<E> sortedList, boolean multipleColumnSort); @Deprecated  TableComparatorChooser(JTable table, SortedList<E> sortedList, Object strategy); protected  TableComparatorChooser(JTable table, SortedList<E> sortedList, Object strategy, TableFormat<? super E> tableFormat); static TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy); static TableComparatorChooser<E> install(JTable table, SortedList<E> sortedList, Object strategy, TableFormat<? super E> tableFormat); void addSortActionListener(ActionListener sortActionListener); void removeSortActionListener(ActionListener sortActionListener); TableCellRenderer createSortArrowHeaderRenderer(TableCellRenderer delegateRenderer); static void setIconPath(String path); @Override void dispose();  }