I’m trying to get my ProjectResourcePathSelector to be as pretty as the Named Query selector. Are there any tricks or do I just need to come up with my own TreeCellRenderer?
...
rampPath = new JTextField();
ProjectResourcePathSelector selector = new ProjectResourcePathSelector(context, RampResource.RESOURCE_TYPE, TextlikeComponent.of(rampPath));
rampField = new ProjectResourcePathValidatedTextField(context, rampPath, RampResource.RESOURCE_TYPE, "RampNotFound");
...
Are you looking to render named query paths in particular? Or just want fancier icons?
The actual behavior of this ProjectResourcePathSelector is in fact a custom (private ) renderer.
The icons in question, which I think you’d be able to use:
static final Icon ROOT_ICON = getRootIconScaled(NamedQueryWorkspace.class, "nav/named-query-root.png", 16);
static final Icon FOLDER_ICON = getRootIconScaled(NamedQueryWorkspace.class, "nav/folder-closed.png", 16);
static final Icon QUERY_ICON = getRootIconScaled(NamedQueryWorkspace.class, "nav/named-query.png", 16);