JIDE 3.5.15

com.jidesoft.pivot
Class AggregateTablePane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JScrollPane
                  extended by com.jidesoft.swing.JideScrollPane
                      extended by com.jidesoft.grid.TableScrollPane
                          extended by com.jidesoft.pivot.AggregateTablePane
All Implemented Interfaces:
TableAdapter, JideScrollPaneConstants, ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants

public class AggregateTablePane
extends TableScrollPane

A TableScrollPane which uses AggregateTable as the row header table to implement the freeze column feature on an AggregateTable.

If you have a very big 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 AggregrateTablePane instance, you can add a CachedTableModel wrapper to improve the performance.
         _aggregateTablePane.setTableModel(new CachedTableModel(_aggregateTablePane.getTableModel()));
 

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.grid.TableScrollPane
TableScrollPane.TablePosition
 
Nested classes/interfaces inherited from class javax.swing.JScrollPane
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class com.jidesoft.grid.TableScrollPane
_columnFooterTable, _columnHeaderTable, _columnSelectionAllowed, _mainTable, _nonContiguousCellSelectionAllowed, _originalFooterTableModel, _originalHeaderTableModel, _originalTableModel, _rowFooterColumnFooterTable, _rowFooterColumnHeaderTable, _rowFooterTable, _rowHeaderColumnFooterTable, _rowHeaderColumnHeaderTable, _rowHeaderTable, _rowSelectionAllowed, AUTO_UPDATE_FOOTER_TABLE_COLUMNS, COLUMNFOOTER_TABLE, COLUMNHEADER_TABLE, MAIN_TABLE, PROPERTY_TABLE_MODEL, ROWFOOTER_COLUMNFOOTER_TABLE, ROWFOOTER_COLUMNHEADER_TABLE, ROWFOOTER_TABLE, ROWHEADER_COLUMNFOOTER_TABLE, ROWHEADER_COLUMNHEADER_TABLE, ROWHEADER_TABLE, TABLE_KEY, TABLESCROLLPANE_KEY
 
Fields inherited from class com.jidesoft.swing.JideScrollPane
_columnFooter, _hLeft, _hRight, _rowFooter, _subColumnHeader, _subUpperLeft, _subUpperRight, _vBottom, _vTop, CLIENT_PROPERTY_MASTER_VIEWPORT, CLIENT_PROPERTY_SLAVE_VIEWPORT, PROPERTY_COLUMN_FOOTERS_HEIGHT_UNIFIED, PROPERTY_COLUMN_HEADERS_HEIGHT_UNIFIED, PROPERTY_FLAT_LAYOUT, PROPERTY_HORIZONTAL_SCROLL_BAR_COVERS_WHOLE_WIDTH, PROPERTY_KEEP_CORNER_VISIBLE, PROPERTY_VERTICAL_SCROLL_BAR_COVERS_WHOLE_HEIGHT
 
Fields inherited from class javax.swing.JScrollPane
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.jidesoft.swing.JideScrollPaneConstants
COLUMN_FOOTER, HORIZONTAL_LEADING, HORIZONTAL_LEFT, HORIZONTAL_RIGHT, HORIZONTAL_TRAILING, ROW_FOOTER, SUB_COLUMN_HEADER, SUB_UPPER_LEFT, SUB_UPPER_RIGHT, VERTICAL_BOTTOM, VERTICAL_TOP
 
Fields inherited from interface javax.swing.ScrollPaneConstants
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
AggregateTablePane(MultiTableModel model)
           
AggregateTablePane(TableModel model, int[] column)
           
AggregateTablePane(TableModel model, String[] columnNames)
           
 
Method Summary
protected  TableModel createSortableTableModel(MultiTableModel tableModel, boolean sortable)
          Creates a SortableAggregateTableModel or regular SortableTableModel for the MultiTableModel if isSortable() is true.
protected  JTable createTable(TableModel model, boolean sortable, int type)
          Creates the table.
 AggregateTableModel getAggregateTableModel()
          Gets the underlying AggregateTableModel.
 void setTableModel(MultiTableModel tableModel)
          Sets the original table model and recreates all child tables.
 
