|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.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.grid.HierarchicalTable
public class HierarchicalTable
HierarchicalTable is a special JTable which can show any components inside the table in a
hierarchical fashion. Each row can have a child component. Usually the child component is not visible. However if
expandRow() is called on a row, the child component will be shown either under that row or replace that
row. Since the child component itself could be another HierarchicalTable which can have child
components, as a result, it forms a hierarchy. This is why we called it HierarchicalTable.
HierarchicalTable can also be used to display
master-detail relation. When there are a lot of details of each row but can't be shown because of the column count
limitation, child component can be used to display the details of each row.
HierarchicalTable has one special column called expandable column. If a column is an expandable column,
there will be an expand/collapse button on the left side of any cells in that column. Clicking on that button will
expand/collapse. By default, the first column is the expandable column. Usually if you choose a column to be
expandable column, the cells in that column should be read only. If you want to control when to expand/collapse all
by yourself, you can call setHierarchicalColumn(-1). You can then add mouse listener or key listener to
expand or collapse.
There is another attribute called singleExpansion. Typical when user expand a row, then expand another
row, they want both rows to be expanded. However there are case user wants one row to be expanded at a time.
singleExpansion can be used in this case. singleExpansion is true means only one row can
expanded at a time. Default is false.
We used the same +/- icons used in JTree so it will change based on different LookAndFeels. You can also define your
own icons by calling CategorizedTable.setCategoryExpandedIcon(javax.swing.Icon) and CategorizedTable.setCategoryCollapsedIcon(javax.swing.Icon).
HierarchicalTable is a SortableTable, so you can sort the table even with some rows are
expanded. If you don't want the sorting feature, simple call setSortable(false).
This class is part of HierarchicalTable component. If you used the beta version of HierarchicalTable component
before, please note you need to change your code as the interface changed. The main reason for this change is to
break the model from view. Please refer to HierarchicalTableModel for details.
| Nested Class Summary | |
|---|---|
protected class |
HierarchicalTable.DelegateExpandMouseInputListener
|
protected class |
HierarchicalTable.ExpandMouseListener
|
protected static class |
HierarchicalTable.HierarchicalTableAction
|
| Nested classes/interfaces inherited from class com.jidesoft.grid.CellSpanTable |
|---|
CellSpanTable.DelegateAction |
| Nested classes/interfaces inherited from class com.jidesoft.grid.JideTable |
|---|
JideTable.NonContiguousTransferHandler |
| Nested classes/interfaces inherited from class javax.swing.JTable |
|---|
JTable.AccessibleJTable, JTable.DropLocation, JTable.PrintMode |
| 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 HierarchicalTableCellRenderer |
_hierarchicalTableCellRenderer
|
static String |
PROPERTY_DOUBLE_CLICK_ENABLED
|
static String |
PROPERTY_HIERARCHICAL_COLUMN
|
static String |
PROPERTY_MOUSE_ENABLED
|
static String |
PROPERTY_SELECT_ROW_WHEN_TOGGLING
|
static String |
PROPERTY_SINGLE_EXPANSION
|
| Fields inherited from class com.jidesoft.grid.SortableTable |
|---|
MULTICOLUMN_SORTABLE_PROPERTY, PROPERTY_SHOW_SORT_ORDER_NUMBER, SORTABLE_PROPERTY |
| Fields inherited from class com.jidesoft.grid.CategorizedTable |
|---|
DEFAULT_ASCENDING_ICON, DEFAULT_DESCENDING_ICON, PROPERTY_EXPAND_ICON_VISIBLE |
| Fields inherited from class com.jidesoft.grid.CellSpanTable |
|---|
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 |
| Fields inherited from class com.jidesoft.grid.CellStyleTable |
|---|
_cellStyleList, PROPERTY_FILLS_SELECTION, PROPERTY_FILLS_VIEWPORT_WITH_STRIPE |
| 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 | |
|---|---|
HierarchicalTable()
Constructs a default HierarchicalTable that is initialized with a default data model, a default
column model, and a default selection model. |
|
HierarchicalTable(int numRows,
int numColumns)
Constructs a JTable with numRows and numColumns of empty cells using
DefaultTableModel. |
|
HierarchicalTable(Object[][] rowData,
Object[] columnNames)
Constructs a JTable to display the values in the two dimensional array, rowData, with
column names, columnNames. |
|
HierarchicalTable(TableModel dm)
Constructs a HierarchicalTable that is initialized with dm as the data model, a default
column model, and a default selection model. |
|
HierarchicalTable(TableModel dm,
TableColumnModel cm)
Constructs a HierarchicalTable that is initialized with dm as the data model,
cm as the column model, and a default selection model. |
|
HierarchicalTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
Constructs a JTable that is initialized with dm as the data model, cm as
the column model, and sm as the selection model. |
|
HierarchicalTable(Vector<?> rowData,
Vector<?> columnNames)
Constructs a JTable to display the values in the Vector of Vectors,
rowData, with column names, columnNames. |
|
| Method Summary | |
|---|---|
void |
addTreeExpansionListener(TreeExpansionListener tel)
Adds a listener for TreeExpansion events. |
void |
addTreeWillExpandListener(TreeWillExpandListener tel)
Adds a listener for TreeWillExpand events. |
boolean |
alwaysCalculateCellRect()
A boolean flag to determine if the rect should always be calculated when painting the grid line and cells. |
void |
changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
Override the default implementation to adjust the selection avoiding the non-navigable cells. |
protected void |
childComponentResized()
The action to take while child component is resized. |
void |
collapseAllRows()
Collapse all rows. |
void |
collapseRow(int row)
Collapse the row. |
protected Action |
createDelegateAction(Action action,
KeyStroke keyStroke)
|
protected MouseInputListener |
createExpandMouseInputListener(MouseInputListener listener)
Creates the mouse listener used to handle mouse click on +/- icon. |
protected MouseInputListener |
createExpandMouseListener()
Creates the mouse listener used to handle mouse click on +/- icon. |
protected HierarchicalTableCellRenderer |
createHierarchicalTableCellRenderer()
Creates the HierarchicalTableCellRenderer. |
protected RowHeights |
createRowHeights()
|
void |
doLayout()
|
boolean |
editCellAt(int row,
int column,
EventObject e)
Overrides to make sure the editor is set the correct height when there is expanded row. |
void |
expandAllRows()
Expands all rows as long as they are expandable. |
void |
expandRow(int row)
Expands the row if the row has child component. |
void |
fireTreeCollapsed(TreePath path)
Notifies all listeners that have registered interest for notification on this event type. |
void |
fireTreeExpanded(TreePath path)
Notifies all listeners that have registered interest for notification on this event type. |
void |
fireTreeWillCollapse(TreePath path)
Notifies all listeners that have registered interest for notification on this event type. |
void |
fireTreeWillExpand(TreePath path)
Notifies all listeners that have registered interest for notification on this event type. |
int |
getActualRowHeight(int row)
As we overridden getRowModel(), JideTable.getRowHeight(int) will now return the row height considering the child
component height. |
String |
getActualUIClassID()
|
Rectangle |
getCellRect(int rowIndex,
int columnIndex,
boolean includeSpacing)
|
TableCellRenderer |
getCellRenderer(int row,
int column)
Returns an appropriate renderer for the cell specified by this row and column. |
Component |
getChildComponentAt(int row)
Gets the child component at the specified row index. |
protected ComponentListener |
getChildComponentResizeListener()
Get the child component listener. |
HierarchicalTableComponentFactory |
getComponentFactory()
Gets the component factory that will create the child component of HierarchicalTable. |
Rectangle |
getEditorCellRect(int rowIndex,
int columnIndex)
In TreeTable and HierarchicalTable case, the cell rect for cell editor should consider the +/- icon size so the cell editor doesn't cover the +/- icon. |
int |
getHierarchicalColumn()
Gets the hierarchical column. |
int |
getHierarchicalColumnViewIndex()
Gets the expandable column view index. |
int |
getHorizontalLegPosition(int cellHeight)
Gets the horizontal leg y position. |
TreeExpansionListener[] |
getTreeExpansionListeners()
Returns an array of all the TreeExpansionListeners added to this JTree with
addTreeExpansionListener(). |
TreeWillExpandListener[] |
getTreeWillExpandListeners()
Returns an array of all the TreeWillExpandListeners added to this JTree with
addTreeWillExpandListener(). |
protected void |
handleMouseEvent(MouseEvent e)
There are too many ways to control when to expand and when to collapse. |
boolean |
isActualRowExpanded(int actualRow)
Return true if the row is expanded. |
boolean |
isAnyExpanded()
Return true if any row is expanded. |
boolean |
isAutoRefreshOnRowUpdate()
Checks if refreshRow() is called when row updated event is fired. |
boolean |
isDoubleClickEnabled()
Checks if the double click is enabled. |
boolean |
isExpanded(int row)
Return true if the row is expanded. |
boolean |
isMouseEnabled()
Returns true if default mouse listener is installed to expand/collapse rows. |
boolean |
isPaintMarginGridMarginBackground()
Get the flag indicating if HierarchicalTable should paint the grids inside the MarginExpandablePanel to the color get from CategorizedTable.getMarginBackground(). |
protected boolean |
isRowHeightChanged(int row,
int newHeight)
The method will check if the new height is different with current height. |
boolean |
isSelectRowWhenToggling()
Gets the value of selectRowWhenToggling property. |
boolean |
isSingleExpansion()
Returns true if only one row can be expanded at a time. |
boolean |
isVariousRowHeights()
Is the table has various row height on each row. |
protected void |
muteDefaultKeyStroke()
|
void |
refreshRow(int row)
Refresh the row. |
void |
removeTreeExpansionListener(TreeExpansionListener tel)
Removes a listener for TreeExpansion events. |
void |
removeTreeWillExpandListener(TreeWillExpandListener tel)
Removes a listener for TreeWillExpand events. |
boolean |
rolloverCellAt(int row,
int column)
Makes the cell enters editing mode without forcing the other cell editor, if any, to stop editing. |
void |
setActualRowHeight(int row,
int rowHeight)
Sets the actual row height without the child component. |
void |
setAutoRefreshOnRowUpdate(boolean autoRefreshOnRowUpdate)
Sets the flag autoRefreshOnRowUpdate. |
void |
setComponentFactory(HierarchicalTableComponentFactory factory)
Sets the component factory that will create the child component of HierarchicalTable. |
void |
setDoubleClickEnabled(boolean doubleClickEnabled)
Enables double click on the row to expand/collapse the row. |
void |
setEnabled(boolean enabled)
|
void |
setHierarchicalColumn(int hierarchicalColumn)
Sets the hierarchical column. |
void |
setMouseEnabled(boolean mouseEnabled)
Sets the mouseEnabled attribute. |
void |
setPaintMarginGridMarginBackground(boolean paintMarginGridMarginBackground)
Set the flag indicating if HierarchicalTable should paint the grids inside the MarginExpandablePanel to the color get from CategorizedTable.getMarginBackground(). |
void |
setSelectRowWhenToggling(boolean selectRowWhenToggling)
Sets the selectRowWhenToggling flag. |
void |
setSingleExpansion(boolean singleExpansion)
Sets the singleExpansion attribute. |
void |
toggleRow(int row)
Expands the specified row if it's not expanded or collapse the row if it's expanded already. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jidesoft.grid.TableAdapter |
|---|
getCellSelectionEnabled, getColumnClass, getColumnCount, getColumnName, getColumnSelectionAllowed, getRowCount, getRowSelectionAllowed, isCellEditable, setCellSelectionEnabled, setValueAt |
| Field Detail |
|---|
public static final String PROPERTY_SINGLE_EXPANSION
public static final String PROPERTY_MOUSE_ENABLED
public static final String PROPERTY_HIERARCHICAL_COLUMN
public static final String PROPERTY_SELECT_ROW_WHEN_TOGGLING
public static final String PROPERTY_DOUBLE_CLICK_ENABLED
protected HierarchicalTableCellRenderer _hierarchicalTableCellRenderer
| Constructor Detail |
|---|
public HierarchicalTable()
HierarchicalTable that is initialized with a default data model, a default
column model, and a default selection model.
Since HierarchicalTable expects an instance of HierarchicalTableModel ex data model, this
constructor creates nothing but a regular JTable if there is no subsequent call to setModel() to pass in a
HierarchicalTableModel.
public HierarchicalTable(TableModel dm)
HierarchicalTable that is initialized with dm as the data model, a default
column model, and a default selection model.
dm - the data model for the table. It should be an instance of HierarchicalTableModel.
public HierarchicalTable(TableModel dm,
TableColumnModel cm)
HierarchicalTable that is initialized with dm as the data model,
cm as the column model, and a default selection model.
dm - the data model for the table. It should be an instance of HierarchicalTableModel.cm - the column model for the table
public HierarchicalTable(TableModel dm,
TableColumnModel cm,
ListSelectionModel sm)
JTable that is initialized with dm as the data model, cm as
the column model, and sm as the selection model. If any of the parameters are null this
method will initialize the table with the corresponding default model. The autoCreateColumnsFromModel
flag is set to false if cm is non-null, otherwise it is set to true and the column model is
populated with suitable TableColumns for the columns in dm.
dm - the data model for the table. It should be an instance of HierarchicalTableModel.cm - the column model for the tablesm - the row selection model for the table
public HierarchicalTable(int numRows,
int numColumns)
JTable with numRows and numColumns of empty cells using
DefaultTableModel. The columns will have names of the form "A", "B", "C", etc.
Since HierarchicalTable expects an instance of HierarchicalTableModel ex data model, this
constructor creates nothing but a regular JTable if there is no subsequent call to setModel() to pass in a
HierarchicalTableModel.
numRows - the number of rows the table holdsnumColumns - the number of columns the table holdsDefaultTableModel
public HierarchicalTable(Vector<?> rowData,
Vector<?> columnNames)
JTable to display the values in the Vector of Vectors,
rowData, with column names, columnNames. The Vectors contained in
rowData should contain the values for that row. In other words, the value of the cell at row 1,
column 5 can be obtained with the following code:
((Vector)rowData.elementAt(1)).elementAt(5);Since
HierarchicalTable expects an instance of HierarchicalTableModel ex data model, this
constructor creates nothing but a regular JTable if there is no subsequent call to setModel() to pass in a
HierarchicalTableModel.
rowData - the data for the new tablecolumnNames - names of each column
public HierarchicalTable(Object[][] rowData,
Object[] columnNames)
JTable to display the values in the two dimensional array, rowData, with
column names, columnNames. rowData is an array of rows, so the value of the cell at row
1, column 5 can be obtained with the following code:
rowData[1][5];All rows must be of the same length as
columnNames.
Since HierarchicalTable expects an instance of HierarchicalTableModel ex data model, this
constructor creates nothing but a regular JTable if there is no subsequent call to setModel() to pass in a
HierarchicalTableModel.
rowData - the data for the new tablecolumnNames - names of each column| Method Detail |
|---|
public String getActualUIClassID()
getActualUIClassID in class CellSpanTablepublic void setEnabled(boolean enabled)
setEnabled in class JideTableprotected void handleMouseEvent(MouseEvent e)
e - the mouse eventpublic boolean isActualRowExpanded(int actualRow)
isActualRowExpanded in interface HierarchicalTableSupportactualRow - the actual row index
public boolean isExpanded(int row)
isExpanded in interface HierarchicalTableSupportrow - the row index
public boolean isAnyExpanded()
public int getHierarchicalColumnViewIndex()
getHierarchicalColumn() convert the index from
model index to index. There is no setter for this method, you have to set it through setHierarchicalColumn(int). If you never called setHierarchicalColumn, this method will always return 0 meaning
the first visible column will be used to display the +/- icon.
getHierarchicalColumnViewIndex in interface HierarchicalTableSupportpublic int getHierarchicalColumn()
getHierarchicalColumn in interface HierarchicalTableSupportpublic void setHierarchicalColumn(int hierarchicalColumn)
getHierarchicalColumnViewIndex() to return a view column index. For
example, if you return 0, the +/- icon will always be at the first column no matter how you rearrange the
columns.
setHierarchicalColumn in interface HierarchicalTableSupporthierarchicalColumn - new hierarchical column. It should be a value between 0 and getColumnCount() - 1. Or -1
if you don't want to show any column to be hierarchical. Default value is 0.
public TableCellRenderer getCellRenderer(int row,
int column)
ContextSensitiveTableContextSensitiveTable.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 CellSpanTablerow - the row of the cell to render, where 0 is the first rowcolumn - the column of the cell to render, where 0 is the first column
protected HierarchicalTableCellRenderer createHierarchicalTableCellRenderer()
public void toggleRow(int row)
toggleRow in interface HierarchicalTableSupportrow - the row index to be toggled.public void expandRow(int row)
isHierarchical() in HierarhicalTableModel returns true. So the value passed in as
row parameter could be different from the row in getChildComponent(int row).
expandRow in interface HierarchicalTableSupportrow - the row indexpublic void collapseRow(int row)
collapseRow in interface HierarchicalTableSupportrow - the row indexpublic void refreshRow(int row)
refreshRow in interface HierarchicalTableSupportrow - the row indexpublic void collapseAllRows()
collapseAllRows in interface HierarchicalTableSupportpublic void expandAllRows()
expandAllRows in interface HierarchicalTableSupportpublic void doLayout()
doLayout in class JTablepublic Component getChildComponentAt(int row)
row - the row index.
public boolean isPaintMarginGridMarginBackground()
CategorizedTable.getMarginBackground().
By default, the flag is false to keep the original behavior. However, if you set the margin background
differently with the grid color, you may need set this flag to true.
CategorizedTable.getMarginBackground(),
JTable.getGridColor(),
JideTable.getGridColor(int)public void setPaintMarginGridMarginBackground(boolean paintMarginGridMarginBackground)
CategorizedTable.getMarginBackground().
paintMarginGridMarginBackground - the flagisPaintMarginGridMarginBackground()protected void childComponentResized()
public boolean isAutoRefreshOnRowUpdate()
public void setAutoRefreshOnRowUpdate(boolean autoRefreshOnRowUpdate)
autoRefreshOnRowUpdate - true or falsepublic boolean isSingleExpansion()
public void setSingleExpansion(boolean singleExpansion)
singleExpansion - true or false.public boolean isMouseEnabled()
public void setMouseEnabled(boolean mouseEnabled)
getHierarchicalColumnViewIndex() getHierarchicalColumnViewIndex() == -1, double
clicking will expand/collapse the row. However if mouseEnabled is false, no mouse listener will be added. You
need to add your own mouse listener or some other ways to expand or collapse the row.
mouseEnabled - true or falsepublic HierarchicalTableComponentFactory getComponentFactory()
public void setComponentFactory(HierarchicalTableComponentFactory factory)
factory - the new component factory.protected RowHeights createRowHeights()
createRowHeights in class JideTable
protected boolean isRowHeightChanged(int row,
int newHeight)
JideTableTableUtils.autoResizeRow(javax.swing.JTable, int, int).
isRowHeightChanged in class JideTablerow - the row to be checkednewHeight - new height of the row, most likely from JideTable.calculateRowHeight(int)
public int getActualRowHeight(int row)
JideTable.getRowHeight(int) will now return the row height considering the child
component height. So this method will give you a way to get the actual row height without the child component.
getActualRowHeight in interface HierarchicalTableSupportgetActualRowHeight in class CellSpanTablerow - the row index
public void setActualRowHeight(int row,
int rowHeight)
setActualRowHeight in interface HierarchicalTableSupportrow - the row index.rowHeight - new actual row height.protected void muteDefaultKeyStroke()
muteDefaultKeyStroke in class CellSpanTable
protected Action createDelegateAction(Action action,
KeyStroke keyStroke)
createDelegateAction in class CellSpanTableprotected MouseInputListener createExpandMouseListener()
createExpandMouseInputListener(javax.swing.event.MouseInputListener) instead.
createExpandMouseInputListener(javax.swing.event.MouseInputListener)protected MouseInputListener createExpandMouseInputListener(MouseInputListener listener)
createExpandMouseListener() instead.
listener - the MouseInputListener
createExpandMouseListener()public void addTreeExpansionListener(TreeExpansionListener tel)
TreeExpansion events. We reused the listener and event class for JTree to avoid
duplicate code. However since there is not TreeNode concept in HierarchicalTable and there is one level deep, the
TreePath object in the TreeExpansionEvent only has one element which is the row index.
tel - a TreeExpansionListener that will be notified when a tree node is expanded or collapsed (a "negative
expansion")public void removeTreeExpansionListener(TreeExpansionListener tel)
TreeExpansion events.
tel - the TreeExpansionListener to removepublic TreeExpansionListener[] getTreeExpansionListeners()
TreeExpansionListeners added to this JTree with
addTreeExpansionListener().
TreeExpansionListeners added or an empty array if no listeners have been addedpublic void fireTreeExpanded(TreePath path)
path parameter.
path - the TreePath indicating the node that was expandedEventListenerListpublic void fireTreeCollapsed(TreePath path)
path parameter.
path - the TreePath indicating the node that was collapsedEventListenerListpublic void addTreeWillExpandListener(TreeWillExpandListener tel)
TreeWillExpand events.
tel - a TreeWillExpandListener that will be notified when a tree node will be expanded or
collapsed (a "negative expansion")public void removeTreeWillExpandListener(TreeWillExpandListener tel)
TreeWillExpand events.
tel - the TreeWillExpandListener to removepublic TreeWillExpandListener[] getTreeWillExpandListeners()
TreeWillExpandListeners added to this JTree with
addTreeWillExpandListener().
TreeWillExpandListeners added or an empty array if no listeners have been added
public void fireTreeWillExpand(TreePath path)
throws ExpandVetoException
path parameter.
path - the TreePath indicating the node that was expanded
ExpandVetoException - if the tree node is not allowed to be expandedEventListenerList
public void fireTreeWillCollapse(TreePath path)
throws ExpandVetoException
path parameter.
path - the TreePath indicating the node that was expanded
ExpandVetoException - if the tree node is not allowed to be collapsedEventListenerList
public boolean editCellAt(int row,
int column,
EventObject e)
editCellAt in class CellSpanTablerow - the row to be editedcolumn - the column to be editede - event to pass into shouldSelectCell; note that as of Java 2 platform v1.2, the call to
shouldSelectCell is no longer made
public boolean rolloverCellAt(int row,
int column)
JideTable
rolloverCellAt in class CellSpanTablerow - the row index.column - the column index.
public Rectangle getCellRect(int rowIndex,
int columnIndex,
boolean includeSpacing)
getCellRect in class CellSpanTable
public Rectangle getEditorCellRect(int rowIndex,
int columnIndex)
JideTable
getEditorCellRect in class JideTablerowIndex - the row index.columnIndex - the column index
public void changeSelection(int rowIndex,
int columnIndex,
boolean toggle,
boolean extend)
NavigableTableThis implementation uses the following conventions:
toggle: false,
extend: false. Clear the previous selection and ensure the new cell is selected. toggle: false, extend: true. Extend the previous selection to include
the specified cell. toggle: true, extend: false. If the
specified cell is selected, deselect it. If it is not selected, select it. toggle:
true, extend: true. Leave the selection state as it is, but move the anchor index
to the specified location.
changeSelection in interface TableAdapterchangeSelection in class NavigableTablerowIndex - Affects the selection at rowcolumnIndex - Affects the selection at columntoggle - See description aboveextend - If true, extend the current selectionpublic boolean isVariousRowHeights()
JideTable
isVariousRowHeights in class JideTableJideTable.isRowAutoResizes() is true.protected ComponentListener getChildComponentResizeListener()
public int getHorizontalLegPosition(int cellHeight)
getHorizontalLegPosition in interface HierarchicalTableSupportcellHeight - the new cell height
public boolean isSelectRowWhenToggling()
public void setSelectRowWhenToggling(boolean selectRowWhenToggling)
selectRowWhenToggling - true or false. If true, the row will be selected when when a row is expanded or
collapsed. If false, the old selection will be kept when a row is expanded or
collapsed.public boolean alwaysCalculateCellRect()
alwaysCalculateCellRect in class JideTablepublic boolean isDoubleClickEnabled()
public void setDoubleClickEnabled(boolean doubleClickEnabled)
PROPERTY_DOUBLE_CLICK_ENABLED be fired when value changes.
doubleClickEnabled - true to enable double click to expand/collapse a row
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||