本文整理汇总了Java中org.eclipse.ui.internal.WorkbenchImages类的典型用法代码示例。如果您正苦于以下问题:Java WorkbenchImages类的具体用法?Java WorkbenchImages怎么用?Java WorkbenchImages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WorkbenchImages类属于org.eclipse.ui.internal包,在下文中一共展示了WorkbenchImages类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: changeWorkbenchImages
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
/**
* There is no official method/extension point for replacing the shared
* workbench images. Thus, we access the internal WorkbenchImages class here
* and replace some images with our own here.
*/
private void changeWorkbenchImages() {
try {
WorkbenchImages.declareImage(
IWorkbenchGraphicConstants.IMG_WIZBAN_IMPORT_WIZ,
RcpActivator.getImageDescriptor("icons/wizard/import.png"),
true);
WorkbenchImages.declareImage(
IWorkbenchGraphicConstants.IMG_WIZBAN_EXPORT_WIZ,
RcpActivator.getImageDescriptor("icons/wizard/export.png"),
true);
WorkbenchImages.declareImage(
ISharedImages.IMG_OBJ_FOLDER,
RcpActivator.getImageDescriptor("icons/folder_open.png"),
true);
} catch (Exception e) {
Logger log = LoggerFactory.getLogger(getClass());
log.error("failed to patch workbench images", e);
}
}
开发者ID:GreenDelta,项目名称:olca-app,代码行数:25,代码来源:RcpWorkbenchAdvisor.java
示例2: getImage
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
private Image getImage(Object element) {
if (element instanceof ItemsListSeparator) {
return WorkbenchImages
.getImage(IWorkbenchGraphicConstants.IMG_OBJ_SEPARATOR);
}
return provider.getImage(element);
}
开发者ID:tlaplus,项目名称:tlaplus,代码行数:9,代码来源:FilteredItemsSelectionDialog.java
示例3: init
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.projectTemplateSection.setSelection(selection);
String imageName = projectTemplate.getLargeIcon().getId();
setDefaultPageImageDescriptor(WorkbenchImages.getImageDescriptor(imageName));
setWindowTitle("New " + projectTemplate.getName());
}
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:9,代码来源:ProjectTemplateWizard.java
示例4: declareImageDescriptors
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
private void declareImageDescriptors() {
/* this code is neccessary at this time because certain eclipse
resources have been removed from other places. */
final ImageDescriptor errorImageDescriptor
= imageDescriptorFromPlugin(IDEWorkbenchPlugin
.IDE_WORKBENCH, "icons/full/obj16/error_tsk.gif");
final ImageDescriptor warningImageDescriptor
= imageDescriptorFromPlugin(IDEWorkbenchPlugin
.IDE_WORKBENCH, "icons/full/obj16/warn_tsk.gif");
/*
final ImageDescriptor infoImageDescriptor
= imageDescriptorFromPlugin(IDEWorkbenchPlugin
.IDE_WORKBENCH, "icons/full/obj16/info_tsk.gif");
*/
final boolean shared = true;
WorkbenchImages.declareImage(IDEInternalWorkbenchImages
.IMG_OBJS_ERROR_PATH, errorImageDescriptor, shared);
WorkbenchImages.declareImage(IDEInternalWorkbenchImages
.IMG_OBJS_WARNING_PATH, warningImageDescriptor, shared);
/*
WorkbenchImages.declareImage(IDEInternalWorkbenchImages
.IMG_OBJS_INFO_PATH, infoImageDescriptor, shared);
*/
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:32,代码来源:EditorPlugin.java
示例5: create
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
public IWorkbenchAction create(IWorkbenchWindow window) {
if (window == null) {
throw new IllegalArgumentException();
}
RetargetAction action = new RetargetAction(getId(),
WorkbenchMessages.Workbench_print);
action.setToolTipText(WorkbenchMessages.Workbench_printToolTip);
window.getPartService().addPartListener(action);
action.setActionDefinitionId(getCommandId());
action.setImageDescriptor(WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_ETOOL_PRINT_EDIT));
action.setDisabledImageDescriptor(WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_ETOOL_PRINT_EDIT_DISABLED));
return action;
}
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:16,代码来源:ActionFactory.java
示例6: getImageDescriptor
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
/**
* Returns an image descriptor for this file system element
*/
public ImageDescriptor getImageDescriptor(Object object) {
if (isDirectory()) {
return WorkbenchImages
.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
} else {
return WorkbenchPlugin.getDefault().getEditorRegistry()
.getImageDescriptor(name);
//TODO: what are the implications for content types? Should I guess?
}
}
开发者ID:kelvinst,项目名称:psf-import,代码行数:14,代码来源:FileElement.java
示例7: HostPagePathLabelProvider
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
public HostPagePathLabelProvider() {
image = WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FOLDER);
}
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:4,代码来源:HostPagePathSelectionDialog.java
示例8: addImage
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
private void addImage(ProjectTemplateIcon icon, ProjectTemplate template) {
if (icon.getUrl() != null && template.getId().equals(icon.getTemplateId())) {
ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(icon.getUrl());
WorkbenchImages.declareImage(icon.getId(), imageDescriptor, false);
}
}
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:7,代码来源:ProjectTemplateExtensionLoader.java
示例9: removeImage
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
private void removeImage(ProjectTemplateIcon icon, ProjectTemplate template) {
if (icon.getUrl() != null && template.getId().equals(icon.getTemplateId())) {
WorkbenchImages.getDescriptors().remove(icon.getId());
}
}
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:6,代码来源:ProjectTemplateExtensionLoader.java
示例10: createCollaborationPart
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
public void createCollaborationPart(Composite parent) {
collaborationGroup = new Group(parent, SWT.NONE);
GridLayout gridLayout = new GridLayout();
collaborationGroup.setLayout(gridLayout);
gridLayout.numColumns = 2;
collaborationGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
collaborationGroup.setText("Collaboration");
Label proposedByLabel = new Label(collaborationGroup, SWT.NONE);
proposedByLabel.setText("Proposed by");
Composite proposedAndButton = new Composite(collaborationGroup, SWT.NONE);
GridLayout gridLayout2 = new GridLayout();
proposedAndButton.setLayout(gridLayout2);
gridLayout2.numColumns = 2;
proposedAndButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
proposedByText = new Text(proposedAndButton, SWT.BORDER | SWT.SINGLE | SWT.READ_ONLY);
proposedByText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
proposedByText.setText("");
saveButton = new Button(proposedAndButton, SWT.BORDER | SWT.PUSH);
saveButton.setText("");
saveButton.setImage(WorkbenchImages.getImage(ISharedImages.IMG_ETOOL_SAVE_EDIT));
Label rationaleLabel = new Label(collaborationGroup, SWT.NONE);
rationaleLabel.setText("Rationale");
rationaleText = new Text(collaborationGroup, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI | SWT.WRAP);
rationaleText.setText("");
rationaleText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
Label votesAgreeLabel = new Label(collaborationGroup, SWT.NONE);
votesAgreeLabel.setText("Votes Agree:");
votesAgreeText = new Text(collaborationGroup, SWT.BORDER | SWT.READ_ONLY);
GridData gridData1 = new GridData();
gridData1.horizontalAlignment = SWT.FILL;
votesAgreeText.setLayoutData(gridData1);
Label votesDisagreeLabel = new Label(collaborationGroup, SWT.NONE);
votesDisagreeLabel.setText("Votes Disagree");
votesDisagreeText = new Text(collaborationGroup, SWT.BORDER | SWT.READ_ONLY);
votesDisagreeText.setLayoutData(gridData1);
parent.layout(true);
}
开发者ID:SOM-Research,项目名称:collaboro,代码行数:46,代码来源:CollaborationView.java
示例11: SynsAction
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
public SynsAction() {
ImageDescriptor imageDesc = WorkbenchImages
.getImageDescriptor(IWorkbenchGraphicConstants.IMG_DTOOL_NEW_FASTVIEW);
setHoverImageDescriptor(imageDesc);
this.setToolTipText("同步");
}
开发者ID:winture,项目名称:wt-studio,代码行数:7,代码来源:NoteActionGroup.java
示例12: BooksAction
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
public BooksAction() {
ImageDescriptor imageDesc = WorkbenchImages
.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_EXPORT_WIZ);
setHoverImageDescriptor(imageDesc);
this.setToolTipText("笔记本");
}
开发者ID:winture,项目名称:wt-studio,代码行数:7,代码来源:NoteActionGroup.java
示例13: getImageDescriptor
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
@Override
public ImageDescriptor getImageDescriptor() {
return WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
}
开发者ID:aktion-hip,项目名称:relations,代码行数:5,代码来源:WizardCollectionElement.java
示例14: getImageDescriptor
import org.eclipse.ui.internal.WorkbenchImages; //导入依赖的package包/类
@Override
public ImageDescriptor getImageDescriptor(final Object object) {
return WorkbenchImages.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
}
开发者ID:aktion-hip,项目名称:relations,代码行数:5,代码来源:Category.java
注:本文中的org.eclipse.ui.internal.WorkbenchImages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论