Methods inherited from class com.jidesoft.grid.TableScrollPane
changeSelection, clearSelection, convertColumnIndexToModel, convertColumnIndexToView, createTable, createTable, createTable, customizeTable, getAllChildTables, getCellEditor, getCellSelectionEnabled, getColumnClass, getColumnCount, getColumnFooterTable, getColumnHeaderTable, getColumnName, getColumnSelectionAllowed, getEditingTable, getFooterTableModel, getMainTable, getModel, getPrintable, getRowCount, getRowFooterColumnFooterTable, getRowFooterColumnHeaderTable, getRowFooterTable, getRowHeaderColumnFooterTable, getRowHeaderColumnHeaderTable, getRowHeaderTable, getRowSelectionAllowed, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getTableAtCell, getTableAtColumn, getTableAtRow, getTableCustomizer, getTableModel, getValueAt, isAllowMultiSelectionInDifferentTable, isCellEditable, isCellSelected, isColumnSelected, isEditing, isNonContiguousCellSelectionAllowed, isRowSelected, isSortable, print, print, print, print, print, refreshColumns, removeExtraColumns, resizeRowHeaderTableToFit, resynchronizeTablesSelection, setAllowMultiSelectionInDifferentTable, setCellSelectionEnabled, setColumnSelectionAllowed, setFooterTableModel, setHeaderTableModel, setNonContiguousCellSelectionAllowed, setRowSelectionAllowed, setSortable, setTableCustomizer, setValueAt
 
Methods inherited from class com.jidesoft.swing.JideScrollPane
getColumnFooter, getCorner, getRowFooter, getScrollBarCorner, getSubColumnHeader, isColumnFootersHeightUnified, isColumnHeadersHeightUnified, isFlatLayout, isHorizontalScrollBarCoversWholeWidth, isKeepCornerVisible, isVerticalScrollBarCoversWholeHeight, setColumnFooter, setColumnFootersHeightUnified, setColumnFooterView, setColumnHeader, setColumnHeadersHeightUnified, setCorner, setFlatLayout, setHorizontalScrollBarCoversWholeWidth, setKeepCornerVisible, setLayout, setRowFooter, setRowFooterView, setRowHeader, setScrollBarCorner, setSubColumnHeader, setSubColumnHeaderView, setVerticalScrollBarCoversWholeHeight, setViewport, updateUI
 
Methods inherited from class javax.swing.JScrollPane
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeaderView, setComponentOrientation, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewportBorder, setViewportView, setWheelScrollingEnabled
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, 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, doLayout, 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, 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, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AggregateTablePane

public AggregateTablePane(MultiTableModel model)

AggregateTablePane

public AggregateTablePane(TableModel model,
                          String[] columnNames)

AggregateTablePane

public AggregateTablePane(TableModel model,
                          int[] column)
Method Detail

setTableModel

public void setTableModel(MultiTableModel tableModel)
Sets the original table model and recreates all child tables.

Overrides:
setTableModel in class TableScrollPane
Parameters:
tableModel - the new MultiTableModel

getAggregateTableModel

public AggregateTableModel getAggregateTableModel()
Gets the underlying AggregateTableModel.

Returns:
the AggregateTableModel.

createTable

protected JTable createTable(TableModel model,
                             boolean sortable,
                             int type)
Description copied from class: TableScrollPane
Creates the table. Please consider override this method if you want to have your other tables implementing more than just SortableTable. However, if you just want to configure the table it creates, please consider override TableScrollPane.getTableCustomizer().

The default implementation of this method is like below:

 return createTable(model, sortable);
 

As you can see at that method, it will return a SortableTable by default. If you want to use another table such as TreeTable, you can override this method and use parameters type and table Index to determine it is row header table, then return a TreeTable instead.

Overrides:
createTable in class TableScrollPane
Parameters:
model - the table model
sortable - true or false.
type - the valid values are MultiTableModel.REGULAR_COLUMN, MultiTableModel.HEADER_COLUMN and MultiTableModel.FOOTER_COLUMN
Returns:
a table.

createSortableTableModel

protected TableModel createSortableTableModel(MultiTableModel tableModel,
                                              boolean sortable)
Creates a SortableAggregateTableModel or regular SortableTableModel for the MultiTableModel if isSortable() is true. Otherwise, tableModel itself will be returned.

Overrides:
createSortableTableModel in class TableScrollPane
Parameters:
tableModel - the MultiTableModel
sortable - true or false. If true, the tableModel should be wrapped into a SortableAggregateTableModel or regular SortableTableModel.
Returns:
a SortableAggregateTableModel or regular SortableTableModel for the MultiTableModel if isSortable() is true.

JIDE 3.5.15