/** * Configures the given JXTable for use with GlazedLists */ public void configureStateForGlazedLists(JXTable table) { table.setSortable(false); }
/** * Hook into super's setSortable for use in sub-classes which want to experiment * with tree table sorting/filtering.<p> * * <strong> NOTE: While subclasses may use this method to allow access to * super that usage alone will not magically turn sorting/filtering on! They have * to implement an appropriate RowSorter/SortController * as well. This is merely a hook to hang themselves, as requested in Issue #479-swingx * </strong> * * @param sortable */ protected void superSetSortable(boolean sortable) { super.setSortable(sortable); }
/** * Hook into super's setSortable for use in sub-classes which want to experiment * with tree table sorting/filtering.<p> * * <strong> NOTE: While subclasses may use this method to allow access to * super that usage alone will not magically turn sorting/filtering on! They have * to implement an appropriate RowSorter/SortController * as well. This is merely a hook to hang themselves, as requested in Issue #479-swingx * </strong> * * @param sortable */ protected void superSetSortable(boolean sortable) { super.setSortable(sortable); }
/** * Hook into super's setSortable for use in sub-classes which want to experiment * with tree table sorting/filtering.<p> * * <strong> NOTE: While subclasses may use this method to allow access to * super that usage alone will not magically turn sorting/filtering on! They have * to implement an appropriate RowSorter/SortController * as well. This is merely a hook to hang themselves, as requested in Issue #479-swingx * </strong> * * @param sortable */ protected void superSetSortable(boolean sortable) { super.setSortable(sortable); }
/** * Hook into super's setSortable for use in sub-classes which want to experiment * with tree table sorting/filtering.<p> * * <strong> NOTE: While subclasses may use this method to allow access to * super that usage alone will not magically turn sorting/filtering on! They have * to implement an appropriate RowSorter/SortController * as well. This is merely a hook to hang themselves, as requested in Issue #479-swingx * </strong> * * @param sortable */ protected void superSetSortable(boolean sortable) { super.setSortable(sortable); }
/** * Restores the previously stored state to the given JXTable. */ public void restoreStateTo(JXTable table) { table.setModel(oldTableModel); table.setSelectionModel(oldSelectionModel); table.setSortable(oldSortable); }
/** * Restores the previously stored state to the given JXTable. */ public void restoreStateTo(JXTable table) { table.setModel(oldTableModel); table.setSelectionModel(oldSelectionModel); table.setSortable(oldSortable); table.getTableHeader().setDefaultRenderer(oldDefaultRenderer); }
/** * Configures the given JXTable for use with GlazedLists */ public void configureStateForGlazedLists(JXTable table) { table.setSortable(false); table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); }
/** * Configures the given JXTable for use with GlazedLists */ public void configureStateForGlazedLists(JXTable table) { table.setSortable(false); table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); }
/** * Restores the previously stored state to the given JXTable. */ public void restoreStateTo(JXTable table) { table.setModel(oldTableModel); table.setSelectionModel(oldSelectionModel); table.setSortable(oldSortable); table.getTableHeader().setDefaultRenderer(oldDefaultRenderer); }
private <T> EventTableModel<T> setupTable(JXTable table, TableFormat<T> tf, EventList<T> displayItems, SortedList<T> sortedItems) { table.setColumnControlVisible(true); table.setSortable(false); table.getTableHeader().setDefaultRenderer(new JTableHeader().getDefaultRenderer()); table.setAutoCreateRowSorter(false); table.setRowSorter(null); EventTableModel<T> etm = new EventTableModel<T>(displayItems, tf); table.setModel(etm); TableComparatorChooser.install(table, sortedItems, AbstractTableComparatorChooser.SINGLE_COLUMN); return etm; }
public Example_7_View() { super(); setTitle(getClass().getSimpleName() + " " + ManagementFactory.getRuntimeMXBean().getName()); setBounds(100, 100, 700, 500); setDefaultCloseOperation(StrictThreadingJFrame.EXIT_ON_CLOSE); getContentPane().setLayout(new BorderLayout(0, 0)); final JXTable table = new JXTable(myTableModel); table.setHighlighters(HighlighterFactory.createSimpleStriping()); table.setSortable(false); table.getTableHeader().setReorderingAllowed(false); myTableModel.addTableModelListener(new TableModelListener() { int lastRowCountScrolledTo = -1; @Override public void tableChanged(final TableModelEvent e) { if (TableUtilities.isInsert(e)) { final int currentRowCount = myTableModel.getRowCount(); if (currentRowCount != lastRowCountScrolledTo) { lastRowCountScrolledTo = currentRowCount; SwingUtilities.invokeLater(() -> table.scrollRectToVisible(table.getCellRect(myTableModel.getRowCount() - 1, 0, false))); } } } }); JScrollPane scrollPane = new JScrollPane(table); getContentPane().add(scrollPane, BorderLayout.CENTER); }
public Example_7a_View() { super(); setTitle(getClass().getSimpleName() + " " + ManagementFactory.getRuntimeMXBean().getName()); setBounds(100, 100, 700, 500); setDefaultCloseOperation(StrictThreadingJFrame.EXIT_ON_CLOSE); getContentPane().setLayout(new BorderLayout(0, 0)); final JXTable table = new JXTable(myTableModel); table.setHighlighters(HighlighterFactory.createSimpleStriping()); table.setSortable(false); table.getTableHeader().setReorderingAllowed(false); myTableModel.addTableModelListener(new TableModelListener() { int lastRowCountScrolledTo = -1; @Override public void tableChanged(final TableModelEvent e) { if (TableUtilities.isInsert(e)) { final int currentRowCount = myTableModel.getRowCount(); if (currentRowCount != lastRowCountScrolledTo) { lastRowCountScrolledTo = currentRowCount; SwingUtilities.invokeLater(() -> table.scrollRectToVisible(table.getCellRect(myTableModel.getRowCount() - 1, 0, false))); } } } }); JScrollPane scrollPane = new JScrollPane(table); getContentPane().add(scrollPane, BorderLayout.CENTER); }
super.setSortable(false);
public AbstractElementsDataTable() { attributeColumnsController = Lookup.getDefault().lookup(AttributeColumnsController.class); table = new JXTable(); table.setHighlighters(HighlighterFactory.createAlternateStriping()); table.setColumnControlVisible(false); table.setSortable(true); table.setAutoCreateRowSorter(true); intervalSetGraphicsComponentProvider = new IntervalSetGraphicsComponentProvider(this, table); timestampSetGraphicsComponentProvider = new TimestampSetGraphicsComponentProvider(this, table); intervalSetGraphicsRenderer = new DefaultTableRenderer(intervalSetGraphicsComponentProvider); timestampSetGraphicsRenderer = new DefaultTableRenderer(timestampSetGraphicsComponentProvider); timeSetRenderer = new DefaultTableRenderer(new TimeSetStringConverter(this)); timeMapRenderer = new DefaultTableRenderer(new TimeMapStringConverter(this)); intervalMapSparklinesGraphicsRenderer = new DefaultTableRenderer(new IntervalMapSparklinesGraphicsComponentProvider(this, table)); timestampMapSparklinesGraphicsRenderer = new DefaultTableRenderer(new TimestampMapSparklinesGraphicsComponentProvider(this, table)); arraySparklinesGraphicsRenderer = new DefaultTableRenderer(new ArraySparklinesGraphicsComponentProvider(this, table)); prepareCellEditors(); prepareRenderers(); }
/** * Initializes the table for use. * */ private void init() { putClientProperty(USE_DTCR_COLORMEMORY_HACK, Boolean.TRUE); setEditable(true); setSortable(true); setRolloverEnabled(true); setTerminateEditOnFocusLost(true); // guarantee getFilters() to return != null setFilters(null); initActionsAndBindings(); initFocusBindings(); // instantiate row height depending ui setting or font size. updateRowHeightUI(false); // set to null - don't want hard-coded pixel sizes. setPreferredScrollableViewportSize(null); // PENDING: need to duplicate here.. // why doesn't the call in tableChanged work? initializeColumnWidths(); setFillsViewportHeight(true); updateLocaleState(getLocale()); }
/** * Initializes the table for use. * */ private void init() { putClientProperty(USE_DTCR_COLORMEMORY_HACK, Boolean.TRUE); initDefaultStringValues(); sortOrderCycle = DefaultSortController.getDefaultSortOrderCycle(); setSortsOnUpdates(true); setSortable(true); setAutoCreateRowSorter(true); setRolloverEnabled(true); setEditable(true); setTerminateEditOnFocusLost(true); initActionsAndBindings(); initFocusBindings(); // instantiate row height depending ui setting or font size. updateRowHeightUI(false); // set to null - don't want hard-coded pixel sizes. setPreferredScrollableViewportSize(null); // PENDING: need to duplicate here.. // why doesn't the call in tableChanged work? initializeColumnWidths(); setFillsViewportHeight(true); updateLocaleState(getLocale()); }
/** * Initializes the table for use. * */ private void init() { putClientProperty(USE_DTCR_COLORMEMORY_HACK, Boolean.TRUE); initDefaultStringValues(); sortOrderCycle = DefaultSortController.getDefaultSortOrderCycle(); setSortsOnUpdates(true); setSortable(true); setAutoCreateRowSorter(true); setRolloverEnabled(true); setEditable(true); setTerminateEditOnFocusLost(true); initActionsAndBindings(); initFocusBindings(); // instantiate row height depending ui setting or font size. updateRowHeightUI(false); // set to null - don't want hard-coded pixel sizes. setPreferredScrollableViewportSize(null); // PENDING: need to duplicate here.. // why doesn't the call in tableChanged work? initializeColumnWidths(); setFillsViewportHeight(true); updateLocaleState(getLocale()); }
/** * Initializes the table for use. * */ private void init() { putClientProperty(USE_DTCR_COLORMEMORY_HACK, Boolean.TRUE); initDefaultStringValues(); sortOrderCycle = DefaultSortController.getDefaultSortOrderCycle(); setSortsOnUpdates(true); setSortable(true); setAutoCreateRowSorter(true); setRolloverEnabled(true); setEditable(true); setTerminateEditOnFocusLost(true); initActionsAndBindings(); initFocusBindings(); // instantiate row height depending ui setting or font size. updateRowHeightUI(false); // set to null - don't want hard-coded pixel sizes. setPreferredScrollableViewportSize(null); // PENDING: need to duplicate here.. // why doesn't the call in tableChanged work? initializeColumnWidths(); setFillsViewportHeight(true); updateLocaleState(getLocale()); }
/** * Initializes the table for use. * */ private void init() { putClientProperty(USE_DTCR_COLORMEMORY_HACK, Boolean.TRUE); initDefaultStringValues(); sortOrderCycle = DefaultSortController.getDefaultSortOrderCycle(); setSortsOnUpdates(true); setSortable(true); setAutoCreateRowSorter(true); setRolloverEnabled(true); setEditable(true); setTerminateEditOnFocusLost(true); initActionsAndBindings(); initFocusBindings(); // instantiate row height depending ui setting or font size. updateRowHeightUI(false); // set to null - don't want hard-coded pixel sizes. setPreferredScrollableViewportSize(null); // PENDING: need to duplicate here.. // why doesn't the call in tableChanged work? initializeColumnWidths(); setFillsViewportHeight(true); updateLocaleState(getLocale()); }