@Nullable private JBTabs getTabsAt(DockableContent content, RelativePoint point) { if (content instanceof EditorTabbedContainer.DockableEditor) { JBTabs targetTabs = mySplitters.getTabsAt(point); if (targetTabs != null) { return targetTabs; } else { EditorWindow wnd = mySplitters.getCurrentWindow(); if (wnd != null) { EditorTabbedContainer tabs = wnd.getTabbedPane(); if (tabs != null) { return tabs.getTabs(); } } else { EditorWindow[] windows = mySplitters.getWindows(); for (EditorWindow each : windows) { if (each.getTabbedPane() != null && each.getTabbedPane().getTabs() != null) { return each.getTabbedPane().getTabs(); } } } } } return null; }
@Override public Image processDropOver(@NotNull DockableContent content, RelativePoint point) { JBTabs current = getTabsAt(content, point); if (myCurrentOver != null && myCurrentOver != current) { resetDropOver(content); } if (myCurrentOver == null && current != null) { myCurrentOver = current; Presentation presentation = content.getPresentation(); myCurrentOverInfo = new TabInfo(new JLabel("")).setText(presentation.getText()).setIcon(presentation.getIcon()); myCurrentOverImg = myCurrentOver.startDropOver(myCurrentOverInfo, point); } if (myCurrentOver != null) { myCurrentOver.processDropOver(myCurrentOverInfo, point); } return myCurrentOverImg; }
@Nullable private JBTabs getTabsAt(DockableContent content, RelativePoint point) { if (content instanceof EditorTabbedContainer.DockableEditor) { JBTabs targetTabs = mySplitters.getTabsAt(point); if (targetTabs != null) { return targetTabs; } else { EditorWindow wnd = mySplitters.getCurrentWindow(); if (wnd != null) { EditorTabbedContainer tabs = ((DesktopEditorWindow)wnd).getTabbedPane(); if (tabs != null) { return tabs.getTabs(); } } else { DesktopEditorWindow[] windows = mySplitters.getWindows(); for (DesktopEditorWindow each : windows) { if (each.getTabbedPane() != null && each.getTabbedPane().getTabs() != null) { return each.getTabbedPane().getTabs(); } } } } } return null; }
@Override public Image processDropOver(@Nonnull DockableContent content, RelativePoint point) { JBTabs current = getTabsAt(content, point); if (myCurrentOver != null && myCurrentOver != current) { resetDropOver(content); } if (myCurrentOver == null && current != null) { myCurrentOver = current; Presentation presentation = content.getPresentation(); myCurrentOverInfo = new TabInfo(new JLabel("")).setText(presentation.getText()).setIcon(presentation.getIcon()); myCurrentOverImg = myCurrentOver.startDropOver(myCurrentOverInfo, point); } if (myCurrentOver != null) { myCurrentOver.processDropOver(myCurrentOverInfo, point); } return myCurrentOverImg; }
@Nullable JBTabs getTabsAt(RelativePoint point) { Point thisPoint = point.getPoint(this); Component c = SwingUtilities.getDeepestComponentAt(this, thisPoint.x, thisPoint.y); while (c != null) { if (c instanceof JBTabs) { return (JBTabs)c; } c = c.getParent(); } return null; }
@Override public Image processDropOver(@NotNull DockableContent dockable, RelativePoint dropTarget) { JBTabs current = getTabsAt(dockable, dropTarget); if (myCurrentOver != null && myCurrentOver != current) { resetDropOver(dockable); } if (myCurrentOver == null && current != null) { myCurrentOver = current; Presentation presentation = dockable.getPresentation(); myCurrentOverInfo = new TabInfo(new JLabel("")).setText(presentation.getText()).setIcon(presentation.getIcon()); myCurrentOverImg = myCurrentOver.startDropOver(myCurrentOverInfo, dropTarget); } if (myCurrentOver != null) { myCurrentOver.processDropOver(myCurrentOverInfo, dropTarget); } if (myCurrentPainter == null) { myCurrentPainter = new MyDropAreaPainter(); IdeGlassPaneUtil.find(myComponent).addPainter(myComponent, myCurrentPainter, this); } myCurrentPainter.processDropOver(this, dockable, dropTarget); return myCurrentOverImg; }
@Nullable private JBTabs getTabsAt(DockableContent content, RelativePoint point) { if (content instanceof DockableGrid) { final Point p = point.getPoint(getComponent()); Component c = SwingUtilities.getDeepestComponentAt(getComponent(), p.x, p.y); while (c != null) { if (c instanceof JBRunnerTabs) { return (JBTabs)c; } c = c.getParent(); } } return null; }
@Nullable public JBTabs getTabsAt(RelativePoint point) { Point thisPoint = point.getPoint(this); Component c = SwingUtilities.getDeepestComponentAt(this, thisPoint.x, thisPoint.y); while (c != null) { if (c instanceof JBTabs) { return (JBTabs)c; } c = c.getParent(); } return null; }
private static String getComponentType(JComponent component) { return component instanceof JTree ? "tree" : component instanceof JList ? "list" : component instanceof JTable ? "table" : component instanceof JViewport ? "viewport" : component instanceof ActionToolbar ? "toolbar" : component instanceof EditorComponentImpl ? "editor" : component instanceof EditorGutterComponentEx ? "editor" : component instanceof JBLoadingPanel ? "loading" : component instanceof JBTabs ? "tabs" : component instanceof JBPanelWithEmptyText ? "panel" : component instanceof JPanel && ourKnownNames.contains(component.getName()) ? component.getName() : null; }
@Override public Image processDropOver(@Nonnull DockableContent dockable, RelativePoint dropTarget) { JBTabs current = getTabsAt(dockable, dropTarget); if (myCurrentOver != null && myCurrentOver != current) { resetDropOver(dockable); } if (myCurrentOver == null && current != null) { myCurrentOver = current; Presentation presentation = dockable.getPresentation(); myCurrentOverInfo = new TabInfo(new JLabel("")).setText(presentation.getText()).setIcon(presentation.getIcon()); myCurrentOverImg = myCurrentOver.startDropOver(myCurrentOverInfo, dropTarget); } if (myCurrentOver != null) { myCurrentOver.processDropOver(myCurrentOverInfo, dropTarget); } if (myCurrentPainter == null) { myCurrentPainter = new MyDropAreaPainter(); IdeGlassPaneUtil.find(myComponent).addPainter(myComponent, myCurrentPainter, this); } myCurrentPainter.processDropOver(this, dockable, dropTarget); return myCurrentOverImg; }
public JBTabs getTabs() { return ((JBTabsPaneImpl)myWrapper.myTabbedPane).getTabs(); }
public JBTabs getTabs() { return ((JBTabsPaneImpl)myTabbedPane).getTabs(); }
public JBTabs getTabs() { return null; }