use of com.intellij.ide.dnd.DnDTarget in project intellij-community by JetBrains.
the class TabContentLayout method contentAdded.
@Override
public void contentAdded(ContentManagerEvent event) {
final Content content = event.getContent();
final ContentTabLabel tab;
if (content instanceof TabbedContent) {
tab = new TabbedContentTabLabel((TabbedContent) content, this);
} else {
tab = new ContentTabLabel(content, this);
}
myTabs.add(event.getIndex(), tab);
myContent2Tabs.put(content, tab);
if (content instanceof DnDTarget) {
DnDTarget target = (DnDTarget) content;
DnDSupport.createBuilder(tab).setDropHandler(target).setTargetChecker(target).install();
}
myCached.clear();
}
Aggregations