Java 类com.intellij.ui.tabs.JBTabs 实例源码

项目:intellij-ce-playground    文件:DockableEditorTabbedContainer.java   
@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;
}
项目:intellij-ce-playground    文件:DockableEditorTabbedContainer.java   
@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;
}
项目:tools-idea    文件:DockableEditorTabbedContainer.java   
@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;
}
项目:tools-idea    文件:DockableEditorTabbedContainer.java   
@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;
}
项目:consulo    文件:DockableEditorTabbedContainer.java   
@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;
}
项目:consulo    文件:DockableEditorTabbedContainer.java   
@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;
}
项目:intellij-ce-playground    文件:EditorsSplitters.java   
@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;
}
项目:intellij-ce-playground    文件:RunnerContentUi.java   
@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;
}
项目:intellij-ce-playground    文件:RunnerContentUi.java   
@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;
}
项目:tools-idea    文件:EditorsSplitters.java   
@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;
}
项目:tools-idea    文件:RunnerContentUi.java   
@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;
}
项目:tools-idea    文件:RunnerContentUi.java   
@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;
}
项目:consulo    文件:IdeBackgroundUtil.java   
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;
}
项目:consulo    文件:DesktopEditorsSplitters.java   
@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;
}
项目:consulo    文件:RunnerContentUi.java   
@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;
}
项目:consulo    文件:RunnerContentUi.java   
@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;
}
项目:intellij-ce-playground    文件:TabbedPaneWrapper.java   
public JBTabs getTabs() {
  return ((JBTabsPaneImpl)myWrapper.myTabbedPane).getTabs();
}
项目:intellij-ce-playground    文件:TabbedPaneWrapper.java   
public JBTabs getTabs() {
  return ((JBTabsPaneImpl)myTabbedPane).getTabs();
}
项目:tools-idea    文件:TabbedPaneWrapper.java   
public JBTabs getTabs() {
  return ((JBTabsPaneImpl)myWrapper.myTabbedPane).getTabs();
}
项目:tools-idea    文件:TabbedPaneWrapper.java   
public JBTabs getTabs() {
  return ((JBTabsPaneImpl)myTabbedPane).getTabs();
}
项目:consulo    文件:TabbedPaneWrapper.java   
public JBTabs getTabs() {
  return ((JBTabsPaneImpl)myWrapper.myTabbedPane).getTabs();
}
项目:consulo    文件:TabbedPaneWrapper.java   
public JBTabs getTabs() {
  return ((JBTabsPaneImpl)myTabbedPane).getTabs();
}
项目:intellij-ce-playground    文件:MockTestResultsViewer.java   
public JBTabs getTabs() { return null; }
项目:tools-idea    文件:MockTestResultsViewer.java   
public JBTabs getTabs() { return null; }
项目:consulo    文件:MockTestResultsViewer.java   
public JBTabs getTabs() { return null; }