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


Java PaletteGroup类代码示例

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


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

示例1: createEditPart

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.EditPartFactory#createEditPart(EditPart, Object)
 */
public EditPart createEditPart(EditPart parentEditPart, Object model) {
	if (model instanceof PaletteRoot)
		return createMainPaletteEditPart(parentEditPart, model);
	if (model instanceof PaletteStack)
		return createStackEditPart(parentEditPart, model);
	if (model instanceof PaletteContainer) {
		Object type = ((PaletteContainer) model).getType();
		if (PaletteDrawer.PALETTE_TYPE_DRAWER.equals(type))
			return createDrawerEditPart(parentEditPart, model);
		if (PaletteGroup.PALETTE_TYPE_GROUP.equals(type)
				|| PaletteContainer.PALETTE_TYPE_UNKNOWN.equals(type))
			return createGroupEditPart(parentEditPart, model);
		if (PaletteToolbar.PALETTE_TYPE_TOOLBAR_GROUP.equals(type))
			return createToolbarEditPart(parentEditPart, model);
	}
	if (model instanceof PaletteTemplateEntry)
		return createTemplateEditPart(parentEditPart, model);
	if (model instanceof PaletteSeparator)
		return createSeparatorEditPart(parentEditPart, model);
	if (model instanceof PaletteEntry)
		return createEntryEditPart(parentEditPart, model);
	return null;
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:27,代码来源:PaletteEditPartFactory.java

示例2: createWc20141Group

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
/**
 * Creates "wc2014" palette tool group
 * @generated
 */
private PaletteContainer createWc20141Group() {
	PaletteGroup paletteContainer = new PaletteGroup(
			Messages.Wc20141Group_title);
	paletteContainer.setId("createWc20141Group"); //$NON-NLS-1$
	paletteContainer.add(createTeam1CreationTool());
	paletteContainer.add(createTeamAtGroup2CreationTool());
	paletteContainer.add(createMatchHome3CreationTool());
	paletteContainer.add(createMatchAway4CreationTool());
	paletteContainer.add(createGroupMatch5CreationTool());
	paletteContainer.add(createEliminationMatch6CreationTool());
	paletteContainer.add(createEliminationMatchWinner7CreationTool());
	paletteContainer.add(createGroup8CreationTool());
	paletteContainer.add(createGroupFirstTeam9CreationTool());
	paletteContainer.add(createGroupSecondTeam10CreationTool());
	return paletteContainer;
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:21,代码来源:Wc2014PaletteFactory.java

示例3: createStatemachine1Group

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
/**
 * Creates "statemachine" palette tool group
 * @generated
 */
private PaletteContainer createStatemachine1Group() {
	PaletteGroup paletteContainer = new PaletteGroup(
			Messages.Statemachine1Group_title);
	paletteContainer.setId("createStatemachine1Group"); //$NON-NLS-1$
	paletteContainer.add(createState1CreationTool());
	paletteContainer.add(createTransition2CreationTool());
	return paletteContainer;
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:13,代码来源:StatemachinePaletteFactory.java

示例4: setupTableViewTool

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

示例5: setupSelectionTool

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

示例6: setupNoteTool

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

示例7: createControlGroup

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private static PaletteContainer createControlGroup(PaletteRoot root)
{
	PaletteGroup controlGroup = new PaletteGroup("Control Group");

	List<PaletteEntry> tools = new ArrayList<PaletteEntry>();
	ToolEntry selectionTool = new SelectionToolEntry();
	tools.add(selectionTool);
	root.setDefaultEntry(selectionTool);
	controlGroup.addAll(tools);
	return controlGroup;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:12,代码来源:PaletteFactory.java

示例8: createControlGroup

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private static PaletteContainer createControlGroup(PaletteRoot root)
{
	PaletteGroup controlGroup = new PaletteGroup("Control Group");

	List<PaletteEntry> tools = new ArrayList<PaletteEntry>();
	ToolEntry selectionTool = new SelectionToolEntry();
	tools.add(selectionTool);
	root.setDefaultEntry(selectionTool);
	// ToolEntry connectionCreationTool = new ConnectionCreationToolEntry("Connection",
	// "Create a connection", null, null, null);
	// tools.add(connectionCreationTool);
	controlGroup.addAll(tools);
	return controlGroup;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:15,代码来源:PaletteFactory.java

示例9: createTransformations1Group

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
/**
 * Creates "transformations" palette tool group
 * @generated
 */
private PaletteContainer createTransformations1Group() {
	PaletteGroup paletteContainer = new PaletteGroup(Messages.Transformations1Group_title);
	paletteContainer.setId("createTransformations1Group"); //$NON-NLS-1$
	paletteContainer.add(createTransformationSet1CreationTool());
	paletteContainer.add(createTransformationSetExtension2CreationTool());
	paletteContainer.add(createTransformation3CreationTool());
	paletteContainer.add(createExternalTransformation4CreationTool());
	paletteContainer.add(createSelfRequirement5CreationTool());
	paletteContainer.add(createParentRequirement6CreationTool());
	paletteContainer.add(createCustomRequirement7CreationTool());
	return paletteContainer;
}
 
开发者ID:awltech,项目名称:eclipse-optimus,代码行数:17,代码来源:TransformationDependencyPaletteFactory.java

示例10: addGroup

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private void addGroup() {
	group = new PaletteGroup("GW4E Group");
	add(group);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:5,代码来源:GW4EGraphicalEditorPalette.java

示例11: createPaletteGroup

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private static PaletteGroup createPaletteGroup() {
	PaletteGroup selectionGroup = new PaletteGroup("Selections");
	selectionGroup.add(new SelectionToolEntry());
	return selectionGroup;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:6,代码来源:DbToolGefEditorPaletteFactory.java

示例12: ERDiagramPaletteRoot

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

示例13: setupWalkerGroupTool

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

示例14: setupImageTool

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private void setupImageTool(final PaletteGroup group) {
    group.add(new InsertImageTool());
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:4,代码来源:ERDiagramPaletteRoot.java

示例15: setupSeparator

import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private void setupSeparator(final PaletteGroup group) {
    group.add(new PaletteSeparator());
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:4,代码来源:ERDiagramPaletteRoot.java


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