void (@NotNull TabInfo info) { info.setDragOutDelegate(new TabInfo.DragOutDelegate() { private DragSession mySession; @Override public void dragOutStarted(@NotNull MouseEvent mouseEvent, @NotNull TabInfo info) { WindowFrameDockableContent content = new WindowFrameDockableContent(WindowTabsComponent.this, info, getInfoToLabel().get(info)); info.setHidden(true); DockManagerImpl manager = getDockManager(); updateDockContainers(manager); mySession = manager.createDragSession(mouseEvent, content); } @Override public void processDragOut(@NotNull MouseEvent event, @NotNull TabInfo source) { mySession.process(event); } @Override public void dragOutFinished(@NotNull MouseEvent event, TabInfo source) { mySession.process(event); mySession = null; } @Override public void dragOutCancelled(TabInfo source) { mySession.cancel(); mySession = null; source.setHidden(false); if (getIndexOf(source) != -1) { moveTabToNewIndex(source); } } }); info.setDragDelegate(new TabInfo.DragDelegate() { @Override public void dragStarted(@NotNull MouseEvent mouseEvent) { WindowTabsComponent.this.setComponentZOrder(getTabLabel(info), 0); } @Override public void dragFinishedOrCanceled() { WindowTabsComponent.this.setComponentZOrder(getTabLabel(getSelectedInfo()), 0); } }); }