Java 类com.intellij.openapi.ui.ComponentWithActions 实例源码

项目:intellij-ce-playground    文件:RunnerLayoutUiImpl.java   
@Override
@NotNull
public Content createContent(@NotNull final String contentId, @NotNull final ComponentWithActions withActions, @NotNull final String displayName,
                             @Nullable final Icon icon,
                             @Nullable final JComponent toFocus) {
  final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false);
  content.putUserData(CONTENT_TYPE, contentId);
  content.putUserData(ViewImpl.ID, contentId);
  content.setIcon(icon);
  if (toFocus != null) {
    content.setPreferredFocusableComponent(toFocus);
  }

  if (!withActions.isContentBuiltIn()) {
    content.setSearchComponent(withActions.getSearchComponent());
    content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent());
  }

  return content;
}
项目:tools-idea    文件:RunnerLayoutUiImpl.java   
@Override
@NotNull
public Content createContent(@NotNull final String contentId, @NotNull final ComponentWithActions withActions, @NotNull final String displayName,
                             @Nullable final Icon icon,
                             @Nullable final JComponent toFocus) {
  final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false);
  content.putUserData(CONTENT_TYPE, contentId);
  content.putUserData(ViewImpl.ID, contentId);
  content.setIcon(icon);
  if (toFocus != null) {
    content.setPreferredFocusableComponent(toFocus);
  }

  if (!withActions.isContentBuiltIn()) {
    content.setSearchComponent(withActions.getSearchComponent());
    content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent());
  }

  return content;
}
项目:consulo    文件:RunnerLayoutUiImpl.java   
@Override
@Nonnull
public Content createContent(@Nonnull final String contentId, @Nonnull final ComponentWithActions withActions, @Nonnull final String displayName,
                             @Nullable final Icon icon,
                             @Nullable final JComponent toFocus) {
  final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false);
  content.putUserData(CONTENT_TYPE, contentId);
  content.putUserData(ViewImpl.ID, contentId);
  content.setIcon(icon);
  if (toFocus != null) {
    content.setPreferredFocusableComponent(toFocus);
  }

  if (!withActions.isContentBuiltIn()) {
    content.setSearchComponent(withActions.getSearchComponent());
    content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent());
  }

  return content;
}
项目:intellij-ce-playground    文件:LogConsoleManagerBase.java   
public Content addAdditionalTabComponent(@NotNull AdditionalTabComponent tabComponent, @NotNull String id, @Nullable Icon icon) {
  Content logContent = getUi().createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(), icon,
                                             tabComponent.getPreferredFocusableComponent());
  myAdditionalContent.put(tabComponent, logContent);
  getUi().addContent(logContent);
  return logContent;
}
项目:consulo    文件:LogConsoleManagerBase.java   
public Content addAdditionalTabComponent(@Nonnull AdditionalTabComponent tabComponent, @Nonnull String id, @Nullable Icon icon) {
  Content logContent = getUi().createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(), icon,
                                             tabComponent.getPreferredFocusableComponent());
  myAdditionalContent.put(tabComponent, logContent);
  getUi().addContent(logContent);
  return logContent;
}
项目:intellij-ce-playground    文件:RunnerLayoutUi.java   
@NotNull
Content createContent(@NotNull String contentId, @NotNull ComponentWithActions contentWithActions, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent toFocus);
项目:intellij-ce-playground    文件:RunnerLayoutUiImpl.java   
@Override
@NotNull
public Content createContent(@NotNull String id, @NotNull JComponent component, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent focusable) {
  return createContent(id, new ComponentWithActions.Impl(component), displayName, icon, focusable);
}
项目:intellij-ce-playground    文件:MemoryMonitorView.java   
@NotNull
public ComponentWithActions createComponent() {
  return new ComponentWithActions.Impl(getToolbarActions(), null, null, null, myContentPane);
}
项目:intellij-ce-playground    文件:CpuMonitorView.java   
@NotNull
public ComponentWithActions createComponent() {
  return new ComponentWithActions.Impl(getToolbarActions(), null, null, null, myContentPane);
}
项目:google-cloud-intellij    文件:CloudDebugProcess.java   
@Override
@NotNull
public XDebugTabLayouter createTabLayouter() {
  final CloudDebugProcessHandler handler = (CloudDebugProcessHandler) getProcessHandler();

  return new XDebugTabLayouter() {
    @Override
    public void registerAdditionalContent(@NotNull RunnerLayoutUi layout) {
      layout.removeContent(layout.findContent(DebuggerContentInfo.WATCHES_CONTENT), false);

      // remove console since the cloud debugger doesn't use it
      // https://github.com/GoogleCloudPlatform/gcloud-intellij/issues/141
      Content consoleContent = layout.findContent(DebuggerContentInfo.CONSOLE_CONTENT);
      if (consoleContent != null) {
        layout.removeContent(consoleContent, false);
      }

      Content frameContent = layout.findContent(DebuggerContentInfo.FRAME_CONTENT);
      if (frameContent != null) {
        layout.removeContent(frameContent, false);
        layout.addContent(frameContent, 0, PlaceInGrid.center, false);
      }

      Content variablesContent = layout.findContent(DebuggerContentInfo.VARIABLES_CONTENT);
      if (variablesContent != null) {
        layout.removeContent(variablesContent, false);
        layout.addContent(variablesContent, 0, PlaceInGrid.right, false);
      }

      CloudDebugHistoricalSnapshots timeline = new CloudDebugHistoricalSnapshots(handler);
      timeline.onBreakpointListChanged(getProcessState());
      Content snapshots =
          layout.createContent(
              timeline.getTabTitle(),
              (ComponentWithActions) timeline,
              timeline.getTabTitle(),
              GoogleCloudToolsIcons.STACKDRIVER_DEBUGGER,
              null);
      layout.addContent(snapshots, 0, PlaceInGrid.left, false);

      layout
          .getDefaults()
          .initFocusContent(
              timeline.getTabTitle(),
              LayoutViewOptions.STARTUP,
              new LayoutAttractionPolicy.FocusOnce(false));
    }
  };
}
项目:tools-idea    文件:RunnerLayoutUi.java   
@NotNull
Content createContent(@NotNull String contentId, @NotNull ComponentWithActions contentWithActions, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent toFocus);
项目:tools-idea    文件:RunnerLayoutUiImpl.java   
@Override
@NotNull
public Content createContent(@NotNull String id, @NotNull JComponent component, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent focusable) {
  return createContent(id, new ComponentWithActions.Impl(component), displayName, icon, focusable);
}
项目:tools-idea    文件:LogConsoleManagerBase.java   
protected Content createLogContent(AdditionalTabComponent tabComponent, String id, Icon icon) {
  return getUi().createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(), icon,
                               tabComponent.getPreferredFocusableComponent());
}
项目:consulo    文件:RunnerLayoutUi.java   
@Nonnull
Content createContent(@Nonnull String contentId, @Nonnull ComponentWithActions contentWithActions, @Nonnull String displayName, @Nullable Icon icon, @Nullable JComponent toFocus);
项目:consulo    文件:RunnerLayoutUiImpl.java   
@Override
@Nonnull
public Content createContent(@Nonnull String id, @Nonnull JComponent component, @Nonnull String displayName, @Nullable Icon icon, @Nullable JComponent focusable) {
  return createContent(id, new ComponentWithActions.Impl(component), displayName, icon, focusable);
}