JIDE 2.9.5

com.jidesoft.grid
Class TableSplitPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.swing.JideSplitPane
                      extended by com.jidesoft.grid.TableSplitPane
All Implemented Interfaces:
ComponentListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class TableSplitPane
extends JideSplitPane

TableSplitPane displays a MultiTableModel in several separate tables in a JideSplitPane. However those tables are synchronized. You can use tab or left key to navigate to all tables just like they are in the same table.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.swing.JideSplitPane
JideSplitPane.AccessibleJideSplitPane
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
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
protected  MultiTableModel _originalFooterTableModel
           
protected  MultiTableModel _originalTableModel
           
protected  TableScrollPane[] _tableScrollPanes
           
static String TABLE_INDEX
           
static String TABLESPLITPANE_KEY
           
 
Fields inherited from class com.jidesoft.swing.JideSplitPane
_windowDeactivatedListener, CONTINUOUS_LAYOUT_PROPERTY, DIVIDER_SIZE_PROPERTY, GRIPPER_PROPERTY, HORIZONTAL_SPLIT, NON_CONTINUOUS_DIVIDER, ONE_TOUCH_EXPANDABLE_PROPERTY, ORIENTATION_PROPERTY, PROPERTY_DIVIDER_LOCATION, PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED, PROPORTIONAL_LAYOUT_PROPERTY, PROPORTIONS_PROPERTY, VERTICAL_SPLIT
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TableSplitPane()
           
TableSplitPane(MultiTableModel tableModel)
          Creates a TableSplitPane.
TableSplitPane(MultiTableModel tableModel, MultiTableModel footerTableModel)
          Creates a TableSplitPane with footer table.
TableSplitPane(MultiTableModel tableModel, MultiTableModel footerTableModel, boolean sortable)
          Creates a TableSplitPane with footer table.
 
Method Summary
protected  MultiTableModel createSortableTableModel(MultiTableModel tableModel, boolean sortable)
          Creates a SortableTableModel or SortableTreeTableModel for the MultiTableModel if isSortable() is true.
protected  TableScrollPane createTableScrollPane(MultiTableModel tableModel, MultiTableModel footerTableModel, int tableIndex, boolean sortable)
          Creates the TableScrollPane used in each pane of the TableSplitPane.
 MultiTableModel getOriginalFooterTableModel()
          Gets the original footer table model.
 MultiTableModel getOriginalTableModel()
          Gets the original table model.
 TableCustomizer getTableCustomizer()
          Gets the table customizer.
 TableScrollPane[] getTableScrollPanes()
          Gets the array of TableScrollPane.
 void setTableModels(MultiTableModel tableModel, MultiTableModel footerTableModel, boolean sortable)
          Sets the original table models.
 
Methods inherited from class com.jidesoft.swing.JideSplitPane
addExtraDividers, addPane, addProportion, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, createSplitPaneDivider, doLayout, dragDividerTo, finishDraggingTo, getAccessibleContext, getDividerAt, getDividerLocation, getDividerLocations, getDividerSize, getDividerStepSize, getLeftOneTouchButtonImageIcon, getNextDividerLocation, getOrientation, getPaneAt, getPaneCount, getPreviousDividerLocation, getProportions, getRightOneTouchButtonImageIcon, indexOf, indexOfDivider, indexOfPane, insertPane, insertPane, isContinuousLayout, isDragResizable, isHeavyweightComponentEnabled, isInitiallyEven, isOneTouchExpandable, isProportionalLayout, isShowGripper, isValidateRoot, removeExtraDividers, removePane, removePane, removeProportion, resetToPreferredSizes, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerLocations, setDividerSize, setDividerStepSize, setDividersVisible, setDragResizable, setHeavyweightComponentEnabled, setInitiallyEven, setLeftOneTouchButtonImageIcon, setOneTouchExpandable, setOrientation, setPaneAt, setPaneAt, setProportionalLayout, setProportions, setRightOneTouchButtonImageIcon, setShowGripper, startDragging, updateUI
 
