本文整理汇总了Java中org.eclipse.jface.resource.ImageDescriptor.createFromFile方法的典型用法代码示例。如果您正苦于以下问题:Java ImageDescriptor.createFromFile方法的具体用法?Java ImageDescriptor.createFromFile怎么用?Java ImageDescriptor.createFromFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.resource.ImageDescriptor
的用法示例。
在下文中一共展示了ImageDescriptor.createFromFile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeDescriptor
import org.eclipse.jface.resource.ImageDescriptor; //导入方法依赖的package包/类
private ImageDescriptor makeDescriptor ( final String icon )
{
if ( "info".equalsIgnoreCase ( icon ) )
{
return ImageDescriptor.createFromFile ( SystemMessageExtension.class, "icons/information.png" );
}
else if ( "warning".equalsIgnoreCase ( icon ) )
{
return ImageDescriptor.createFromFile ( SystemMessageExtension.class, "icons/exclamation.png" );
}
return ImageDescriptor.getMissingImageDescriptor ();
}
示例2: createConsoles
import org.eclipse.jface.resource.ImageDescriptor; //导入方法依赖的package包/类
private void createConsoles() {
ConsolePlugin consolePlugin = ConsolePlugin.getDefault();
IConsoleManager consoleManager = consolePlugin.getConsoleManager();
stdoutConsole = new MessageConsole("Stdout", ImageDescriptor.createFromFile(getClass(), "/consoles/stdout.gif"));
stdoutConsole.setTabWidth(TAB_WIDTH);
stdoutConsoleStream = stdoutConsole.newMessageStream();
stderrConsoleStream = stdoutConsole.newMessageStream();
stderrConsoleStream.setColor(stderrConsoleStreamColor);
engineConsole = new MessageConsole("Engine", ImageDescriptor.createFromFile(getClass(), "/consoles/engine.gif"));
engineConsole.setTabWidth(TAB_WIDTH);
engineConsoleStream = engineConsole.newMessageStream();
consoleManager.addConsoles(new IConsole[] {
engineConsole,
stdoutConsole
});
consolePipes = new ConsolePipes();
debugConsoleStream = new MessageConsoleStream(engineConsole) {
@Override
public void write(String str) throws IOException {
if (str.endsWith("\n")) {
str = str.substring(0, str.length() - 1);
}
Engine.logStudio.info("[debug] " + str);
}
};
}
示例3: RemoveAction
import org.eclipse.jface.resource.ImageDescriptor; //导入方法依赖的package包/类
public RemoveAction ( final RealtimeListAdapter view )
{
super ( Messages.RemoveAction_Name, ImageDescriptor.createFromFile ( RemoveAction.class, "icons/delete_obj.gif" ) );
this.view = view;
}