/** * {@inheritDoc} */ @Override protected int getSize() { return table.getRowCount(); }
/** * {@inheritDoc} */ @Override protected int getSize() { return table.getRowCount(); }
/** * {@inheritDoc} */ @Override protected int getSize() { return table.getRowCount(); }
/** * {@inheritDoc} */ @Override protected int getSize() { return table.getRowCount(); }
/** * {@inheritDoc} */ @Override protected int getSize() { return table.getRowCount(); }
public boolean hasData() { return table.getRowCount() > 0; }
/** * Returns the number of table view rows accessible during row-related * config. All row-related access is bounded by the value returned from this * method. * * Here: delegates to table.getRowCount(). * <p> * * Subclasses can override to reduce the number (for performance) or support * restrictions due to lazy loading, f.i. Implementors must guarantee that * view row access with <code>0 <= row < getRowCount(JXTable)</code> * succeeds. * * @param table the table to access * @return valid rowCount */ protected int getRowCount(JXTable table) { return table.getRowCount(); }
/** * Returns the number of table view rows accessible during row-related * config. All row-related access is bounded by the value returned from this * method. * * Here: delegates to table.getRowCount(). * <p> * * Subclasses can override to reduce the number (for performance) or support * restrictions due to lazy loading, f.i. Implementors must guarantee that * view row access with <code>0 <= row < getRowCount(JXTable)</code> * succeeds. * * @param table the table to access * @return valid rowCount */ protected int getRowCount(JXTable table) { return table.getRowCount(); }
/** * Returns the number of table view rows accessible during row-related * config. All row-related access is bounded by the value returned from this * method. * * Here: delegates to table.getRowCount(). * <p> * * Subclasses can override to reduce the number (for performance) or support * restrictions due to lazy loading, f.i. Implementors must guarantee that * view row access with <code>0 <= row < getRowCount(JXTable)</code> * succeeds. * * @param table the table to access * @return valid rowCount */ protected int getRowCount(JXTable table) { return table.getRowCount(); }
public void setElementsSelection(List<T> elements) { this.selectedElements = elements;//Keep this selection request to be able to do it if the table is first refreshed later. HashSet<T> elementsSet = new HashSet<>(); elementsSet.addAll(elements); table.clearSelection(); for (int i = 0; i < table.getRowCount(); i++) { if (elementsSet.contains(getElementFromRow(i))) { table.addRowSelectionInterval(i, i); } } }
/** * Hack around core issue 6791934: sets the sorter changed flag if appropriate. * Called after processing the event. * @param e the sorter event received from the sorter */ protected void postprocessSorterChanged(RowSorterEvent e) { filteredRowCountChanged = false; if (forceRevalidate && e.getType() == RowSorterEvent.Type.SORTED) { filteredRowCountChanged = e.getPreviousRowCount() != getRowCount(); } }
void selectStep(int row) { synchronized (lock) { if (row >= 0 && row < jTable.getRowCount()) { jTable.setRowSelectionInterval(row, row); Util.scrollToCenter(jTable, row, row); return; } } }
/** * Hack around core issue 6791934: sets the sorter changed flag if appropriate. * Called after processing the event. * @param e the sorter event received from the sorter */ protected void postprocessSorterChanged(RowSorterEvent e) { filteredRowCountChanged = false; if (forceRevalidate && e.getType() == RowSorterEvent.Type.SORTED) { filteredRowCountChanged = e.getPreviousRowCount() != getRowCount(); } }
/** * Hack around core issue 6791934: sets the sorter changed flag if appropriate. * Called after processing the event. * @param e the sorter event received from the sorter */ protected void postprocessSorterChanged(RowSorterEvent e) { filteredRowCountChanged = false; if (forceRevalidate && e.getType() == RowSorterEvent.Type.SORTED) { filteredRowCountChanged = e.getPreviousRowCount() != getRowCount(); } }
/** * Hack around core issue 6791934: sets the sorter changed flag if appropriate. * Called after processing the event. * @param e the sorter event received from the sorter */ protected void postprocessSorterChanged(RowSorterEvent e) { filteredRowCountChanged = false; if (forceRevalidate && e.getType() == RowSorterEvent.Type.SORTED) { filteredRowCountChanged = e.getPreviousRowCount() != getRowCount(); } }
private static class StringTableModel extends AbstractTableModel { private JXTable delegateTable; private StringTableModel(JXTable aTable) { delegateTable = aTable; } @Override public int getRowCount() { return delegateTable.getRowCount(); } @Override public int getColumnCount() { return delegateTable.getColumnCount(); } @Override public Object getValueAt(int aRowIndex, int aColumnIndex) { return delegateTable.getStringAt(aRowIndex, aColumnIndex); } }
public void propertyChange(PropertyChangeEvent event) { String prop = event.getPropertyName(); if (prop.equalsIgnoreCase(GrammarVizMessage.MAIN_CHART_CLICKED_MESSAGE)) { String rule = (String) event.getNewValue(); for (int row = 0; row <= sequiturTable.getRowCount() - 1; row++) { for (int col = 0; col <= sequiturTable.getColumnCount() - 1; col++) { if (rule.equals(this.session.chartData.convert2OriginalSAXAlphabet('1', sequiturTable.getValueAt(row, col).toString()))) { sequiturTable.scrollRectToVisible(sequiturTable.getCellRect(row, 0, true)); sequiturTable.setRowSelectionInterval(row, row); } } } } }
private void resizeSequences() { synchronized (lock) { int rc = jTable.getRowCount(); int vrc = jTable.getVisibleRowCount(); // System.out.println("Sequences Model row count: " + jTable.getModel().getRowCount() + " Table row count: " + rc + " Visible row count: " + vrc); if (vrc > rc || vrc < 3 && vrc != rc) { Util.setVisibleRowCount(jTable, Math.min(rc, 3), jSplitPane); // Util.setDividerLocation(jSplitPane, jTable); Util.packColumnsWidthFixedFirst(jTable, 9); } Util.packColumn(jTable, 0, 9, true); } }
public DecimalFormat getDecimalFormat(int row) { if (jTable != null && row >= 0 && row < jTable.getRowCount()) { int i = jTable.convertRowIndexToModel(row); if (i >= 0 && i < stats.size()) { String name = stats.keySet().toArray()[row].toString(); if (name != null) { TestStepInstance step = baseSequence.getChild(Util.getPathList(name)); if (step != null) { String decFormatStr = step.getPropertyString(TestStepInstance.STR_DECIMAL_FORMAT, null); if (decFormatStr != null) { return new DecimalFormat(decFormatStr); } } } } } return null; }
public void selectedSequenceChanged() { if (jTable.getRowCount() > 0) { int firstindex = jTable.getSelectedRow(); if (jTable.getSelectedRowCount() != 1 || firstindex < 0 || size() < 1 || firstindex >= size()) { hideSequence(); return; } else { firstindex = jTable.convertRowIndexToModel(firstindex); selectSequence(get(firstindex)); } } }