本文整理匯總了Java中org.eclipse.ui.ISharedImages.getImageDescriptor方法的典型用法代碼示例。如果您正苦於以下問題:Java ISharedImages.getImageDescriptor方法的具體用法?Java ISharedImages.getImageDescriptor怎麽用?Java ISharedImages.getImageDescriptor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.ISharedImages
的用法示例。
在下文中一共展示了ISharedImages.getImageDescriptor方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getItem
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private IContributionItem getItem(String actionId, String commandId,
String image, String disabledImage, String label, String tooltip,
String helpContextId) {
ISharedImages sharedImages = getWindow().getWorkbench()
.getSharedImages();
IActionCommandMappingService acms = (IActionCommandMappingService) getWindow()
.getService(IActionCommandMappingService.class);
acms.map(actionId, commandId);
CommandContributionItemParameter commandParm = new CommandContributionItemParameter(
getWindow(), actionId, commandId, null,
sharedImages.getImageDescriptor(image),
sharedImages.getImageDescriptor(disabledImage), null, label,
null, tooltip, CommandContributionItem.STYLE_PUSH, null, false);
return new CommandContributionItem(commandParm);
}
示例2: getItem
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private IContributionItem getItem(String actionId, String commandId,
String image, String disabledImage, String label, String tooltip,
String helpContextId)
{
ISharedImages sharedImages = getWindow().getWorkbench().getSharedImages();
IActionCommandMappingService acms =
(IActionCommandMappingService) getWindow().getService(
IActionCommandMappingService.class);
acms.map(actionId, commandId);
CommandContributionItemParameter commandParm =
new CommandContributionItemParameter(getWindow(), actionId, commandId,
null, sharedImages.getImageDescriptor(image),
sharedImages.getImageDescriptor(disabledImage), null, label, null,
tooltip, CommandContributionItem.STYLE_PUSH, null, false);
return new CommandContributionItem(commandParm);
}
示例3: prepareExportMenu
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
protected MenuManager prepareExportMenu(ISharedImages sharedImages) {
final MenuManager exportMenu =
new MenuManager(DisplayMessages.getMessage("action.title.export"), sharedImages.getImageDescriptor("IMG_ETOOL_EXPORT_WIZ"),
"Export");
exportMenu.add(getAction(ExportToDDLAction.ID));
exportMenu.add(getAction(ExportToImageAction.ID));
// #deleted
//exportMenu.add(this.getAction(ExportToExcelAction.ID));
//exportMenu.add(this.getAction(ExportToHtmlAction.ID));
//exportMenu.add(this.getAction(ExportToDictionaryAction.ID));
//exportMenu.add(this.getAction(ExportToTranslationDictionaryAction.ID));
//exportMenu.add(this.getAction(ExportToTestDataAction.ID));
//exportMenu.add(this.getAction(ExportToJavaAction.ID));
exportMenu.add(new GroupMarker("export"));
return exportMenu;
}
示例4: ErrorImageComposite
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
/**
* Creates a new {@link ErrorImageComposite}
*
* @param baseImage the base image to overlay an icon on top of
* @param warning if true, add a warning icon, otherwise an error icon
*/
public ErrorImageComposite(Image baseImage, boolean warning) {
mBaseImage = baseImage;
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
mErrorImageDescriptor = sharedImages.getImageDescriptor(
warning ? IMG_DEC_FIELD_WARNING : IMG_DEC_FIELD_ERROR);
if (mErrorImageDescriptor == null) {
mErrorImageDescriptor = sharedImages.getImageDescriptor(
warning ? IMG_OBJS_WARN_TSK : IMG_OBJS_ERROR_TSK);
}
mSize = new Point(baseImage.getBounds().width, baseImage.getBounds().height);
}
示例5: updateFwdBackButtons
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
/**
* updateFwdBackButtons() will grey-out or make visible the step forward/backward buttons based
* on the current frame + entry context.
* @param stackBrowserView the view object (for context)
*/
private void updateFwdBackButtons(StackBrowserView stackBrowserView){
// Eclipse's shared images
ISharedImages images = PlatformUI.getWorkbench().getSharedImages();
// determine which of the fwd/bwd buttons should be enabled
ImageDescriptor fwd;
boolean fwdEnabled;
ImageDescriptor bwd;
boolean bwdEnabled;
final FrameModel frame = stackBrowserView.currentFrame;
if(!localAction.isChecked() || frame == null || stackBrowserView.currentPathEntry < 1){
fwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED);
fwdEnabled = false;
}
else{
fwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD);
fwdEnabled = true;
}
if(!localAction.isChecked() || frame == null || !frame.hasChildren() ||
stackBrowserView.currentPathEntry > frame.getChildren().length-2){
bwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED);
bwdEnabled = false;
}
else{
bwd = images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK);
bwdEnabled = true;
}
forwardAction.setImageDescriptor(fwd);
forwardAction.setEnabled(fwdEnabled);
backwardAction.setImageDescriptor(bwd);
backwardAction.setEnabled(bwdEnabled);
}
示例6: getDebugTargetWarningImage
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private Image getDebugTargetWarningImage(BfDebugTarget debugTarget) {
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
ImageDescriptor warningOverlay = sharedImages.getImageDescriptor(ISharedImages.IMG_DEC_FIELD_WARNING);
ImageDescriptor targetDescriptor = DebugUITools.getDefaultImageDescriptor(debugTarget);
if (this.overlayedImages.containsKey(targetDescriptor)) {
return this.overlayedImages.get(targetDescriptor);
}
Image targetImage = targetDescriptor.createImage();
this.disposeImages.add(targetImage);
ImageDescriptor all = new DecorationOverlayIcon(targetImage, warningOverlay, IDecoration.TOP_LEFT);
Image overlayedImage = all.createImage();
this.disposeImages.add(overlayedImage);
this.overlayedImages.put(targetDescriptor, overlayedImage);
return overlayedImage;
}
示例7: prepareImportMenu
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private MenuManager prepareImportMenu(final ISharedImages sharedImages) {
final MenuManager importMenu = new MenuManager("Import", sharedImages.getImageDescriptor("IMG_ETOOL_IMPORT_WIZ"), "Import");
importMenu.add(getAction(ImportFromDBAction.ID));
// #deleted only from DB
//importMenu.add(getAction(ImportFromFileAction.ID));
return importMenu;
}
示例8: prepareImportMenu
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private MenuManager prepareImportMenu(final ISharedImages sharedImages) {
final String message = "Import";
final MenuManager importMenu = new MenuManager(message, sharedImages.getImageDescriptor("IMG_ETOOL_IMPORT_WIZ"), "Import");
importMenu.add(getAction(ImportFromDBAction.ID));
importMenu.add(getAction(ImportFromFileAction.ID));
return importMenu;
}
示例9: prepareExportMenu
import org.eclipse.ui.ISharedImages; //導入方法依賴的package包/類
private MenuManager prepareExportMenu(final ISharedImages sharedImages) {
final String message = "Export";
final MenuManager exportMenu = new MenuManager(message, sharedImages.getImageDescriptor("IMG_ETOOL_EXPORT_WIZ"), "Export");
exportMenu.add(getAction(ExportToDDLAction.ID));
exportMenu.add(getAction(ExportToImageAction.ID));
exportMenu.add(new GroupMarker("export"));
return exportMenu;
}