| Modifier and Type | Method and Description |
|---|---|
| public Component | Returns: theComponent that the renderer uses to draw the valuethe receiver is being configured for tree, Object the value to render value, boolean whether node is selected selected, boolean whether node is expanded expanded, boolean whether node is a lead node leaf, int row index row, boolean whether node has focus hasFocus)Sets the value of the current tree cell to |
| getTreeCellRendererComponent | back to summary |
|---|---|
| public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) Sets the value of the current tree cell to
The
JTree.DropLocation dropLocation = tree.getDropLocation();
if (dropLocation != null
&& dropLocation.getChildIndex() == -1
&& tree.getRowForPath(dropLocation.getPath()) == row) {
// this row represents the current drop location
// so render it specially, perhaps with a different color
}
| |