• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CreationToolEntry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.gef.palette.CreationToolEntry的典型用法代码示例。如果您正苦于以下问题:Java CreationToolEntry类的具体用法?Java CreationToolEntry怎么用?Java CreationToolEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CreationToolEntry类属于org.eclipse.gef.palette包,在下文中一共展示了CreationToolEntry类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
@Override
protected PaletteRoot getPaletteRoot() {
	PaletteRoot root = new PaletteRoot();
	PaletteDrawer manipGroup = new PaletteDrawer("Definitions");
	manipGroup.add(new CreationToolEntry("Add Module Type", "Add Module Type", new ModuleTypeCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Module Implementation", "Add Module Implementation", new ModuleImplementationCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Module Instance", "Add Module Instance", new ModuleInstanceCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Module Instance Property", "Add Module Instance Property", new ModuleInstancePropertyCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Module Operation", "Add Module Operation", new ModuleOperationCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Module Operation Parameter", "Add Module Operation Parameter", new ModuleOperationParameterCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Trigger Instance", "Add Trigger Instance", new TriggerInstanceNodeCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Dynamic Trigger Instance", "Add Dynamic Trigger Instance", new DynamicTriggerInstanceNodeCreationFactory(), null, null));
	manipGroup.add(new ConnectionCreationToolEntry("Add Wire", "Add Wire", new LinkCreationFactory(), null, null));
	root.add(manipGroup);
	return root;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:17,代码来源:CompImplEditor.java


示例2: createToolEntry

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
private CreationToolEntry createToolEntry(final Class<?> nodeClass,final String name,String desc,final int width,final int height){
	SimpleFactory nodeFactory=new SimpleFactory(nodeClass){
		@Override
		public Object getNewObject() {
			AbstractNodeElement node=instanceNode(nodeClass,name,width,height);
			return node;
		}
	};
	String nodeName=instanceNode(nodeClass,name,width,height).nodeName();
	NodeImageConfig config=Activator.getPreference().getNodeImageConfigByName(nodeName);
	if(config==null){
		throw new RuntimeException("当前没有为名为"+nodeName+"的节点预定义配置信息!");
	}
	ImageDescriptor descriptor=ImageDescriptor.createFromImage(config.getSmallImage());
	return new CombinedTemplateCreationEntry(name,desc,nodeFactory,descriptor,descriptor);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:GraphicalPalette.java


示例3: 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);
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:28,代码来源:ORMGraphicalEditorPalette.java


示例4: getPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
@Override
protected PaletteRoot getPaletteRoot() {
	PaletteRoot root = new PaletteRoot();
	PaletteDrawer manipGroup = new PaletteDrawer("Definitions");
	manipGroup.add(new CreationToolEntry("Add Computing Platform", "Add Computing Platform Definition", new LogicalComputingPlatformCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Computing Node", "Add Computing Node Definition", new LogicalComputingCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Logical Processor", "Add Logical Processor Definition", new LogicalProcessorsCreationFactory(), null, null));
	root.add(manipGroup);
	return root;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:11,代码来源:IntLogicalSysEditor.java


示例5: getPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
@Override
protected PaletteRoot getPaletteRoot() {
	PaletteRoot root = new PaletteRoot();
	PaletteDrawer manipGroup = new PaletteDrawer("Definitions");
	manipGroup.add(new CreationToolEntry("Add Composite Property", "Add Composite Property", new CompositePropertyNodeCreationFactory(), null, null));
	root.add(manipGroup);
	return root;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:9,代码来源:IntFinalAssemblyEditor.java


示例6: getPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
@Override
protected PaletteRoot getPaletteRoot() {
	PaletteRoot root = new PaletteRoot();
	PaletteDrawer manipGroup = new PaletteDrawer("Definitions");
	manipGroup.add(new CreationToolEntry("Add Platform Configuration", "Add Platform Configuration", new PlatformConfigurationCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Computing Node Configuration", "Add Computing Node Configuration", new ComputingNodeConfigurationCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Protection Domain", "Add Protection Domain", new ProtectionDomainCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Module Instance", "Add Module Instance", new DeployedModuleInstanceCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Trigger Instance", "Add Trigger Instance", new DeployedTriggerInstanceCreationFactory(), null, null));
	root.add(manipGroup);
	return root;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:13,代码来源:IntDeploymentEditor.java


示例7: getPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
@Override
protected PaletteRoot getPaletteRoot() {
	PaletteRoot root = new PaletteRoot();
	PaletteDrawer manipGroup = new PaletteDrawer("Definitions");
	manipGroup.add(new CreationToolEntry("Add Composite Property", "Add Composite Property", new CompositePropertyNodeCreationFactory(), null, null));
	manipGroup.add(new CreationToolEntry("Add Component", "Add Component Definition", new ComponentNodeCreationFactory(), null, null));
	manipGroup.add(new ConnectionCreationToolEntry("Add Wire", "Add Wire Definition", new LinkCreationFactory(), null, null));
	root.add(manipGroup);
	return root;
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:11,代码来源:InitAssemblyEditor.java


示例8: setupTableViewTool

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
private void setupTableViewTool(final PaletteGroup group) {
    group.add(new CreationToolEntry("Table", "Make new table object", new SimpleFactory(ERTable.class),
            Activator.getImageDescriptor(ImageKey.TABLE_NEW), Activator.getImageDescriptor(ImageKey.TABLE_NEW)));

    if (diagram.getDiagramContents().getSettings().isUseViewObject()) { // #for_erflute view is option
        group.add(new CreationToolEntry("View", "Make new view object", new SimpleFactory(ERView.class),
                Activator.getImageDescriptor(ImageKey.VIEW), Activator.getImageDescriptor(ImageKey.VIEW)));
    }
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:10,代码来源:ERDiagramPaletteRoot.java


示例9: setupNoteTool

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
private void setupNoteTool(final PaletteGroup group) {
    final CreationToolEntry noteToolEntry =
            new CreationToolEntry("Note", "Make new note for tables", new SimpleFactory(WalkerNote.class),
                    Activator.getImageDescriptor(ImageKey.NOTE), Activator.getImageDescriptor(ImageKey.NOTE));
    group.add(noteToolEntry);
    final ConnectionCreationToolEntry relationNoteTool =
            new ConnectionCreationToolEntry("Note Connection", "Connect note to tables", new SimpleFactory(CommentConnection.class),
                    Activator.getImageDescriptor(ImageKey.COMMENT_CONNECTION),
                    Activator.getImageDescriptor(ImageKey.COMMENT_CONNECTION));
    group.add(relationNoteTool);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:12,代码来源:ERDiagramPaletteRoot.java


示例10: ORMGraphicalEditorPalette

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
/**
 * The constructor of this class, where the palett is build and entryVisibility and entries
 * variables are initialized.
 * */
public ORMGraphicalEditorPalette() {

  entryVisibility = new HashMap<String, Boolean>();
  entries = new HashMap<String, CreationToolEntry>();

  addGroup();
  addSelectionTool();
   createComponentsDrawer();
   createComponentPartsDrawer();
   createConnectionsDrawer();
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:16,代码来源:ORMGraphicalEditorPalette.java


示例11: setupWalkerGroupTool

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
private void setupWalkerGroupTool(final PaletteGroup group) {
    group.add(new CreationToolEntry("Table Group", "Make new group for tables by border", new SimpleFactory(WalkerGroup.class),
            Activator.getImageDescriptor(ImageKey.CATEGORY), Activator.getImageDescriptor(ImageKey.CATEGORY)));
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:5,代码来源:ERDiagramPaletteRoot.java


示例12: addEntry

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
/**
 * This method add a palett entry with sting id/name to the entries map.
 * */
private void addEntry(final String name, final CreationToolEntry entry, final Boolean visibility) {
  entries.put(name, entry);
  setEntryVisibility(name, visibility);
}
 
开发者ID:leondart,项目名称:FRaMED,代码行数:8,代码来源:ORMGraphicalEditorPalette.java


示例13: BODesignerEditorPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
public BODesignerEditorPaletteRoot() {
	PaletteGroup group = new PaletteGroup("");

	//增加Select 图标
	PanningSelectionToolEntry selectionToolEntry = new PanningSelectionToolEntry(
			ConstantResource.LABEL_SELECT);
	selectionToolEntry.setToolClass(MovablePanningSelectionTool.class);
	selectionToolEntry.setLargeIcon(Activator.getImageDescriptor("icons/arrow16.gif"));
	selectionToolEntry.setSmallIcon(Activator.getImageDescriptor("icons/arrow16.gif"));
	group.add(selectionToolEntry);
	group.add(new CreationToolEntry("Note", "Note", 
			new SimpleFactory(NoteModel.class), 
			null, 
			null));
	
	group.add(new PaletteSeparator());
	//增加Table 图标
	group.add(new CreationToolEntry(
			ConstantResource.LABEL_TABLE, 
			ConstantResource.LABEL_CREATE_TABLE, 
			new SimpleFactory(HdbTableModel.class), 
			Activator.getImageDescriptor("icons/model_new.gif"), 
			Activator.getImageDescriptor("icons/model_new.gif")));
	group.add(new CreationToolEntry(
			ConstantResource.LABEL_VIEW, 
			ConstantResource.LABEL_CREATE_VIEW, 
			new SimpleFactory(ViewModel.class), 
			Activator.getImageDescriptor("icons/view.gif"), 
			Activator.getImageDescriptor("icons/view.gif")));
	group.add(new ConnectionCreationToolEntry("Connection",
			"Create a connection",
			null, null, null));
	
	group.add(new PaletteSeparator());
	
	//添加关系
	/*ConnectionCreationToolEntry toolEntry1N = new ConnectionCreationToolEntry(
			ConstantResource.label_relation_one_to_many,
			ConstantResource.label_create_relation_one_to_many,
			new SimpleFactory(null), Activator
					.getImageDescriptor(ImageResource.RELATION_1_N), Activator
					.getImageDescriptor(ImageResource.RELATION_1_N));
	toolEntry1N.setToolClass(null);		
	group.add(toolEntry1N);		
	
	ConnectionCreationToolEntry toolEntryNN = new ConnectionCreationToolEntry(
			ConstantResource.label_relation_many_to_many,
			ConstantResource.label_create_relation_many_to_many,
			new SimpleFactory(null), Activator
					.getImageDescriptor(ImageResource.RELATION_N_N), Activator
					.getImageDescriptor(ImageResource.RELATION_N_N));
	toolEntryNN.setToolClass(null);		
	group.add(toolEntryNN);		
	
	
	ConnectionCreationToolEntry toolEntrySelf = new ConnectionCreationToolEntry(
			ConstantResource.label_relation_self,
			ConstantResource.label_create_relation_self,
			new SimpleFactory(null), Activator
					.getImageDescriptor(ImageResource.RELATION_SELF), Activator
					.getImageDescriptor(ImageResource.RELATION_SELF));
	toolEntrySelf.setToolClass(null);		
	group.add(toolEntrySelf);
	*/		
	this.add(group);
	this.setDefaultEntry(selectionToolEntry);		
	
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:69,代码来源:BODesignerEditorPaletteRoot.java


示例14: ERDiagramPaletteRoot

import org.eclipse.gef.palette.CreationToolEntry; //导入依赖的package包/类
public ERDiagramPaletteRoot() {
    final PaletteGroup group = new PaletteGroup("");

    // when tooltip equals to label, tooltip is not displayed.
    final PanningSelectionToolEntry selectionTool = new PanningSelectionToolEntry(ResourceString.getResourceString("label.select"));
    selectionTool.setToolClass(MovablePanningSelectionTool.class);
    selectionTool.setLargeIcon(ERDiagramActivator.getImageDescriptor(ImageKey.ARROW));
    selectionTool.setSmallIcon(ERDiagramActivator.getImageDescriptor(ImageKey.ARROW));

    group.add(selectionTool);
    // group.add(new MarqueeToolEntry());

    group.add(new CreationToolEntry(ResourceString.getResourceString("label.table"), ResourceString.getResourceString("label.create.table"), new SimpleFactory(ERTable.class), ERDiagramActivator.getImageDescriptor(ImageKey.TABLE_NEW), ERDiagramActivator.getImageDescriptor(ImageKey.TABLE_NEW)));

    group.add(new CreationToolEntry(ResourceString.getResourceString("label.view"), ResourceString.getResourceString("label.create.view"), new SimpleFactory(View.class), ERDiagramActivator.getImageDescriptor(ImageKey.VIEW), ERDiagramActivator.getImageDescriptor(ImageKey.VIEW)));

    final ConnectionCreationToolEntry oneToManyTool = new ConnectionCreationToolEntry(ResourceString.getResourceString("label.relation.one.to.many"), ResourceString.getResourceString("label.create.relation.one.to.many"), new SimpleFactory(Relation.class), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_1_N), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_1_N));
    oneToManyTool.setToolClass(RelationCreationTool.class);
    group.add(oneToManyTool);

    final ConnectionCreationToolEntry relationByExistingTool = new ConnectionCreationToolEntry(ResourceString.getResourceString("label.relation.by.existing.columns"), ResourceString.getResourceString("label.create.relation.by.existing.columns"), new SimpleFactory(RelationByExistingColumns.class), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_1_N), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_1_N));
    relationByExistingTool.setToolClass(RelationByExistingColumnsCreationTool.class);
    group.add(relationByExistingTool);

    final ConnectionCreationToolEntry manyToManyTool = new ConnectionCreationToolEntry(ResourceString.getResourceString("label.relation.many.to.many"), ResourceString.getResourceString("label.create.relation.many.to.many"), new SimpleFactory(RelatedTable.class), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_N_N), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_N_N));
    manyToManyTool.setToolClass(RelatedTableCreationTool.class);
    group.add(manyToManyTool);

    final ConnectionCreationToolEntry selfRelationTool = new ConnectionCreationToolEntry(ResourceString.getResourceString("label.relation.self"), ResourceString.getResourceString("label.create.relation.self"), new SimpleFactory(SelfRelation.class), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_SELF), ERDiagramActivator.getImageDescriptor(ImageKey.RELATION_SELF));
    selfRelationTool.setToolClass(SelfRelationCreationTool.class);
    group.add(selfRelationTool);

    group.add(new PaletteSeparator());

    final CreationToolEntry noteTool = new CreationToolEntry(ResourceString.getResourceString("label.note"), ResourceString.getResourceString("label.create.note"), new SimpleFactory(Note.class), ERDiagramActivator.getImageDescriptor(ImageKey.NOTE), ERDiagramActivator.getImageDescriptor(ImageKey.NOTE));
    group.add(noteTool);

    final ConnectionCreationToolEntry commentConnectionTool = new ConnectionCreationToolEntry(ResourceString.getResourceString("label.relation.note"), ResourceString.getResourceString("label.create.relation.note"), new SimpleFactory(CommentConnection.class), ERDiagramActivator.getImageDescriptor(ImageKey.COMMENT_CONNECTION), ERDiagramActivator.getImageDescriptor(ImageKey.COMMENT_CONNECTION));
    group.add(commentConnectionTool);

    group.add(new PaletteSeparator());

    group.add(new CreationToolEntry(ResourceString.getResourceString("label.category"), ResourceString.getResourceString("label.create.category"), new SimpleFactory(Category.class), ERDiagramActivator.getImageDescriptor(ImageKey.CATEGORY), ERDiagramActivator.getImageDescriptor(ImageKey.CATEGORY)));

    group.add(new PaletteSeparator());

    group.add(new InsertImageTool());

    this.add(group);

    setDefaultEntry(selectionTool);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:53,代码来源:ERDiagramPaletteRoot.java



注:本文中的org.eclipse.gef.palette.CreationToolEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PermissionGroup类代码示例发布时间:2022-05-22
下一篇:
Java EPStatementException类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap