当前位置: 首页>>代码示例>>Java>>正文


Java ToolWindow.getComponent方法代码示例

本文整理汇总了Java中com.intellij.openapi.wm.ToolWindow.getComponent方法的典型用法代码示例。如果您正苦于以下问题:Java ToolWindow.getComponent方法的具体用法?Java ToolWindow.getComponent怎么用?Java ToolWindow.getComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.wm.ToolWindow的用法示例。


在下文中一共展示了ToolWindow.getComponent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateToolWindows

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
public static void updateToolWindows() {
  for (Project project : ProjectManager.getInstance().getOpenProjects()) {
    final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
    for (String id : toolWindowManager.getToolWindowIds()) {
      final ToolWindow toolWindow = toolWindowManager.getToolWindow(id);
      for (Content content : toolWindow.getContentManager().getContents()) {
        final JComponent component = content.getComponent();
        if (component != null) {
          IJSwingUtilities.updateComponentTreeUI(component);
        }
      }
      final JComponent c = toolWindow.getComponent();
      if (c != null) {
        IJSwingUtilities.updateComponentTreeUI(c);
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:LafManagerImpl.java

示例2: createToolWindowContent

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
    this.initTree();
    this.initButton();
    JComponent component = toolWindow.getComponent();
    component.getParent().add(jpMain);
}
 
开发者ID:sh4d0w28,项目名称:intellij-codeception-integration,代码行数:8,代码来源:FormMain.java

示例3: isDescendingFromTemporarilyFocusableToolWindow

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
private boolean isDescendingFromTemporarilyFocusableToolWindow(@Nullable Component component) {
  if (component == null || myProject == null || myProject.isDisposed()) return false;

  ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(myProject);
  ToolWindow toolWindow = toolWindowManager.getToolWindow(toolWindowManager.getActiveToolWindowId());
  JComponent toolWindowComponent = toolWindow != null ? toolWindow.getComponent() : null;
  return toolWindowComponent != null &&
         toolWindowComponent.getClientProperty(TEMPORARILY_FOCUSABLE_COMPONENT_KEY) != null &&
         SwingUtilities.isDescendingFrom(component, toolWindowComponent);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ChooseByNameBase.java

示例4: findResizerAndComponent

import com.intellij.openapi.wm.ToolWindow; //导入方法依赖的package包/类
@Nullable
private Pair<Resizer, Component> findResizerAndComponent(ToolWindow wnd) {
  if (!wnd.isVisible()) return null;

  Resizer resizer = null;
  Component cmp = null;

  if (wnd.getType() == ToolWindowType.DOCKED) {
    cmp = getComponentAt(wnd.getAnchor());

    if (cmp != null) {
      if (wnd.getAnchor().isHorizontal()) {
        resizer = myVerticalSplitter.getFirstComponent() == cmp
                  ? new Resizer.Splitter.FirstComponent(myVerticalSplitter)
                  : new Resizer.Splitter.LastComponent(myVerticalSplitter);
      }
      else {
        resizer = myHorizontalSplitter.getFirstComponent() == cmp
                  ? new Resizer.Splitter.FirstComponent(myHorizontalSplitter)
                  : new Resizer.Splitter.LastComponent(myHorizontalSplitter);
      }
    }
  }
  else if (wnd.getType() == ToolWindowType.SLIDING) {
    cmp = wnd.getComponent();
    while (cmp != null) {
      if (cmp.getParent() == myLayeredPane) break;
      cmp = cmp.getParent();
    }

    if (cmp != null) {
      if (wnd.getAnchor() == ToolWindowAnchor.TOP) {
        resizer = new Resizer.LayeredPane.Top(cmp);
      }
      else if (wnd.getAnchor() == ToolWindowAnchor.BOTTOM) {
        resizer = new Resizer.LayeredPane.Bottom(cmp);
      }
      else if (wnd.getAnchor() == ToolWindowAnchor.LEFT) {
        resizer = new Resizer.LayeredPane.Left(cmp);
      }
      else if (wnd.getAnchor() == ToolWindowAnchor.RIGHT) {
        resizer = new Resizer.LayeredPane.Right(cmp);
      }
    }
  }

  return resizer != null ? Pair.create(resizer, cmp) : null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:49,代码来源:ToolWindowsPane.java


注:本文中的com.intellij.openapi.wm.ToolWindow.getComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。