本文整理汇总了Java中org.eclipse.gef.palette.CreationToolEntry.setSmallIcon方法的典型用法代码示例。如果您正苦于以下问题:Java CreationToolEntry.setSmallIcon方法的具体用法?Java CreationToolEntry.setSmallIcon怎么用?Java CreationToolEntry.setSmallIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gef.palette.CreationToolEntry
的用法示例。
在下文中一共展示了CreationToolEntry.setSmallIcon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createComponentPartsDrawer
import org.eclipse.gef.palette.CreationToolEntry; //导入方法依赖的package包/类
/**
* This method creates the palett entrys for the creation of {@link NamedElement}s (Attributes and
* Operations) and adds them to palett.
*/
private void createComponentPartsDrawer() {
PaletteDrawer drawer = new PaletteDrawer("Parts");
CreationToolEntry entry1 =
new CreationToolEntry("Operation", "Create a new Operation", new ORMOperationFactory(), null, null);
entry1.setToolClass(CreationAndDirectEditTool.class);
entry1.setSmallIcon(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
"icons/EOperation.gif"));
drawer.add(entry1);
addEntry("Methode", entry1, true);
CreationToolEntry entry2 =
new CreationToolEntry("Attribute", "Create a new Attribute", new ORMAttributeFactory(),
null, null);
entry2.setToolClass(CreationAndDirectEditTool.class);
entry2.setSmallIcon(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID,
"icons/EAttribute.gif"));
drawer.add(entry2);
addEntry("Attribute", entry2, true);
group.add(drawer);
}