/** * Hook into super's setAutoCreateRowSorter 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 autoCreateRowSorter */ protected void superSetAutoCreateRowSorter(boolean autoCreateRowSorter) { super.setAutoCreateRowSorter(autoCreateRowSorter); }
/** * Hook into super's setAutoCreateRowSorter 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 autoCreateRowSorter */ protected void superSetAutoCreateRowSorter(boolean autoCreateRowSorter) { super.setAutoCreateRowSorter(autoCreateRowSorter); }
/** * Hook into super's setAutoCreateRowSorter 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 autoCreateRowSorter */ protected void superSetAutoCreateRowSorter(boolean autoCreateRowSorter) { super.setAutoCreateRowSorter(autoCreateRowSorter); }
/** * Hook into super's setAutoCreateRowSorter 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 autoCreateRowSorter */ protected void superSetAutoCreateRowSorter(boolean autoCreateRowSorter) { super.setAutoCreateRowSorter(autoCreateRowSorter); }
@Override public void restoreStateTo(JXTable table) { super.restoreStateTo(table); table.setAutoCreateRowSorter(oldAutoCreateRowSorter); table.setRowSorter(oldRowSorter); }
@Override public void configureStateForGlazedLists(JXTable table) { super.configureStateForGlazedLists(table); table.setAutoCreateRowSorter(false); table.setRowSorter(null); } }
protected void createTable() { $objectMap.put("table", table = new JXTable(tableModel)); table.setName("table"); table.setRowSelectionAllowed(false); table.setAutoCreateRowSorter(true); table.setRowHeight(25); table.addMouseListener(JAXXUtil.getEventListener(MouseListener.class, "mousePressed", this, "doMousePressed__on__table")); }
protected void createTable() { $objectMap.put("table", table = new JXTable(tableModel)); table.setName("table"); table.setRowSelectionAllowed(false); table.setAutoCreateRowSorter(true); table.setRowHeight(25); table.addMouseListener(JAXXUtil.getEventListener(MouseListener.class, "mousePressed", this, "doMousePressed__on__table")); }
protected void createTable() { $objectMap.put("table", table = new JXTable(tableModel)); table.setName("table"); table.setRowSelectionAllowed(false); table.setAutoCreateRowSorter(true); table.setRowHeight(25); table.addMouseListener(JAXXUtil.getEventListener(MouseListener.class, "mousePressed", this, "doMousePressed__on__table")); }
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; }
private JXTable getTableTest() { if (tableTest == null) { tableTest = new JXTable(); tableTest.setModel(getPassiveScanTableModel()); tableTest.setRowHeight(DisplayUtils.getScaledSize(18)); tableTest.setIntercellSpacing(new java.awt.Dimension(1, 1)); tableTest.setAutoCreateRowSorter(true); //Default sort by name (column 0) List <RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>(1); sortKeys.add(new RowSorter.SortKey(0, SortOrder.ASCENDING)); tableTest.getRowSorter().setSortKeys(sortKeys); for (int i = 0; i < tableTest.getColumnCount()-1; i++) { TableColumn column = tableTest.getColumnModel().getColumn(i); column.setPreferredWidth(width[i]); } JComboBox<String> jcb1 = new JComboBox<>(); for (AlertThreshold level : AlertThreshold.values()) { jcb1.addItem(Constant.messages.getString("ascan.policy.level." + level.name().toLowerCase())); } tableTest.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(jcb1)); } return tableTest; }
private Component getHeatMap() { this.heatmapTM = new HeatMapTableModel(); this.heatmap = new JXTable(this.heatmapTM); this.heatmap.setDefaultRenderer( Object.class, new CustomTableCellRenderer()); this.heatmap.setTableHeader(null); this.heatmap.addMouseWheelListener(e -> { if(!mouseZoomEnabled) { return; } if (e.getWheelRotation() < 0) { zoomIn(); } else { zoomOut(); } }); this.heatmap.setFont(this.heatmap.getFont().deriveFont( (float) this.cellSize)); this.heatmap.setColumnControlVisible(false); this.heatmap.setShowHorizontalLines(false); this.heatmap.setShowVerticalLines(false); this.heatmap.setFillsViewportHeight(false); this.heatmap.setRowMargin(0); this.heatmap.setIntercellSpacing(new Dimension(0, 0)); this.heatmap.setCellSelectionEnabled(false); this.heatmap.setAutoCreateRowSorter(false); this.heatmap.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); this.fixCellSize(); return new JScrollPane(this.heatmap); }
super.setAutoCreateRowSorter(false); super.setRowSorter(null);
super.setAutoCreateRowSorter(false); super.setRowSorter(null);
public GlobalExcludeURLMultipleOptionsPanel(OptionsGlobalExcludeURLTableModel model) { super(model); this.model = model; getTable().getColumnExt(0).setPreferredWidth(25); // checkbox column should be tiny getTable().getColumnExt(1).setPreferredWidth(350); // wide Desc Col getTable().getColumnExt(2).setPreferredWidth(300); // less wide Regex Column getTable().setHorizontalScrollEnabled(true); // descriptions / regexs are very wide, so turn on horiz scroll getTable().setAutoCreateRowSorter(true); getTable().setSortOrder(1, SortOrder.ASCENDING); // sort by description by default /* XXX For some reason, sorting isn't accurate in the table. The getColumnClass correctly returns String for the Description, but sort order might be: "Ext - MS Word, ExtParam - Bla bla, Ext - PDF." It is like string.compare for the column sort ignores the space and dash. Really unsure as to why. As a work-around, start some descriptions with "Extension" instead of the shorter "Ext" */ }
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); 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()); }