com.jidesoft.pivot
Class AggregateTable
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
com.jidesoft.grid.JideTable
com.jidesoft.grid.ContextSensitiveTable
com.jidesoft.grid.NavigableTable
com.jidesoft.grid.CellStyleTable
com.jidesoft.grid.CellSpanTable
com.jidesoft.grid.CategorizedTable
com.jidesoft.grid.SortableTable
com.jidesoft.pivot.AggregateTable
- All Implemented Interfaces:
- ExpandableProvider, IndexChangeListener, SortListener, TableAdapter, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable
public class AggregateTable
- extends SortableTable
- implements ExpandableProvider
AggregateTable provides a way to aggregate a table model with duplicated values using a TreeTable-like
expandable cells and cell spans.
If you have a very huge table and observe obvious performance issue while scrolling. You could use the following code
to enhance the performance. Of course, you have to prepare for huge memory usage for the cache. That's why we didn't
put it on JIDE jar.
// After you create the AggregateTable instance, you can add a CachedTableModel wrapper to improve the
performance.
_aggregateTable.setModel(new CachedTableModel(_aggregateTable.getModel()));
- See Also:
- Serialized Form
| Fields inherited from class com.jidesoft.grid.JideTable |
_batchProcessing, _cellChangeEvent, _clickCountToStart, _columnAutoResizer, _columnResizer, _headerDraggingMouseMotionListener, _rowHeights, _rowResizer, AUTO_RESIZE_FILL, EDITOR_AUTO_COMPLETION_MODE_COLUMN, EDITOR_AUTO_COMPLETION_MODE_NONE, EDITOR_AUTO_COMPLETION_MODE_ROW, EDITOR_AUTO_COMPLETION_MODE_TABLE, PROPERTY_CLEAR_SELECTION_ON_TABLE_DATA_CHANGES, PROPERTY_EDITOR_AUTO_COMPLETION_MODE, PROPERTY_NON_CONTIGUOUS_CELL_SELECTION, PROPERTY_ROW_AUTO_RESIZES, PROPERTY_SCROLL_ROW_WHEN_ROW_HEIGHT_CHANGES, PROPERTY_TABLE_SELECTION_MODEL, ROW_AUTO_RESIZES_PROPERTY |
| Fields inherited from class javax.swing.JTable |
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader |
| Methods inherited from class com.jidesoft.grid.SortableTable |
createDefaultTableHeader, createSortableTableHeaderMouseListener, createSortIcon, getActualRowAt, getSortableTableModel, getSortArrowForeground, getSortedRowAt, getSortOrderForeground, isAutoResort, isMultiColumnSortable, isOptimized, isPreserveSelectionsAfterSorting, isShowSortOrderNumber, isSortable, isSortingEnabled, resort, setAutoResort, setMultiColumnSortable, setOptimized, setPreserveSelectionsAfterSorting, setShowSortOrderNumber, setSortable, setSortArrowForeground, setSortingEnabled, setSortOrderForeground, sortChanged, sortChanging, sortColumn, sortColumn, sortColumn, sortColumn, sortColumn, sortColumn, unsort |
| Methods inherited from class com.jidesoft.grid.CategorizedTable |
getAscendingIcon, getCategoryCollapsedIcon, getCategoryExpandedIcon, getCollapsedIcon, getDescendingIcon, getDisabledBackground, getDisabledForeground, getExpandedIcon, getMarginBackground, isExpandIconVisible, isPaintMarginBackground, isUseLnfDefaultSortIcon, isUseTableRendererForCategoryRow, setAscendingIcon, setCategoryCollapsedIcon, setCategoryExpandedIcon, setCollapsedIcon, setDescendingIcon, setDisabledBackground, setDisabledForeground, setExpandedIcon, setExpandIconVisible, setMarginBackground, setPaintMarginBackground, setUseLnfDefaultSortIcon, setUseTableRendererForCategoryRow |
| Methods inherited from class com.jidesoft.grid.CellSpanTable |
calculateRowHeight, calculateRowHeight, calculateRowHeights, columnAtPoint, columnSelectionChanged, convertModelCellSpanToView, convertViewCellSpanToModel, createDelegateAction, getAutoCellMerge, getCache, getCacheEmpty, getCellEditor, getCellRect, getCellSpanAt, getCellSpanAt, getCellSpanFromAutoCellMerge, getCellSpanFromSpanModel, getSpanModel, getUIClassID, invalidateCellSpanCache, isAutoConvertCellSpan, isCellSelected, isCellSpanCacheEnabled, isCellSpanOn, isKeepColumnAtPoint, isKeepRowAtPoint, muteDefaultKeyStroke, originalColumnAtPoint, originalGetCellRect, originalRowAtPoint, prepareEditor, prepareRenderer, replaceAction, replaceAction, restoreAction, restoreAction, rowAtPoint, setAutoCellMerge, setAutoConvertCellSpan, setCellSpanCacheEnabled, setKeepColumnAtPoint, setKeepRowAtPoint, valueChanged, verifyCellSpan, verifyCellSpan |
| Methods inherited from class com.jidesoft.grid.CellStyleTable |
addCellStyleCustomizer, clearCellStyleCustomizers, collectCellStyles, configureEditorComponent, configureRendererComponent, customizeEditorComponent, customizeRendererComponent, getCellStyleCustomizers, getCellStyleProvider, getFocusCellStyle, getNextStyleModel, getStyleModel, getTableStyleProvider, mergeCellStyles, paintCellOverlay, releaseRendererComponent, removeCellStyleCustomizer, setCellStyleProvider, setFocusCellStyle, setTableStyleProvider |
| Methods inherited from class com.jidesoft.grid.NavigableTable |
changeSelection, findNearestNavigableCellInColumn, findNearestNavigableCellInRow, findNextNavigableCell, findNextNavigableCellInColumn, findNextNavigableCellInRow, findNextNavigableCellVertically, findPreviousNavigableCell, findPreviousNavigableCellInColumn, findPreviousNavigableCellInRow, findPreviousNavigableCellVertically, getNavigableModel, getNextNavigableModel, isCellNavigable, isNavigationKey, processKeyBinding |
| Methods inherited from class com.jidesoft.grid.ContextSensitiveTable |
convertElementToString, getCellClassAt, getCellEditorFromManager, getCellRendererFromManager, getConverterContextAt, getDefaultCellRenderer, getEditorContextAt, invalidateCellRendererCache, isCellEditorManagerEnabled, isCellRendererManagerEnabled, resetTransferHandler, setCellEditorManagerEnabled, setCellRendererManagerEnabled, setDefaultCellRenderer |
| Methods inherited from class com.jidesoft.grid.JideTable |
addCellEditorListener, addColumn, addNotify, addRowValidator, addValidator, adjustSelectionWhenColumnMoved, alwaysCalculateCellRect, calculateAutoResizedRowHeights, calculateAutoResizedRowHeights, clearSelection, columnAdded, columnMoved, columnRemoved, configureEnclosingScrollPaneExplicitly, convertRowIndexToModel, convertRowIndexToView, createDefaultColumnsFromModel, createDefaultTableSelectionModel, createRowAutoScrollingListener, createRowHeights, createSortHeaderRenderer, editingCanceled, editingStopped, fireEditingCanceled, fireEditingStarted, fireEditingStarting, fireEditingStopped, fireEditingStopping, getAutoResizeMode, getCellEditorListeners, getClickCountToStart, getEditorAutoCompletionMode, getEditorCellRect, getGridColor, getRowHeight, getRowHeights, getRowValidator, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getTableColumnWidthKeeper, getTableHeaderToolTipText, getTableHeaderToolTipText, getTableSelectionModel, getTextComponentForEditorComponent, getToolTipText, getTransferHandler, getValidator, indexChanged, initTable, isAlwaysRequestFocusForEditor, isAutoSelectTextWhenStartsEditing, isAutoStartCellEditing, isAutoStartCellEditingKey, isBatchProcessing, isCalculateRowHeightsOnWidthChange, isCellContentVisible, isClearPropertyAtStructureChange, isClearSelectionOnTableDataChanges, isColumnAutoResizable, isColumnResizable, isColumnSelected, isEnableIgnored, isKeepRowHeights, isNestedTableHeader, isNonContiguousCellSelection, isRowAutoResizes, isRowHeightChanged, isRowResizable, isRowSelected, isScrollRowWhenRowHeightChanges, isSelectInsertedRows, isTablePrinting, isValidCellEditingKey, isVariousRowHeights, loadTableRowSettings, paintFillHeader, removeCellEditorListener, removeEditor, removeNotify, removeRowValidator, removeValidator, saveTableRowSettings, scrollRowToVisible, selectAll, setAlwaysRequestFocusForEditor, setAutoResizeMode, setAutoSelectTextWhenStartsEditing, setAutoStartCellEditing, setBatchProcessing, setCalculateRowHeightsOnWidthChange, setCellContentVisible, setClearPropertyAtStructureChange, setClearSelectionOnTableDataChanges, setClickCountToStart, setColumnAutoResizable, setColumnResizable, setColumnSelectionAllowed, setEditorAutoCompletionMode, setEnabled, setEnableIgnored, setKeepRowHeights, setNestedTableHeader, setNonContiguousCellSelection, setPreferredSize, setRowAutoResizes, setRowHeight, setRowHeight, setRowHeights, setRowResizable, setRowSelectionAllowed, setScrollRowWhenRowHeightChanges, setSelectInsertedRows, setSortTableHeaderRenderer, setTableColumnWidthKeeper, setTablePrinting, setTableSelectionModel, setVariousRowHeights, startCellEditing, validate, validateRow |
| Methods inherited from class javax.swing.JTable |
addColumnSelectionInterval, addRowSelectionInterval, columnMarginChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createScrollPaneForTable, doLayout, editCellAt, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getCellEditor, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUpdateSelectionOnSort, getValueAt, initializeLocalVars, isCellEditable, isEditing, moveColumn, paramString, print, print, print, print, print, removeColumn, removeColumnSelectionInterval, removeRowSelectionInterval, resizeAndRepaint, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionInterval, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowMargin, setRowSelectionInterval, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setTableHeader, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from interface com.jidesoft.grid.TableAdapter |
getCellSelectionEnabled, getColumnClass, getColumnCount, getColumnName, getColumnSelectionAllowed, getRowCount, getRowSelectionAllowed, getValueAt, isCellEditable, setCellSelectionEnabled, setValueAt |
PROPERTY_DOUBLE_CLICK_ENABLED
public static final String PROPERTY_DOUBLE_CLICK_ENABLED
- See Also:
- Constant Field Values
AggregateTable
public AggregateTable()
- Creates an empty AggregateTable.
AggregateTable
public AggregateTable(TableModel model)
- Creates an AggregateTable. The model could be a regular TableModel. If so, after you create the table, you need
to call aggregate() method to aggregate certain columns. You can also pass in an aggregated
AggregateTableModel. If so, you of course don't need to call aggregate() method.
- Parameters:
model - the table model.
createSortableTableModel
protected ISortableTableModel createSortableTableModel(TableModel model)
- Description copied from class:
SortableTable
- Creates a
SortableTableModel that wraps around the actual model. Subclass can override it to create
your own SortabletTableModel. For example TreeTable overrides it to create a
SortableTreeTableModel for TreeTableModel.
- Overrides:
createSortableTableModel in class SortableTable
- Parameters:
model - the actual table model.
- Returns:
- a SortableTableModel.
setModel
public void setModel(TableModel model)
- Overrides:
setModel in class SortableTable
tableChanged
public void tableChanged(TableModelEvent e)
- Description copied from class:
JideTable
- Invoked when this table's
TableModel generates a TableModelEvent. The
TableModelEvent should be constructed in the coordinate system of the model; the appropriate mapping
to the view coordinate system is performed by this JTable when it receives the event.
Application code will not use these methods explicitly, they are used internally by JTable.
- Specified by:
tableChanged in interface TableModelListener- Overrides:
tableChanged in class CellSpanTable
getAggregateTableModel
public AggregateTableModel getAggregateTableModel()
- Gets the
AggregateTableModel for this table.
- Returns:
- the
AggregateTableModel.
updateUI
public void updateUI()
- Description copied from class:
CellSpanTable
- Resets the UI property to a value from the current look and feel.
- Overrides:
updateUI in class CategorizedTable
- See Also:
JComponent.updateUI()
createCellRenderer
protected TableCellRenderer createCellRenderer()
- Creates the special cell renderer for the first column which paints +/- icon and tree line.
- Returns:
- an instance of TreeTableCellRenderer. The same instance will be used to paint the cell of all rows in
TreeTable.
createExpandMouseListener
protected MouseListener createExpandMouseListener()
- Creates the mouse listener used to handle mouse click on +/- icon.
- Returns:
- a mouse listener.
createExpandMouseInputListener
protected MouseInputListener createExpandMouseInputListener(MouseInputListener listener)
- Creates the mouse listener used to handle mouse click on +/- icon.
- Parameters:
listener - old listener
- Returns:
- a mouse listener.
handleMouseEvent
protected void handleMouseEvent(MouseEvent e)
- Handles the mouse event. It does two things. If single mouse clicks on the +/- icon will expand/collapse the
row.
- Parameters:
e - the mouse event.
getCellPopupMenuCustomizer
public AggregateTable.PopupMenuCustomizer getCellPopupMenuCustomizer()
- Gets the popup menu customizer to customize the menu when user right click on the cells on aggregated column.
- Returns:
- the popup menu customizer.
setCellPopupMenuCustomizer
public void setCellPopupMenuCustomizer(AggregateTable.PopupMenuCustomizer popupMenuCustomizer)
- Sets the popup menu customizer to customize the menu when user right click on the cells on aggregated column.
- Parameters:
popupMenuCustomizer - a new PopupMenuCustomizer.
expandAll
public void expandAll()
- Expands all the cells.
collapseAll
public void collapseAll()
- Collapses all the cells.
createDraggingColumnPropertyChangeListener
protected AggregateTable.DraggingHandler createDraggingColumnPropertyChangeListener()
- Creates the TableColumnModelListener used to handle column rearrangement.
- Returns:
- a TableColumnModelListener.
updateAggregateColumns
protected void updateAggregateColumns(TableColumn draggingColumn,
int originalColumnIndex)
getCellRenderer
public TableCellRenderer getCellRenderer(int rowIndex,
int columnIndex)
- Description copied from class:
ContextSensitiveTable
- Returns an appropriate renderer for the cell specified by this row and column. First, it will check if
defaultCellRenderer is set using
ContextSensitiveTable.getDefaultCellRenderer() method. If null, it will check is ContextSensitiveTable.isCellRendererManagerEnabled() is true. If true, it will look for the cell renderer that assigned to the
specific column. Only if the renderer is still null, it will use the EditorContext information from
ContextSensitiveTableModel and get the correct CellRedenerer from the CellRendererManager. In any case, if we
can't determine a cell renderer, we will call super.getCellRenderer(row, column) just like regular JTable.
- Overrides:
getCellRenderer in class CellSpanTable
- Parameters:
rowIndex - the row of the cell to render, where 0 is the first rowcolumnIndex - the column of the cell to render, where 0 is the first column
- Returns:
- the renderer for the column and row.
getExpandableAt
public Expandable getExpandableAt(int rowIndex,
int columnIndex)
- Specified by:
getExpandableAt in interface ExpandableProvider
getHeaderTableModel
public HeaderTableModel getHeaderTableModel()
- This is an interface for HeaderTableCellRenderer so that it can find the correct HeaderTableModel.
- Returns:
- the HeaderTableModel.
setAggregatedColumns
public void setAggregatedColumns(String[] columnNames)
- Sets the aggregated columns. Nothing is changed at this point until
aggregate() is called.
- Parameters:
columnNames - the name of the columns to be aggregated.
setAggregatedColumns
public void setAggregatedColumns(int[] columns)
- Sets the aggregated columns. Nothing is changed at this point until
aggregate() is called.
- Parameters:
columns - the index of the columns to be aggregated.
aggregate
public void aggregate(String[] columnNames)
- Aggregates the specified columns.
- Parameters:
columnNames - the name of the columns that will be aggregated.
aggregate
public void aggregate(int[] columns)
- Aggregates the specified columns.
- Parameters:
columns - the index of the columns to be aggregated.
aggregate
public void aggregate()
- Aggregates the table model. You should call
setAggregatedColumns(String[]) or setAggregatedColumns(int[]) before calling this method. Or you can combine the two calls into aggregate(String[]) or aggregate(int[]).
editCellAt
public boolean editCellAt(int row,
int column,
EventObject o)
- Overrides so that clicking in the +/- icon area will not start editing the cell.
- Overrides:
editCellAt in class CellSpanTable
- Parameters:
row - the row to be editedcolumn - the column to be editedo - the event that starts the cell editing
- Returns:
- false if for any reason the cell cannot be edited, or if the indices are invalid
isAutoAdjustGrouping
public boolean isAutoAdjustGrouping()
- Gets the grouping behavior when dragging columns.
- Returns:
- the flag that if the dragging column will make the column grouped/ungrouped.
- See Also:
setAutoAdjustGrouping(boolean)
setAutoAdjustGrouping
public void setAutoAdjustGrouping(boolean autoAdjustGrouping)
- Sets the flag that controls the grouping behavior when dragging columns.
If the flag is true,
in the scenario that column A,B are grouping while column C,D,E are not grouped, move D before C will make D
grouped.
in the scenario that column A,B are grouping while column C,D,E are not grouped, move A after B will make A
ungrouping.
If the flag is false,
in the scenario that column A,B are grouping while column C,D,E are not grouped, move D before C will keep D not
grouped.
in the scenario that column A,B are grouping while column C,D,E are not grouped, move A after B will keep A
grouping.
Before 2.6.0 release, the behavior is the same as the flag is true. However, after 2.6.0 release, the default
setting of this flag is false. So if you want to get exactly the same column dragging behavior as before release
2.6.0, please call the following code:
setAutoAdjustGrouping(true);
setAutoGrouping(true);
- Parameters:
autoAdjustGrouping - the flag that if the dragging column will change its group/ungroup behavior while
dragged to boundary
isAutoGrouping
public boolean isAutoGrouping()
- Gets the flag if we should group the column if dragging the column to the very beginning of the table when there
is no grouping.
- Returns:
- the flag if we should group the column if dragging the column to the very beginning of the table when
there is no grouping.
- See Also:
setAutoGrouping(boolean)
setAutoGrouping
public void setAutoGrouping(boolean autoGrouping)
- Sets the flag if we should group the column if dragging the column to the very beginning of the table when there
is no grouping.
This flag will take effect only when
isAutoAdjustGrouping() returns true. If that method returns false,
this behavior looks like this flag is FALSE no matter what the value actually is.
If the flag is true,
in the scenario that column A,B,C,D,E are all not grouped, move E before A will make E grouped.
If the flag is false,
in the scenario that column A,B,C,D,E are all not grouped, move E before A will keep E ungrouping.
Before 2.6.0 release, the behavior is the same as the flag is true. However, after 2.6.0 release, the default
setting of this flag is false. So if you want to get exactly the same column dragging behavior as before release
2.6.0, please call the following code:
setAutoAdjustGrouping(true);
setAutoGrouping(true);
- Parameters:
autoGrouping - the flag if we should group the column if dragging the column to the very beginning of the
table when there is no grouping.
getVersion
public String getVersion()
- Gets an optional version string.
- Returns:
- version string.
setVersion
public void setVersion(String version)
- Sets version string.
- Parameters:
version - the version of the saved layout.
isExpandIconVisible
public boolean isExpandIconVisible(Node node)
- Checks if the +/- icon should visible for the node.
- Parameters:
node - the node.
- Returns:
- true or false.