Created
December 5, 2016 14:02
-
-
Save hendrikebbers/2c544b52ddbcc16836db6d040f16fbb0 to your computer and use it in GitHub Desktop.
tree-renderer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tree.setCellRenderer(new DefaultTreeCellRenderer() { | |
@Override | |
public IRendererComponent getTreeCellRendererComponent(ULCTree tree, Object value, boolean selected, boolean expanded, boolean leaf, boolean hasFocus) { | |
IRendererComponent renderer = super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, hasFocus); | |
if (value != null && value instanceof ApplicationMetadata) { | |
setText(((ApplicationMetadata) value).getName()); | |
} | |
return renderer; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment