当前位置: 首页>>代码示例>>Java>>正文


Java PanningSelectionToolEntry类代码示例

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


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

示例1: GraphicalPalette

import org.eclipse.gef.palette.PanningSelectionToolEntry; //导入依赖的package包/类
public GraphicalPalette(){
	PaletteDrawer tools=new PaletteDrawer("节点列表");
	PanningSelectionToolEntry selectionTool=new PanningSelectionToolEntry();
	tools.add(selectionTool);
	this.setDefaultEntry(selectionTool);
	ImageDescriptor transitionDescriptor=ImageDescriptor.createFromImage(Activator.getImageFromPlugin(Constants.TRANSITION_NODE_ICON_SMALL));
	ConnectionCreationToolEntry connection=new ConnectionCreationToolEntry("Transition","Create a Transition",null,transitionDescriptor,transitionDescriptor);
	tools.add(connection);
	tools.add(this.createToolEntry(StartNode.class,"Start","Create a start node",70,40));
	tools.add(this.createToolEntry(EndNode.class,"End","Create a end node",70,40));
	tools.add(this.createToolEntry(TaskNode.class,"Task","Create a task node",80,40));
	tools.add(this.createToolEntry(ForkNode.class,"Fork","Create a fork node",80,40));
	tools.add(this.createToolEntry(JoinNode.class,"Join","Create a join node",80,40));
	tools.add(this.createToolEntry(ForeachNode.class,"Foreach","Create a foreach node",80,40));
	tools.add(this.createToolEntry(DecisionNode.class,"Decision","Create a decision node",80,40));
	tools.add(this.createToolEntry(SubprocessNode.class,"Subprocess","Create a subprocess node",100,40));
	tools.add(this.createToolEntry(EndCancelNode.class,"End Cancel","Create a end cancel node",100,40));
	tools.add(this.createToolEntry(EndErrorNode.class,"End Error","Create a end error node",100,40));
	tools.add(this.createToolEntry(StateNode.class,"State","Create a state node",80,40));
	tools.add(this.createToolEntry(CustomNode.class,"Custom","Create a custom node",80,40));
	this.add(tools);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:23,代码来源:GraphicalPalette.java

示例2: createPaletteRoot

import org.eclipse.gef.palette.PanningSelectionToolEntry; //导入依赖的package包/类
/**
 * @generated NOT
 */
protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {

	PaletteRoot root = createPaletteRootGen(existingPaletteRoot);
	ModelRel modelRel = (ModelRel) this.getDiagram().getElement();
	if (!modelRel.isInstancesLevel()) {
		for (Object paletteContainer : root.getChildren()) {
			for (Object paletteEntry : ((PaletteContainer) paletteContainer)
					.getChildren()) {
				if (paletteEntry instanceof ToolEntry
						&& !(paletteEntry instanceof PanningSelectionToolEntry || paletteEntry instanceof PaletteToolEntry)) {
					((ToolEntry) paletteEntry)
							.setLabel(((ToolEntry) paletteEntry).getLabel() + " " + modelRel.getLevel().toString().charAt(0) + modelRel.getLevel().toString().toLowerCase().substring(1));
					((ToolEntry) paletteEntry)
							.setDescription(((ToolEntry) paletteEntry)
									.getDescription() + " " + modelRel.getLevel().toString().charAt(0) + modelRel.getLevel().toString().toLowerCase().substring(1));
				}
			}
		}
	}

	return root;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:26,代码来源:MIDDiagramEditor.java

示例3: setupSelectionTool

import org.eclipse.gef.palette.PanningSelectionToolEntry; //导入依赖的package包/类
private PanningSelectionToolEntry setupSelectionTool(final PaletteGroup group) {
    final PanningSelectionToolEntry entry = new PanningSelectionToolEntry(DisplayMessages.getMessage("label.select"));
    entry.setToolClass(MovablePanningSelectionTool.class);
    entry.setLargeIcon(Activator.getImageDescriptor(ImageKey.ARROW));
    entry.setSmallIcon(Activator.getImageDescriptor(ImageKey.ARROW));
    group.add(entry);
    return entry;
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:9,代码来源:ERDiagramPaletteRoot.java

示例4: ERDiagramPaletteRoot

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

    final PanningSelectionToolEntry selectionToolEntry = setupSelectionTool(group);
    // what is this? by jflute
    // group.add(new MarqueeToolEntry());

    setupTableViewTool(group);

    // #deleted relationship creating new column is implemented as option of "1:n relationship"
    //final ConnectionCreationToolEntry toolEntry1 =
    //        new ConnectionCreationToolEntry("1:n new column", DisplayMessages.getMessage("label.create.relation.one.to.many"),
    //                new SimpleFactory(Relationship.class), Activator.getImageDescriptor(ImageKey.RELATION_1_N),
    //                Activator.getImageDescriptor(ImageKey.RELATION_1_N));
    //toolEntry1.setToolClass(RelationCreationTool.class);
    //group.add(toolEntry1);

    final ConnectionCreationToolEntry toolEntry2 =
            new ConnectionCreationToolEntry("1:n Relationship", "Make relationship of tables", new SimpleFactory(
                    RelationByExistingColumns.class), Activator.getImageDescriptor(ImageKey.RELATION_1_N),
                    Activator.getImageDescriptor(ImageKey.RELATION_1_N));
    toolEntry2.setToolClass(RelationByExistingColumnsCreationTool.class);
    group.add(toolEntry2);

    // #deleted unneeded by jflute
    //final ConnectionCreationToolEntry toolEntry3 =
    //        new ConnectionCreationToolEntry(DisplayMessages.getMessage("label.relation.many.to.many"),
    //                DisplayMessages.getMessage("label.create.relation.many.to.many"), new SimpleFactory(RelatedTable.class),
    //                Activator.getImageDescriptor(ImageKey.RELATION_N_N), Activator.getImageDescriptor(ImageKey.RELATION_N_N));
    //toolEntry3.setToolClass(RelatedTableCreationTool.class);
    //group.add(toolEntry3);

    final ConnectionCreationToolEntry seflRelationshipToolEntry =
            new ConnectionCreationToolEntry("Self Relationship", "Make relationship in same table", new SimpleFactory(
                    SelfRelation.class), Activator.getImageDescriptor(ImageKey.RELATION_SELF),
                    Activator.getImageDescriptor(ImageKey.RELATION_SELF));
    seflRelationshipToolEntry.setToolClass(SelfRelationCreationTool.class);
    group.add(seflRelationshipToolEntry);
    setupSeparator(group);

    setupNoteTool(group);
    setupSeparator(group);

    setupWalkerGroupTool(group);
    setupSeparator(group);

    setupImageTool(group);
    add(group);

    setDefaultEntry(selectionToolEntry);
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:53,代码来源:ERDiagramPaletteRoot.java

示例5: BODesignerEditorPaletteRoot

import org.eclipse.gef.palette.PanningSelectionToolEntry; //导入依赖的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

示例6: createPaletteRoot

import org.eclipse.gef.palette.PanningSelectionToolEntry; //导入依赖的package包/类
/**
 * @generated NOT
 */
protected PaletteRoot createPaletteRoot(PaletteRoot existingPaletteRoot) {

	PaletteRoot root = createPaletteRootGen(existingPaletteRoot);

	MID mid = (MID) this.getDiagram().getElement();
	for (Object paletteContainer : root.getChildren()) {
		List<ToolEntry> paletteEntriesToDel = new ArrayList<>();
		for (Object paletteEntry : ((PaletteContainer) paletteContainer).getChildren()) {
			if (paletteEntry instanceof ToolEntry && !(paletteEntry instanceof PanningSelectionToolEntry
					|| paletteEntry instanceof PaletteToolEntry)) {
				ToolEntry toolEntry = (ToolEntry) paletteEntry;
				String label = toolEntry.getLabel();
				String description = toolEntry.getDescription();
				//TODO MMINT[MODELREL] Re-enable once support is implemented
				if (label.contains("Import Nary")) {
					paletteEntriesToDel.add(toolEntry);
					continue;
				}
				switch (mid.getLevel()) { // Customize the palette labels and entries for each MID level
					case TYPES:
						if (label.contains("Import")) {
							paletteEntriesToDel.add(toolEntry);
							break;
						}
						label += " Type";
						description += " Type";
						break;
					case INSTANCES:
						if (label.contains("Operator")) {
							paletteEntriesToDel.add(toolEntry);
						}
						break;
					case WORKFLOWS:
						if (label.contains("Operator") || label.contains("Import")) {
							paletteEntriesToDel.add(toolEntry);
							break;
						}
						description = description + " in the Workflow";
						break;
					default:
						// should never happen
				}
				toolEntry.setLabel(label);
				toolEntry.setDescription(description);
			}
		}
		((PaletteContainer) paletteContainer).getChildren().removeAll(paletteEntriesToDel);
	}

	return root;
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:55,代码来源:MIDDiagramEditor.java

示例7: ERDiagramPaletteRoot

import org.eclipse.gef.palette.PanningSelectionToolEntry; //导入依赖的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.PanningSelectionToolEntry类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。