本文整理汇总了Java中com.intellij.ui.content.Content.setIcon方法的典型用法代码示例。如果您正苦于以下问题:Java Content.setIcon方法的具体用法?Java Content.setIcon怎么用?Java Content.setIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.ui.content.Content
的用法示例。
在下文中一共展示了Content.setIcon方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@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;
}
示例2: createConsoleContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private Content createConsoleContent(final ConsoleView console, final String title, final String description) {
final Content content = new ContentImpl(createConsolePanel(console), description, true);
content.setTabName(title);
content.setDisplayName(title);
content.setIcon(HybrisIcons.HYBRIS_ICON);
return content;
}
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:8,代码来源:ConsoleToolWindowUtil.java
示例3: createToolWindowContent
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
final ToolWindowPanel toolWindowPanel = new ToolWindowPanel(project);
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
Content content = contentFactory.createContent(toolWindowPanel, project.getName(), false);
content.setIcon(Icons.LIVINGDOC);
content.putUserData(ToolWindow.SHOW_CONTENT_ICON, Boolean.TRUE);
content.setCloseable(true);
toolWindow.getContentManager().addContent(content);
}
示例4: updateContentWithInfo
import com.intellij.ui.content.Content; //导入方法依赖的package包/类
private static void updateContentWithInfo(Content content, PreviewInfo info) {
content.putUserData(ToolWindow.SHOW_CONTENT_ICON, Boolean.TRUE);
content.putUserData(INFO_KEY, info);
content.setIcon(info.getIcon());
content.setPopupIcon(info.getIcon());
}