I'd like to change the appearance of the tab used to show a TopComponent in the
Editor mode. I have been trying to use basic HTML markup to change the color of
the text displayed by over-riding this method of the TopComponent:
@Override
public String getHtmlDisplayName()
{
String prefix=(isModified())?"*":"";
String toreturn= "<HTML><B>"+prefix+"<FONT
COLOR=RED>"+super.getDisplayName()+"</FONT></B></HTML>";
return toreturn;
}
The only HTML feature that seems to work is the "bold" indicator. I assumed
that the tab would support HTML similar to JLabel, but that doesn't appear to
be the case.
Has anyone been sucessful modifying the tab in some way? My TopComponent is a
non-singleton, so I will have multiple windows of this type populated with
different data that I'd like users to be able to distinguish easily. There are
also singleton TopComponents in my application that listen for the active
window. I was hoping to make the active relationship obvious using a color
scheme in the tab area, as that is often the only portion visible. Ideally I'd
like to be able to change the background color of the whole tab, but I'd settle
for changing the tab's text color.
Ideas or alternative suggestions always welcome.
Stephen Cumminger