if (comp instanceof DockingStub) {
tabText = ((DockingStub) comp).getTabText();
} else {
// if we can find an adapter mapping, then try to pull
// the tab text from there
DockingAdapter adapter = AdapterFactory.getAdapter(comp);
if (adapter != null)
tabText = adapter.getTabText();
}
// if 'comp' wasn't a DockingStub, or the stub returned a null tabText,
// then try the component name
if (tabText == null)