Methods inherited from class javax.swing.JPanel
getUI, getUIClassID, paramString, setUI
 
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, 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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_originalTableModel

protected MultiTableModel _originalTableModel

_originalFooterTableModel

protected MultiTableModel _originalFooterTableModel

_tableScrollPanes

protected TableScrollPane[] _tableScrollPanes

TABLE_INDEX

public static final String TABLE_INDEX
See Also:
Constant Field Values

TABLESPLITPANE_KEY

public static final String TABLESPLITPANE_KEY
See Also:
Constant Field Values
Constructor Detail

TableSplitPane

public TableSplitPane()

TableSplitPane

public TableSplitPane(MultiTableModel tableModel)
Creates a TableSplitPane. The tables will not be sortable.

Parameters:
tableModel - the MultiTableModel. This is the main table model that will be used to create upto three tables in TableSplitPane.

TableSplitPane

public TableSplitPane(MultiTableModel tableModel,
                      MultiTableModel footerTableModel)
Creates a TableSplitPane with footer table. The tables will not be sortable.

Parameters:
tableModel - the MultiTableModel. This is the main table model that will be used to create upto three tables in TableSplitPane.
footerTableModel - the footer table model. It will be used to create a footer table below the main table. It must have the same column count as the MultiTableModel's non-header and non-footer column count.

TableSplitPane

public TableSplitPane(MultiTableModel tableModel,
                      MultiTableModel footerTableModel,
                      boolean sortable)
Creates a TableSplitPane with footer table. You can specify if the tables are sortable.

Parameters:
tableModel - the MultiTableModel. This is the main table model that will be used to create upto three tables in TableSplitPane.
footerTableModel - the footer table model. It will be used to create a footer table below the main table. It must have the same column count as the MultiTableModel's non-header and non-footer column count.
sortable - if the tables will be sortable.
Method Detail

createSortableTableModel

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

See below for the default code.

 TableModel actualTableModel;
 if (tableModel instanceof TreeTableModel && sortable) {
     actualTableModel = new SortableTreeTableModel(tableModel);
 }
 else if (!(tableModel instanceof ISortableTableModel) && sortable) {
     actualTableModel = new SortableTableModel(tableModel);
 }
 else {
     actualTableModel = tableModel;
 }
 return actualTableModel;
 

Parameters:
tableModel - the MultiTableModel
sortable - true or false. If true, the tableModel should be wrapped into a SortableTableModel or SortableTreeTableModel.
Returns:
a SortableTableModel or SortableTreeTableModel for the MultiTableModel if isSortable() is true.

setTableModels

public void setTableModels(MultiTableModel tableModel,
                           MultiTableModel footerTableModel,
                           boolean sortable)
Sets the original table models.

Parameters:
tableModel - the main table model
footerTableModel - the footer table model. If you don't have any footer, you can pass null.
sortable - if the table need to be sorted

getOriginalTableModel

public MultiTableModel getOriginalTableModel()
Gets the original table model.

Returns:
the original table model.

getOriginalFooterTableModel

public MultiTableModel getOriginalFooterTableModel()
Gets the original footer table model.

Returns:
the original footer table model.

createTableScrollPane

protected TableScrollPane createTableScrollPane(MultiTableModel tableModel,
                                                MultiTableModel footerTableModel,
                                                int tableIndex,
                                                boolean sortable)
Creates the TableScrollPane used in each pane of the TableSplitPane.

Parameters:
tableModel - the main table model
footerTableModel - the footer table model
tableIndex - the table index
sortable - if the tables need to be sorted
Returns:
the TableScrollPane.

getTableScrollPanes

public TableScrollPane[] getTableScrollPanes()
Gets the array of TableScrollPane.

Returns:
the array of TableScrollPane.

getTableCustomizer

public TableCustomizer getTableCustomizer()
Gets the table customizer. It will use when create the tables used by this TableSplitPane.

Returns:
the table customizer.

JIDE 2.9.5