use of com.intellij.ui.ColoredTreeCellRenderer in project intellij-plugins by JetBrains.
the class ActionScriptProfileControlPanel method setupComponents.
private void setupComponents() {
EditSourceOnDoubleClickHandler.install(snapshotTree);
PopupHandler.installPopupHandler(snapshotTree, PROFILER_SNAPSHOT_GROUP_ID, ActionPlaces.UNKNOWN);
snapshotTree.setCellRenderer(new ColoredTreeCellRenderer() {
@Override
public void customizeCellRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
setIcon(value instanceof CPUSnapshotNode ? FlexProfilerIcons.SnapshotCPU : FlexProfilerIcons.LiveObjects);
if (value.toString() != null) {
append(value.toString());
}
}
});
}
Aggregations