public class AggregateTable extends SortableTable implements ExpandableProvider, ValueStringAdjustProvider, GroupHeaderTableProvider
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()));
Modifier and Type | Class and Description |
---|---|
protected class |
AggregateTable.DelegateExpandMouseInputListener |
class |
AggregateTable.DraggingHandler |
protected class |
AggregateTable.ExpandMouseListener |
static interface |
AggregateTable.PopupMenuCustomizer
Popup menu customizer interface without row index and column index as input.
|
static interface |
AggregateTable.TablePopupMenuCustomizer
Popup menu customizer interface with row index and column index as input.
|
CellSpanTable.DelegateAction
JideTable.NonContiguousTransferHandler, JideTable.TextComponentProvider
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTY_DOUBLE_CLICK_ENABLED |
MULTICOLUMN_SORTABLE_PROPERTY, PROPERTY_SHOW_SORT_ORDER_NUMBER, SORTABLE_PROPERTY
DEFAULT_ASCENDING_ICON, DEFAULT_DESCENDING_ICON, PROPERTY_EXPAND_ICON_VISIBLE
AUTO_CELL_MERGE_COLUMNS, AUTO_CELL_MERGE_COLUMNS_LIMITED, AUTO_CELL_MERGE_OFF, AUTO_CELL_MERGE_ROWS, AUTO_CELL_MERGE_ROWS_LIMITED, PROPERTY_AUTO_CONVERT_CELL_SPAN, PROPERTY_PAINT_CELL_SPAN_AS_SELECTED
_cellStyleList, PROPERTY_FILLS_SELECTION, PROPERTY_FILLS_VIEWPORT_WITH_STRIPE
_batchProcessing, _cellChangeEvent, _clickCountToStart, _columnAutoResizer, _columnResizer, _headerDraggingMouseMotionListener, _rolloverCellEditor, _rolloverCellEditorListener, _rolloverColumn, _rolloverEditorComp, _rolloverEditorRemover, _rolloverRow, _rowHeights, _rowResizer, ACTION_NAME_CANCEL_EDITING, AUTO_RESIZE_ALL_COLUMNS_FILL, AUTO_RESIZE_FILL, AUTO_RESIZE_LAST_COLUMN_FILL, AUTO_RESIZE_NEXT_COLUMN_FILL, AUTO_RESIZE_SUBSEQUENT_COLUMNS_FILL, CLIENT_PROPERTY_LAZY_CALCULATE_ROW_HEIGHT, 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_FILLS_BOTTOM, PROPERTY_FILLS_GRIDS, PROPERTY_FILLS_RIGHT, PROPERTY_LOAD_SELECTION_ON_TABLE_DATA_CHANGES, PROPERTY_NON_CONTIGUOUS_CELL_SELECTION, PROPERTY_ROW_AUTO_RESIZES, PROPERTY_SCROLL_ROW_WHEN_ROW_HEIGHT_CHANGES, PROPERTY_TABLE_SELECTION_MODEL, ROW_AUTO_RESIZES_PROPERTY
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
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
AggregateTable()
Creates an empty AggregateTable.
|
AggregateTable(TableModel model)
Creates an AggregateTable.
|
Modifier and Type | Method and Description |
---|---|
void |
aggregate()
Aggregates the table model.
|
void |
aggregate(int[] columns)
Aggregates the specified columns.
|
void |
aggregate(String[] columnNames)
Aggregates the specified columns.
|
void |
collapse(int rowIndex,
int columnIndex)
Collapses the cell.
|
void |
collapseAll()
Collapses all the cells.
|
protected TableCellRenderer |
createCellRenderer()
Creates the special cell renderer for the first column which paints +/- icon and tree line.
|
protected AggregateTable.DraggingHandler |
createDraggingColumnPropertyChangeListener()
Creates the TableColumnModelListener used to handle column rearrangement.
|
protected MouseInputListener |
createExpandMouseInputListener(MouseInputListener listener)
Creates the mouse listener used to handle mouse click on +/- icon.
|
protected MouseListener |
createExpandMouseListener()
Creates the mouse listener used to handle mouse click on +/- icon.
|
protected ISortableTableModel |
createSortableTableModel(TableModel model)
Creates a
SortableTableModel that wraps around the actual model. |
boolean |
editCellAt(int row,
int column,
EventObject o)
Overrides so that clicking in the +/- icon area will not start editing the cell.
|
void |
expand(int rowIndex,
int columnIndex)
Expands the cell.
|
void |
expandAll()
Expands all the cells.
|
AggregateTableModel |
getAggregateTableModel()
Gets the
AggregateTableModel for this table. |
AggregateTable.PopupMenuCustomizer |
getCellPopupMenuCustomizer()
Gets the popup menu customizer to customize the menu when user right click on the cells on aggregated column.
|
TableCellRenderer |
getCellRenderer(int rowIndex,
int columnIndex)
Returns an appropriate renderer for the cell specified by this row and column.
|
Expandable |
getExpandableAt(int rowIndex,
int columnIndex) |
HeaderTableModel |
getHeaderTableModel()
This is an interface for HeaderTableCellRenderer so that it can find the correct HeaderTableModel.
|
String |
getResourceString(String key)
Gets the resource string used in AggregateTable.
|
String |
getTableHeaderToolTipText(int modelIndex)
Gets the TableHeader's tooltip for a particular model column index
|
String |
getTableHeaderToolTipText(MouseEvent event)
Gets the TableHeader's tooltip at the location of mouse event.
|
String |
getValueAtInString(int rowIndex,
int columnIndex,
ValueConverter converter)
Gets the string value with summary name or the total/grand total.
|
String |
getVersion()
Gets an optional version string.
|
protected void |
handleMouseEvent(MouseEvent e)
Handles the mouse event.
|
boolean |
isAutoAdjustGrouping()
Gets the grouping behavior when dragging columns.
|
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.
|
boolean |
isExpandIconVisible(Node node)
Checks if the +/- icon should visible for the node.
|
boolean |
isShowContextMenu()
Gets the flag indicating if context menu should be displayed on right click.
|
boolean |
isUseNativeRenderer()
Gets the flag indicating if the AggregateTable should use native renderer to paint its aggregated cells.
|
boolean |
needAdjustCellValueString(int rowIndex,
int columnIndex)
Only adjust the cell value string on aggregated columns.
|
void |
prepareBeforeGroup() |
void |
setAggregatedColumns(int[] columns)
Sets the aggregated columns.
|
void |
setAggregatedColumns(String[] columnNames)
Sets the aggregated columns.
|
void |
setAutoAdjustGrouping(boolean autoAdjustGrouping)
Sets the flag that controls the grouping behavior when dragging columns.
|
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.
|
void |
setCellPopupMenuCustomizer(AggregateTable.PopupMenuCustomizer popupMenuCustomizer)
Sets the popup menu customizer to customize the menu when user right click on the cells on aggregated column.
|
void |
setColumnVisible(String fieldName,
boolean visible)
Sets the visibility of the column.
|
void |
setModel(TableModel model)
Sets the data model for this table to
newModel and registers with it for listener notifications from
the new data model. |
void |
setShowContextMenu(boolean showContextMenu)
Sets the flag indicating if context menu should be displayed on right click.
|
void |
setUseNativeRenderer(boolean useNativeRenderer)
Sets the flag indicating if the AggregateTable should use native renderer to paint its aggregated cells.
|
void |
setVersion(String version)
Sets version string.
|
void |
tableChanged(TableModelEvent e)
Invoked when this table's
TableModel generates a TableModelEvent . |
protected void |
tableStructureChanged(TableModelEvent e) |
protected void |
updateAggregateColumns(TableColumn draggingColumn,
int originalColumnIndex) |
void |
updateUI() |
createDefaultTableHeader, createSortableTableHeaderMouseListener, createSortIcon, getActualRowAt, getSortableHeaderMouseListener, getSortableTableModel, getSortArrowForeground, getSortedRowAt, getSortOrderForeground, isAutoResort, isEnsureSelectedRowVisibleOnTogglingSort, isMultiColumnSortable, isOptimized, isPreserveSelectionsAfterSorting, isReusable, isShowSortOrderNumber, isSortable, isSortingEnabled, resort, setAutoResort, setEnsureSelectedRowVisibleOnTogglingSort, setMultiColumnSortable, setOptimized, setPreserveSelectionsAfterSorting, setShowSortOrderNumber, setSortable, setSortArrowForeground, setSortingEnabled, setSortOrderForeground, sortChanged, sortChanging, sortColumn, sortColumn, sortColumn, sortColumn, sortColumn, sortColumn, unsort
getAscendingIcon, getCategoryCollapsedIcon, getCategoryExpandedIcon, getCollapsedIcon, getCollapsedIcon, getDescendingIcon, getDisabledBackground, getDisabledForeground, getExpandedIcon, getExpandedIcon, getMarginBackground, isExpandIconVisible, isPaintMarginBackground, isUseLnfDefaultSortIcon, isUseTableRendererForCategoryRow, setAscendingIcon, setCategoryCollapsedIcon, setCategoryExpandedIcon, setCollapsedIcon, setDescendingIcon, setDisabledBackground, setDisabledForeground, setExpandedIcon, setExpandIconVisible, setMarginBackground, setPaintMarginBackground, setUseLnfDefaultSortIcon, setUseTableRendererForCategoryRow
binarySearch, calculateRowHeight, calculateRowHeight, calculateRowHeights, columnAdded, columnAtPoint, columnMoved, columnRemoved, convertModelCellSpanToView, convertViewCellSpanToModel, createCellSpanCache, createDelegateAction, getActualRowHeight, getActualUIClassID, getAutoCellMerge, getCache, getCacheEmpty, getCellEditor, getCellRect, getCellSpanAt, getCellSpanAt, getCellSpanFromAutoCellMerge, getCellSpanFromSpanModel, getDirtyRegion, getScrollableUnitIncrement, getSpanModel, getValueAt, invalidateCellSpanCache, isAutoConvertCellSpan, isCellFocused, isCellSelected, isCellSpanCacheEnabled, isCellSpanOn, isKeepColumnAtPoint, isKeepRowAtPoint, isPaintCellSpanAsSelected, muteDefaultKeyStroke, originalColumnAtPoint, originalGetCellRect, originalRowAtPoint, prepareEditor, replaceAction, replaceAction, restoreAction, restoreAction, rolloverCellAt, rowAtPoint, setAutoCellMerge, setAutoConvertCellSpan, setCellSpanCacheEnabled, setKeepColumnAtPoint, setKeepRowAtPoint, setPaintCellSpanAsSelected, shouldCellBePaintedAsFocused, shouldCellBePaintedAsSelected, valueChanged, verifyCellSpan, verifyCellSpan
addCellStyleCustomizer, clearCellStyleCustomizers, collectCellStyles, configureEditorComponent, configureRendererComponent, customizeEditorComponent, customizeRendererComponent, getCellStyleAt, getCellStyleCustomizers, getCellStyleProvider, getCellStyles, getFocusCellStyle, getNextStyleModel, getStyleModel, getTableStyleProvider, isFillsSelection, isFillsViewportWithStripe, mergeCellStyle, mergeCellStyles, needPaintStripedBackground, paintCellOverlay, paintCellUnderlay, paintComponent, prepareRenderer, releaseRendererComponent, removeCellStyleCustomizer, setCellStyleProvider, setFillsSelection, setFillsViewportWithStripe, setFocusCellStyle, setTableStyleProvider
changeSelection, findNearestNavigableCellInColumn, findNearestNavigableCellInRow, findNextNavigableCell, findNextNavigableCellInColumn, findNextNavigableCellInRow, findNextNavigableCellVertically, findPreviousNavigableCell, findPreviousNavigableCellInColumn, findPreviousNavigableCellInRow, findPreviousNavigableCellVertically, getNavigableModel, getNextNavigableModel, isCellNavigable, isNavigationKey, processKeyBinding
convertElementToString, createDefaultTransferHandler, getCellClassAt, getCellEditorFromManager, getCellRendererFromManager, getConverterContextAt, getDefaultCellRenderer, getEditorContextAt, invalidateCellRendererCache, isCellEditorManagerEnabled, isCellRendererManagerEnabled, setCellEditorManagerEnabled, setCellRendererManagerEnabled, setDefaultCellRenderer
addCellEditorListener, addColumn, addColumnSelectionInterval, addHiddenRow, addNotify, addRowSelectionInterval, addRowValidator, addUndo, addUndoableEditListener, addValidator, adjustSelectionWhenColumnMoved, alwaysCalculateCellRect, calculateAutoResizedRowHeights, calculateAutoResizedRowHeights, clearHiddenRows, clearSelection, clearSelectionPermanently, columnSelectionChanged, configureEnclosingScrollPaneExplicitly, convertRowIndexToModel, convertRowIndexToView, createCellAutoCompletion, createDefaultColumnsFromModel, createDefaultSelectionModel, createDefaultTableSelectionModel, createRowAutoScrollingListener, createRowHeights, createSortHeaderRenderer, editingCanceled, editingStopped, fireEditingCanceled, fireEditingStarted, fireEditingStarting, fireEditingStopped, fireEditingStopping, getCellEditorListeners, getClickCountToStart, getDefaultRenderer, getEditorAutoCompletionMode, getEditorAutoCompletionMode, getEditorCellRect, getGridColor, getGridColorProvider, getHiddenRows, getRolloverCellEditor, getRolloverColumn, getRolloverRow, getRowHeight, getRowHeights, getRowValidator, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getTableColumnWidthKeeper, getTableSelectionModel, getTextComponentForEditorComponent, getToolTipText, getUndoManager, getValidator, getVerticalGridColor, indexChanged, initTable, isAdjustEditorLocationOnModelChanged, isAlwaysRequestFocusForEditor, isAutoResizeFillMode, isAutoSelectTextWhenStartsEditing, isAutoStartCellEditing, isAutoStartCellEditingKey, isBatchProcessing, isCalculateRowHeightsOnWidthChange, isCellContentVisible, isClearPropertyAtStructureChange, isClearSelectionOnTableDataChanges, isColumnAutoResizable, isColumnResizable, isColumnSelected, isEnableIgnored, isFillBottom, isFillGrids, isFillRight, isFillsBottom, isFillsGrids, isFillsGridsBottom, isFillsGridsRight, isFillsRight, isKeepRowHeights, isLoadSelectionOnTableDataChanged, isNestedTableHeader, isNonContiguousCellSelection, isRollover, isRowAutoResizes, isRowHeightChanged, isRowHidden, isRowResizable, isRowSelected, isScrollRowWhenRowHeightChanges, isSelectInsertedRows, isTablePrinting, isValidCellEditingKey, isVariousRowHeights, loadTableRowSettings, paintFillHeader, removeCellEditorListener, removeColumn, removeColumnSelectionInterval, removeEditor, removeHiddenRow, removeNotify, removeRolloverEditor, removeRowSelectionInterval, removeRowValidator, removeUndoableEditListener, removeValidator, resetTransferHandler, saveTableRowSettings, scrollRowToVisible, selectAll, setAdjustEditorLocationOnModelChanged, setAlwaysRequestFocusForEditor, setAutoResizeMode, setAutoSelectTextWhenStartsEditing, setAutoStartCellEditing, setBatchProcessing, setCalculateRowHeightsOnWidthChange, setCellContentVisible, setClearPropertyAtStructureChange, setClearSelectionOnTableDataChanges, setClickCountToStart, setColumnAutoResizable, setColumnResizable, setColumnSelectionAllowed, setColumnSelectionInterval, setEditorAutoCompletionMode, setEnabled, setEnableIgnored, setFillBottom, setFillGrids, setFillRight, setFillsBottom, setFillsGrids, setFillsRight, setGridColorProvider, setHiddenRows, setKeepRowHeights, setLoadSelectionOnTableDataChanged, setNestedTableHeader, setNonContiguousCellSelection, setPreferredSize, setRowAutoResizes, setRowHeight, setRowHeight, setRowHeights, setRowResizable, setRowSelectionAllowed, setRowSelectionInterval, setScrollRowWhenRowHeightChanges, setSelectInsertedRows, setSortTableHeaderRenderer, setTableColumnWidthKeeper, setTableHeader, setTablePrinting, setTableSelectionModel, setVariousRowHeights, startCellEditing, validate, validateRow
columnMarginChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createScrollPaneForTable, doLayout, editCellAt, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoCreateRowSorter, getAutoResizeMode, getCellEditor, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDragEnabled, getDropLocation, getDropMode, getEditingColumn, getEditingRow, getEditorComponent, getFillsViewportHeight, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getPrintable, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getRowSorter, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getSurrendersFocusOnKeystroke, getTableHeader, getUI, getUIClassID, getUpdateSelectionOnSort, initializeLocalVars, isCellEditable, isEditing, moveColumn, paramString, print, print, print, print, print, resizeAndRepaint, setAutoCreateColumnsFromModel, setAutoCreateRowSorter, setCellEditor, setCellSelectionEnabled, setColumnModel, setDefaultEditor, setDefaultRenderer, setDragEnabled, setDropMode, setEditingColumn, setEditingRow, setFillsViewportHeight, setGridColor, setIntercellSpacing, setPreferredScrollableViewportSize, setRowMargin, setRowSorter, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setSurrendersFocusOnKeystroke, setUI, setUpdateSelectionOnSort, setValueAt, sizeColumnsToFit, sizeColumnsToFit, sorterChanged, unconfigureEnclosingScrollPane
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, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
convertColumnIndexToModel, convertColumnIndexToView, getCellSelectionEnabled, getColumnClass, getColumnCount, getColumnName, getColumnSelectionAllowed, getModel, getRowCount, getRowSelectionAllowed, isCellEditable, setCellSelectionEnabled, setValueAt
public static final String PROPERTY_DOUBLE_CLICK_ENABLED
public AggregateTable()
public AggregateTable(TableModel model)
AggregateTableModel
. If so, you of course don't need to call aggregate() method.model
- the table model.protected ISortableTableModel createSortableTableModel(TableModel model)
SortableTable
SortableTableModel
that wraps around the actual model. Subclass can override it to create
your own SortableTableModel
. For example TreeTable overrides it to create a
SortableTreeTableModel
for TreeTableModel
.createSortableTableModel
in class SortableTable
model
- the actual table model.public void setModel(TableModel model)
TableAdapter
newModel
and registers with it for listener notifications from
the new data model.setModel
in interface TableAdapter
setModel
in class SortableTable
model
- the new data source for this tableTableAdapter.getModel()
public void tableChanged(TableModelEvent e)
JideTable
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
.tableChanged
in interface TableModelListener
tableChanged
in class CellSpanTable
protected void tableStructureChanged(TableModelEvent e)
tableStructureChanged
in class JideTable
public AggregateTableModel getAggregateTableModel()
AggregateTableModel
for this table.AggregateTableModel
.public void updateUI()
updateUI
in class CategorizedTable
public String getTableHeaderToolTipText(int modelIndex)
getTableHeaderToolTipText
in class JideTable
modelIndex
- the model column index.protected TableCellRenderer createCellRenderer()
protected MouseListener createExpandMouseListener()
createExpandMouseInputListener(javax.swing.event.MouseInputListener)
instead.createExpandMouseInputListener(javax.swing.event.MouseInputListener)
public boolean isShowContextMenu()
setShowContextMenu(boolean)
public void setShowContextMenu(boolean showContextMenu)
showContextMenu
- the flagpublic boolean isUseNativeRenderer()
public void setUseNativeRenderer(boolean useNativeRenderer)
useNativeRenderer
- the flagprotected MouseInputListener createExpandMouseInputListener(MouseInputListener listener)
createExpandMouseListener()
instead.listener
- old listenercreateExpandMouseListener()
protected void handleMouseEvent(MouseEvent e)
e
- the mouse event.public AggregateTable.PopupMenuCustomizer getCellPopupMenuCustomizer()
public void setCellPopupMenuCustomizer(AggregateTable.PopupMenuCustomizer popupMenuCustomizer)
popupMenuCustomizer
- a new PopupMenuCustomizer.public void expand(int rowIndex, int columnIndex)
rowIndex
- the row index of the cellcolumnIndex
- the column index of the cellpublic void collapse(int rowIndex, int columnIndex)
rowIndex
- the row index of the cellcolumnIndex
- the column index of the cellpublic void expandAll()
public void collapseAll()
protected AggregateTable.DraggingHandler createDraggingColumnPropertyChangeListener()
protected void updateAggregateColumns(TableColumn draggingColumn, int originalColumnIndex)
public TableCellRenderer getCellRenderer(int rowIndex, int columnIndex)
ContextSensitiveTable
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.getCellRenderer
in class CellSpanTable
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 columnpublic Expandable getExpandableAt(int rowIndex, int columnIndex)
getExpandableAt
in interface ExpandableProvider
public HeaderTableModel getHeaderTableModel()
public void setAggregatedColumns(String[] columnNames)
aggregate()
is called.columnNames
- the name of the columns to be aggregated.public void setAggregatedColumns(int[] columns)
aggregate()
is called.columns
- the index of the columns to be aggregated.public void aggregate(String[] columnNames)
columnNames
- the name of the columns that will be aggregated.public void aggregate(int[] columns)
columns
- the index of the columns to be aggregated.public void aggregate()
setAggregatedColumns(String[])
or setAggregatedColumns(int[])
before calling this method. Or you can combine the two calls into aggregate(String[])
or aggregate(int[])
.public boolean editCellAt(int row, int column, EventObject o)
editCellAt
in class CellSpanTable
row
- the row to be editedcolumn
- the column to be editedo
- the event that starts the cell editingpublic boolean isAutoAdjustGrouping()
setAutoAdjustGrouping(boolean)
public void setAutoAdjustGrouping(boolean autoAdjustGrouping)
setAutoAdjustGrouping(true);
setAutoGrouping(true);
autoAdjustGrouping
- the flag that if the dragging column will change its group/ungroup behavior while
dragged to boundarypublic boolean isAutoGrouping()
setAutoGrouping(boolean)
public void setAutoGrouping(boolean autoGrouping)
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);
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.public String getVersion()
public void setVersion(String version)
version
- the version of the saved layout.public boolean isExpandIconVisible(Node node)
node
- the node.public String getResourceString(String key)
key
- the resource keypublic String getValueAtInString(int rowIndex, int columnIndex, ValueConverter converter)
getValueAtInString
in interface ValueStringAdjustProvider
rowIndex
- the row index of the cellcolumnIndex
- the column index of the cellconverter
- the cell value converter if applicable. null if you are not invoking this method for exporting
to excel purpose.public boolean needAdjustCellValueString(int rowIndex, int columnIndex)
needAdjustCellValueString
in interface ValueStringAdjustProvider
rowIndex
- the row indexcolumnIndex
- the column indexpublic void setColumnVisible(String fieldName, boolean visible)
fieldName
- the pivot field namevisible
- the visibility of this columnpublic String getTableHeaderToolTipText(MouseEvent event)
JideTable
getTableHeaderToolTipText
in class JideTable
event
- the mouse event.public void prepareBeforeGroup()
prepareBeforeGroup
in interface GroupHeaderTableProvider