Search in sources :

Example 1 with DnDTarget

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();
}
Also used : TabbedContent(com.intellij.ui.content.TabbedContent) DnDTarget(com.intellij.ide.dnd.DnDTarget) Content(com.intellij.ui.content.Content) TabbedContent(com.intellij.ui.content.TabbedContent)

Aggregations

DnDTarget (com.intellij.ide.dnd.DnDTarget)1 Content (com.intellij.ui.content.Content)1 TabbedContent (com.intellij.ui.content.TabbedContent)1