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


Java Wrapper.setContent方法代码示例

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


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

示例1: rebuildMinimizedActions

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
private boolean rebuildMinimizedActions() {
  for (Map.Entry<GridImpl, Wrapper> entry : myMinimizedButtonsPlaceholder.entrySet()) {
    Wrapper eachPlaceholder = entry.getValue();
    ActionToolbar tb = myActionManager.createActionToolbar(ActionPlaces.DEBUGGER_TOOLBAR, myMinimizedViewActions, true);
    tb.getComponent().setBorder(null);
    tb.setReservePlaceAutoPopupIcon(false);
    JComponent minimized = tb.getComponent();
    eachPlaceholder.setContent(minimized);
  }

  myTabs.getComponent().revalidate();
  myTabs.getComponent().repaint();

  return myMinimizedViewActions.getChildrenCount() > 0;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:RunnerContentUi.java

示例2: DiffRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
public DiffRequestProcessor(@Nullable Project project, @NotNull UserDataHolder context) {
  myProject = project;

  myContext = new MyDiffContext(context);
  myActiveRequest = new LoadingDiffRequest();

  mySettings = DiffSettingsHolder.getInstance().getSettings(myContext.getUserData(DiffUserDataKeys.PLACE));

  myAvailableTools = DiffManagerEx.getInstance().getDiffTools();
  myToolOrder = new LinkedList<DiffTool>(getToolOrderFromSettings(myAvailableTools));

  // UI

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();
  myProgressBar = new MyProgressBar();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel statusPanel = JBUI.Panels.simplePanel(myToolbarStatusPanel).addToLeft(myProgressBar);
  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(statusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  JComponent bottomPanel = myContext.getUserData(DiffUserDataKeysEx.BOTTOM_PANEL);
  if (bottomPanel != null) myMainPanel.add(bottomPanel, BorderLayout.SOUTH);
  if (bottomPanel instanceof Disposable) Disposer.register(this, (Disposable)bottomPanel);

  myState = EmptyState.INSTANCE;
  myContentPanel.setContent(DiffUtil.createMessagePanel(((LoadingDiffRequest)myActiveRequest).getMessage()));

  myOpenInEditorAction = new OpenInEditorAction(new Runnable() {
    @Override
    public void run() {
      onAfterNavigate();
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:46,代码来源:DiffRequestProcessor.java

示例3: rebuildCommonActions

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
private boolean rebuildCommonActions() {
  boolean hasToolbarContent = false;
  for (Map.Entry<GridImpl, Wrapper> entry : myCommonActionsPlaceholder.entrySet()) {
    Wrapper eachPlaceholder = entry.getValue();
    List<Content> contentList = entry.getKey().getContents();

    Set<Content> contents = new HashSet<Content>();
    contents.addAll(contentList);

    DefaultActionGroup groupToBuild;
    JComponent contextComponent = null;
    if (isHorizontalToolbar() && contents.size() == 1) {
      Content content = contentList.get(0);
      groupToBuild = new DefaultActionGroup();
      if (content.getActions() != null) {
        groupToBuild.addAll(content.getActions());
        groupToBuild.addSeparator();
        contextComponent = content.getActionsContextComponent();
      }
      groupToBuild.addAll(myTopActions);
    }
    else {
      final DefaultActionGroup group = new DefaultActionGroup();
      group.addAll(myTopActions);
      groupToBuild = group;
    }

    final AnAction[] actions = groupToBuild.getChildren(null);
    if (!Arrays.equals(actions, myContextActions.get(entry.getKey()))) {
      ActionToolbar tb = myActionManager.createActionToolbar(myActionsPlace, groupToBuild, true);
      tb.getComponent().setBorder(null);
      tb.setTargetComponent(contextComponent);
      eachPlaceholder.setContent(tb.getComponent());
    }

    if (groupToBuild.getChildrenCount() > 0) {
      hasToolbarContent = true;
    }

    myContextActions.put(entry.getKey(), actions);
  }

  return hasToolbarContent;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:45,代码来源:RunnerContentUi.java

示例4: DiffRequestProcessor

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
public DiffRequestProcessor(@javax.annotation.Nullable Project project, @Nonnull UserDataHolder context) {
  myProject = project;

  myContext = new MyDiffContext(context);
  myActiveRequest = new LoadingDiffRequest();

  mySettings = DiffSettingsHolder.getInstance().getSettings(myContext.getUserData(DiffUserDataKeys.PLACE));

  myAvailableTools = DiffManagerEx.getInstance().getDiffTools();
  myToolOrder = new LinkedList<DiffTool>(getToolOrderFromSettings(myAvailableTools));

  // UI

  myMainPanel = new MyPanel();
  myContentPanel = new Wrapper();
  myToolbarPanel = new Wrapper();
  myToolbarPanel.setFocusable(true);
  myToolbarStatusPanel = new Wrapper();
  myProgressBar = new MyProgressBar();

  myPanel = JBUI.Panels.simplePanel(myMainPanel);

  JPanel statusPanel = JBUI.Panels.simplePanel(myToolbarStatusPanel).addToLeft(myProgressBar);
  JPanel topPanel = JBUI.Panels.simplePanel(myToolbarPanel).addToRight(statusPanel);

  myMainPanel.add(topPanel, BorderLayout.NORTH);
  myMainPanel.add(myContentPanel, BorderLayout.CENTER);

  myMainPanel.setFocusTraversalPolicyProvider(true);
  myMainPanel.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

  JComponent bottomPanel = myContext.getUserData(DiffUserDataKeysEx.BOTTOM_PANEL);
  if (bottomPanel != null) myMainPanel.add(bottomPanel, BorderLayout.SOUTH);
  if (bottomPanel instanceof Disposable) Disposer.register(this, (Disposable)bottomPanel);

  myState = EmptyState.INSTANCE;
  myContentPanel.setContent(DiffUtil.createMessagePanel(((LoadingDiffRequest)myActiveRequest).getMessage()));

  myOpenInEditorAction = new OpenInEditorAction(new Runnable() {
    @Override
    public void run() {
      onAfterNavigate();
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:46,代码来源:DiffRequestProcessor.java

示例5: rebuildCommonActions

import com.intellij.ui.components.panels.Wrapper; //导入方法依赖的package包/类
private boolean rebuildCommonActions() {
  boolean hasToolbarContent = false;
  for (Map.Entry<GridImpl, Wrapper> entry : myCommonActionsPlaceholder.entrySet()) {
    Wrapper eachPlaceholder = entry.getValue();
    List<Content> contentList = entry.getKey().getContents();

    Set<Content> contents = new HashSet<>();
    contents.addAll(contentList);

    DefaultActionGroup groupToBuild;
    JComponent contextComponent = null;
    if (isHorizontalToolbar() && contents.size() == 1) {
      Content content = contentList.get(0);
      groupToBuild = new DefaultActionGroup();
      if (content.getActions() != null) {
        groupToBuild.addAll(content.getActions());
        groupToBuild.addSeparator();
        contextComponent = content.getActionsContextComponent();
      }
      groupToBuild.addAll(myTopActions);
    }
    else {
      final DefaultActionGroup group = new DefaultActionGroup();
      group.addAll(myTopActions);
      groupToBuild = group;
    }

    final AnAction[] actions = groupToBuild.getChildren(null);
    if (!Arrays.equals(actions, myContextActions.get(entry.getKey()))) {
      String adjustedPlace = myActionsPlace == ActionPlaces.UNKNOWN ? ActionPlaces.TOOLBAR : myActionsPlace;
      ActionToolbar tb = myActionManager.createActionToolbar(adjustedPlace, groupToBuild, true);
      tb.getComponent().setBorder(null);
      tb.setTargetComponent(contextComponent);
      eachPlaceholder.setContent(tb.getComponent());
    }

    if (groupToBuild.getChildrenCount() > 0) {
      hasToolbarContent = true;
    }

    myContextActions.put(entry.getKey(), actions);
  }

  return hasToolbarContent;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:46,代码来源:RunnerContentUi.java


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