public interface ITreeTableNode extends TreeNode
TreeNode
interface, which provides additional
information used to populate the table columns of the tree table. Just like
other classes and interfaces in this package, the ITreeTableNode
does
differentiate between a key colum and value columns. The key column is the
table's column that is responsible for displaying the key object and for
visualizing the hierarchical tree structure (by indenting nodes).
This node interface and its implementation
DefaultMutableTreeTableNode
get heavily used by the various tree
table policies. Most of these policies simply delegate the actual work to the
node. Example: the node editing policy
INodeEditPolicy.isValueEditable(Object, ITreeTableModel, int)
calls
isValueEditable(int)
.Modifier and Type | Method and Description |
---|---|
Object |
getColumnValue(int modelIndex)
Returns the value for the given model index.
|
int |
getDragActions()
Returns the drag actions that can be performed on the tree table node.
|
int |
getDropActions(ITreeTableNode dropCandidate)
Returns the drop actions that can be performed on the node related to
another node.
|
Object |
getKey()
Returns the node's key object.
|
Object |
getPopupObject(boolean extended)
Returns the object for the popup window.
|
Object |
getPopupTitleObject()
Returns the object for the popup window title.
|
Object |
getRowHeaderValue()
Returns a value that can be used by the row header and the row header
renderer to control the rendering of the row header.
|
int |
getRowHeight()
Returns the current row height of the node.
|
int |
getRowHeightMaximum()
Returns the node's maximum row height.
|
int |
getRowHeightMinimum()
Returns the node's minimum row height.
|
String |
getToolTipText(TreeTableColumn column)
Returns the appropriate tooltip text for the given column.
|
boolean |
isDeletable()
Returns TRUE if the whole node can be deleted.
|
boolean |
isKeyEditable()
Returns TRUE if the key value can be edited.
|
boolean |
isReassignable(Object newParent)
Determines whether the node can be reassigned to a new parent node by the
user or not.
|
boolean |
isResizable()
Returns TRUE if the tree node can be resized.
|
boolean |
isRowLineVisible(boolean expanded)
Returns TRUE if the horizontal grid line of the row in which the node is
displayed shall be drawn or not (the answer to this question of depends
on the state of the node, whether it is expanded or closed).
|
boolean |
isSelectable()
Returns TRUE if the tree node can be selected.
|
boolean |
isValueEditable(int modelIndex)
Returns TRUE if the column value at the given model index can be edited.
|
void |
setColumnValue(Object value,
int modelIndex)
Sets the value for the given model index.
|
void |
setKey(Object key)
Sets the node's key object.
|
void |
setRowHeaderValue(Object value)
Sets a row header value that can be used by the row ehader and the row
header renderer to control the rendering of the row header.
|
void |
setRowHeight(int height)
Specifies a new row height for the tree table node.
|
void |
sort(int[] modelIndices,
boolean[] sortDirections)
Invokes multi-column sorting on the tree table node.
|
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
Object getKey()
setKey(Object)
,
ITreeTableModel.getKey(Object)
,
DefaultTreeTableModel.getKey(ITreeTableNode)
,
DefaultMutableTreeTableNode.setKey(Object)
,
DefaultMutableTreeTableNode.getKey()
void setKey(Object key)
key
- the node's key objectgetKey()
,
DefaultChangeKeyCommand
,
INodeEditPolicy.getChangeKeyCommand(Object, ITreeTableModel, Object)
Object getColumnValue(int modelIndex)
modelIndex
- the model index provided by the columnTreeTableColumn.getModelIndex()
void setColumnValue(Object value, int modelIndex)
value
- the new valuemodelIndex
- the model index provided by the columnTreeTableColumn.getModelIndex()
,
DefaultChangeValueCommand
,
INodeEditPolicy.getChangeValueCommand(Object, ITreeTableModel,
Object, int)
boolean isSelectable()
INodeEditPolicy.isSelectable(Object, ITreeTableModel)
boolean isResizable()
IRowPolicy.isRowResizable(Object, ITreeTableModel)
,
IRowPolicy.getRowResizeCommand(Object, ITreeTableModel, int)
,
DefaultRowResizeCommand
,
getRowHeight()
,
getRowHeightMaximum()
,
getRowHeightMinimum()
boolean isRowLineVisible(boolean expanded)
expanded
- if TRUE the tree table node is currently expandedIRowPolicy.isRowLineVisible(Object, boolean, ITreeTableModel)
boolean isKeyEditable()
INodeEditPolicy.isKeyEditable(Object, ITreeTableModel)
,
INodeEditPolicy.getChangeKeyCommand(Object, ITreeTableModel, Object)
,
DefaultChangeKeyCommand
boolean isValueEditable(int modelIndex)
modelIndex
- the model indexINodeEditPolicy.isValueEditable(Object, ITreeTableModel, int)
,
INodeEditPolicy.getChangeValueCommand(Object, ITreeTableModel,
Object, int)
,
DefaultChangeValueCommand
boolean isDeletable()
INodeEditPolicy.isDeletable(Object, ITreeTableModel)
,
INodeEditPolicy.getDeleteNodesCommand(java.util.List,
ITreeTableModel)
,
DefaultDeleteNodeCommand
int getRowHeight()
getRowHeightMaximum()
,
getRowHeightMinimum()
,
IRowPolicy.getRowHeight(Object, ITreeTableModel)
,
IRowPolicy.getRowResizeCommand(Object, ITreeTableModel, int)
,
DefaultRowResizeCommand
int getRowHeightMinimum()
getRowHeight()
,
getRowHeightMaximum()
,
IRowPolicy.getRowHeightMinimum(Object, ITreeTableModel)
,
IRowPolicy.getRowResizeCommand(Object, ITreeTableModel, int)
,
DefaultRowResizeCommand
int getRowHeightMaximum()
getRowHeight()
,
getRowHeightMinimum()
,
IRowPolicy.getRowHeightMaximum(Object, ITreeTableModel)
,
IRowPolicy.getRowResizeCommand(Object, ITreeTableModel, int)
,
DefaultRowResizeCommand
String getToolTipText(TreeTableColumn column)
column
- the column for which to return a tooltip textIRowPolicy.getRowToolTip(Object, ITreeTableModel, TreeTableColumn)
,
DefaultRowPolicy
void setRowHeight(int height)
height
- the new row heightIRowPolicy.isRowResizable(Object, ITreeTableModel)
,
IRowPolicy.getRowResizeCommand(Object, ITreeTableModel, int)
,
DefaultRowPolicy
,
DefaultRowResizeCommand
Object getRowHeaderValue()
IRowHeaderRenderer
,
ITreeTableModel.getRowHeaderValue(Object)
void setRowHeaderValue(Object value)
value
- the row header valueIRowHeaderRenderer
,
ITreeTableModel.getRowHeaderValue(Object)
void sort(int[] modelIndices, boolean[] sortDirections)
modelIndices
- the model indices that are used to determine which column
values to compare for sorting (use
KeyColumn.MODEL_INDEX
to specify a sort based on the
key columnsortDirections
- if TRUE the sort direction will be ascendingITreeTableModel.sort(Object, int[], boolean[])
int getDragActions()
DnDConstants
. Possible values are:
Declaring the drag actions is only half of the work needed for correct
drag and drop behaviour. A node might be draggable but it also needs a
place where it can be dropped. The drop places are defined by
getDropActions(ITreeTableNode)
.DefaultNodeDragAndDropCommand
,
INodeDragAndDropPolicy.getDragActions(Object, ITreeTableModel)
int getDropActions(ITreeTableNode dropCandidate)
DnDConstants
.
Possible values are:
Declaring the drop actions is only half of the work needed for correct
drag and drop behaviour. A node might be droppable onto another
node but it also needs to be draggable.This behaviour is defined
by calling getDragActions()
.dropCandidate
- the node that might get dropped onto this nodeDefaultNodeDragAndDropCommand
,
INodeDragAndDropPolicy.getDropActions(Object, Object,
ITreeTableModel, Object, ITreeTableModel)
boolean isReassignable(Object newParent)
newParent
- the potential new parentObject getPopupObject(boolean extended)
extended
- a flag that signals whether the user wants to see the standard
popup information or the extended versionPopupLayer
,
IPopupRenderer
,
DefaultPopupRenderer
,
IPopupPolicy.getPopupValue(javax.swing.tree.TreePath,
IGanttChartModel, boolean)
Object getPopupTitleObject()
PopupLayer
,
IPopupRenderer
,
DefaultPopupRenderer
,
IPopupPolicy.getPopupTitleValue(javax.swing.tree.TreePath,
IGanttChartModel)
Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.