本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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)));
}
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例10: addGroup
import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private void addGroup() {
group = new PaletteGroup("GW4E Group");
add(group);
}
示例11: createPaletteGroup
import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private static PaletteGroup createPaletteGroup() {
PaletteGroup selectionGroup = new PaletteGroup("Selections");
selectionGroup.add(new SelectionToolEntry());
return selectionGroup;
}
示例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);
}
示例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)));
}
示例14: setupImageTool
import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private void setupImageTool(final PaletteGroup group) {
group.add(new InsertImageTool());
}
示例15: setupSeparator
import org.eclipse.gef.palette.PaletteGroup; //导入依赖的package包/类
private void setupSeparator(final PaletteGroup group) {
group.add(new PaletteSeparator());
}