|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.swing.JideSplitPane com.jidesoft.grid.TableSplitPane
public class TableSplitPane
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.
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 |
_originalHeaderTableModel
|
protected MultiTableModel |
_originalTableModel
|
protected TableScrollPane[] |
_tableScrollPanes
|
static String |
TABLE_INDEX
|
static String |
TABLESPLITPANE_KEY
|
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. |
|
TableSplitPane(MultiTableModel tableModel,
MultiTableModel headerTableModel,
MultiTableModel footerTableModel,
boolean sortable)
Creates a TableSplitPane with footer table. |
Method Summary | |
---|---|
int |
convertColumnIndexToModel(int viewIndex)
Convert the view column index in the entire TableScrollPane to model index. |
int |
convertColumnIndexToView(int modelIndex)
Convert the view column index in the entire TableScrollPane to model index. |
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 headerTableModel,
MultiTableModel footerTableModel,
int tableIndex,
boolean sortable)
Creates the TableScrollPane used in each pane of the TableSplitPane. |
int |
getColumnCount()
Gets the total column count of TableScrollPane. |
MultiTableModel |
getOriginalFooterTableModel()
Gets the original footer table model. |
MultiTableModel |
getOriginalTableModel()
Gets the original table model. |
int |
getSelectedColumn()
Returns the index of the first selected column, -1 if no column is selected. |
int |
getSelectedColumnCount()
Returns the number of selected columns. |
int[] |
getSelectedColumns()
Returns the indices of all selected columns. |
int |
getSelectedRow()
Returns the index of the first selected row, -1 if no row is selected. |
int |
getSelectedRowCount()
Returns the number of selected rows. |
int[] |
getSelectedRows()
Returns the indices of all selected rows. |
TableCustomizer |
getTableCustomizer()
Gets the table customizer. |
TableCustomizer |
getTableCustomizer(int tableIndex)
Gets the table customizer for the designated table. |
TableScrollPane[] |
getTableScrollPanes()
Gets the array of TableScrollPane. |
void |
setTableCustomizer(TableCustomizer tableCustomizer)
Sets the table customizer. |
void |
setTableModels(MultiTableModel tableModel,
MultiTableModel footerTableModel,
boolean sortable)
Sets the original table models. |
void |
setTableModels(MultiTableModel tableModel,
MultiTableModel headerTableModel,
MultiTableModel footerTableModel,
boolean sortable)
Sets the original table models. |
Methods inherited from class javax.swing.JPanel |
---|
getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected MultiTableModel _originalTableModel
protected MultiTableModel _originalFooterTableModel
protected MultiTableModel _originalHeaderTableModel
protected TableScrollPane[] _tableScrollPanes
public static final String TABLE_INDEX
public static final String TABLESPLITPANE_KEY
Constructor Detail |
---|
public TableSplitPane()
public TableSplitPane(MultiTableModel tableModel)
TableSplitPane
. The tables will not be sortable.
tableModel
- the MultiTableModel. This is the main table model that will be used to create upto three tables
in TableSplitPane.public TableSplitPane(MultiTableModel tableModel, MultiTableModel footerTableModel)
TableSplitPane
with footer table. The tables will not be sortable.
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.public TableSplitPane(MultiTableModel tableModel, MultiTableModel footerTableModel, boolean sortable)
TableSplitPane
with footer table. You can specify if the tables are sortable.
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.public TableSplitPane(MultiTableModel tableModel, MultiTableModel headerTableModel, MultiTableModel footerTableModel, boolean sortable)
TableSplitPane
with footer table. You can specify if the tables are sortable.
tableModel
- the MultiTableModel. This is the main table model that will be used to create upto three
tables in TableSplitPane.headerTableModel
- the header table model. It will be used to create a header table above the main table. It
must have the same column count as the MultiTableModel's non-header and non-footer column
count.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 |
---|
protected MultiTableModel createSortableTableModel(MultiTableModel tableModel, boolean sortable)
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;
tableModel
- the MultiTableModelsortable
- true or false. If true, the tableModel should be wrapped into a SortableTableModel or
SortableTreeTableModel.
public void setTableModels(MultiTableModel tableModel, MultiTableModel footerTableModel, boolean sortable)
tableModel
- the main table modelfooterTableModel
- the footer table model. If you don't have any footer, you can pass null.sortable
- if the table need to be sortedpublic void setTableModels(MultiTableModel tableModel, MultiTableModel headerTableModel, MultiTableModel footerTableModel, boolean sortable)
tableModel
- the main table modelheaderTableModel
- the header table model. If you don't have any header, you can pass null.footerTableModel
- the footer table model. If you don't have any footer, you can pass null.sortable
- if the table need to be sortedpublic MultiTableModel getOriginalTableModel()
public MultiTableModel getOriginalFooterTableModel()
protected TableScrollPane createTableScrollPane(MultiTableModel tableModel, MultiTableModel headerTableModel, MultiTableModel footerTableModel, int tableIndex, boolean sortable)
tableModel
- the main table modelheaderTableModel
- the header table modelfooterTableModel
- the footer table modeltableIndex
- the table indexsortable
- if the tables need to be sorted
public TableScrollPane[] getTableScrollPanes()
public TableCustomizer getTableCustomizer()
public void setTableCustomizer(TableCustomizer tableCustomizer)
tableCustomizer
- the new table customizer.public TableCustomizer getTableCustomizer(int tableIndex)
tableIndex
- the table index
public int getSelectedRow()
public int getSelectedColumn()
public int[] getSelectedRows()
getSelectedRow()
public int[] getSelectedColumns()
getSelectedColumn()
public int convertColumnIndexToView(int modelIndex)
modelIndex
- the model column index
public int getColumnCount()
public int convertColumnIndexToModel(int viewIndex)
viewIndex
- the view column index counting from 0 including row header table, main table and row footer
table
public int getSelectedRowCount()
public int getSelectedColumnCount()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |