本文整理汇总了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;
}
示例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();
}
});
}
示例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;
}
示例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();
}
});
}
示例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;
}