本文整理汇总了Java中org.eclipse.gef.palette.PaletteDrawer.add方法的典型用法代码示例。如果您正苦于以下问题:Java PaletteDrawer.add方法的具体用法?Java PaletteDrawer.add怎么用?Java PaletteDrawer.add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gef.palette.PaletteDrawer
的用法示例。
在下文中一共展示了PaletteDrawer.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPaletteRoot
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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;
}
示例2: GraphicalPalette
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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);
}
示例3: createElements
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
public static PaletteDrawer createElements(PaletteRoot paletteRoot, List<String> ignore, PaletteGroup p,
Map<String, List<PaletteEntry>> map) {
PaletteDrawer drawer = createGroup(paletteRoot, ignore, p.getName(), p.getImage());
// drawer.add(createJDEntry(MCallout.getIconDescriptor(), MCallout.class));
drawer.add(createJDEntry(MTextField.getIconDescriptor(), MTextField.class));
drawer.add(createJDEntry(MStaticText.getIconDescriptor(), MStaticText.class));
drawer.add(createJDEntry(MImage.getIconDescriptor(), MImage.class));
drawer.add(createJDEntry(MBreak.getIconDescriptor(), MBreak.class));
drawer.add(createJDEntry(MRectangle.getIconDescriptor(), MRectangle.class));
drawer.add(createJDEntry(MEllipse.getIconDescriptor(), MEllipse.class));
drawer.add(createJDEntry(MLine.getIconDescriptor(), MLine.class));
// drawer.add(createJDEntry(MGenericElement.getIconDescriptor(), MGenericElement.class));
drawer.add(createJDEntry(MFrame.getIconDescriptor(), MFrame.class));
drawer.add(createJDEntry(MSubreport.getIconDescriptor(), MSubreport.class));
getEntries4Key(drawer, ignore, p.getId(), map);
return drawer;
}
示例4: createComponentPartsDrawer
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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);
}
示例5: createObjects1Group
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
/**
* Creates "Objects" palette tool group
* @generated
*/
private PaletteContainer createObjects1Group() {
PaletteDrawer paletteContainer = new PaletteDrawer(
SimpleBPMN.diagram.part.Messages.Objects1Group_title);
paletteContainer.setId("createObjects1Group"); //$NON-NLS-1$
paletteContainer.add(createANDGateway1CreationTool());
paletteContainer.add(createActivity2CreationTool());
paletteContainer.add(createDataObject3CreationTool());
paletteContainer.add(createEndEvent4CreationTool());
paletteContainer.add(createGroup5CreationTool());
paletteContainer.add(createIntermediateEvent6CreationTool());
paletteContainer.add(createLane7CreationTool());
paletteContainer.add(createORGateway8CreationTool());
paletteContainer.add(createPool9CreationTool());
paletteContainer.add(createStartEvent10CreationTool());
paletteContainer.add(createXORGateway11CreationTool());
return paletteContainer;
}
示例6: getPaletteRoot
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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;
}
示例7: getPaletteRoot
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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;
}
示例8: getPaletteRoot
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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;
}
示例9: getPaletteRoot
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的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;
}
示例10: createPaletteDrawer
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
private static PaletteDrawer createPaletteDrawer() {
PaletteDrawer drawer = new PaletteDrawer("Elements");
CombinedTemplateCreationEntry table = new CombinedTemplateCreationEntry("Table", "This is table tool", Table.class, new SimpleFactory(
Table.class), Activator.getImageDescriptor(Activator.IMAGE_TABLE_16), Activator.getImageDescriptor(Activator.IMAGE_TABLE_24));
drawer.add(table);
CombinedTemplateCreationEntry column = new CombinedTemplateCreationEntry("Column", "This is column tool", Column.class, new SimpleFactory(
Column.class), Activator.getImageDescriptor(Activator.IMAGE_COLUMN_16), Activator.getImageDescriptor(Activator.IMAGE_COLUMN_24));
drawer.add(column);
ConnectionCreationToolEntry connection = new ConnectionCreationToolEntry("Connection", "this is table connection", new SimpleFactory(
Connection.class), Activator.getImageDescriptor(Activator.IMAGE_CONNECTION_16),
Activator.getImageDescriptor(Activator.IMAGE_CONNECTION_24));
drawer.add(connection);
return drawer;
}
示例11: createContainers
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
public static PaletteDrawer createContainers(PaletteRoot paletteRoot, List<String> ignore, PaletteGroup p,
Map<String, List<PaletteEntry>> map) {
PaletteDrawer drawer = createGroup(paletteRoot, ignore, p.getName(), p.getImage());
drawer.add(createJDEntry(MFrame.getIconDescriptor(), MFrame.class));
drawer.add(createJDEntry(MSubreport.getIconDescriptor(), MSubreport.class));
getEntries4Key(drawer, ignore, p.getId(), map);
return drawer;
}
示例12: createFields
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
/**
* Creates a new JDPalette object.
*
* @param paletteRoot
* the palette root
*/
public static void createFields(PaletteRoot paletteRoot, List<String> ignore, PaletteGroup p,
Map<String, List<PaletteEntry>> map) {
PaletteDrawer drawer = createGroup(paletteRoot, ignore, p.getName(), p.getImage());
drawer.add(createJDEntry(MPageNumber.getIconDescriptor(), MPageNumber.class));
drawer.add(createJDEntry(MTotalPages.getIconDescriptor(), MTotalPages.class));
drawer.add(createJDEntry(MDate.getIconDescriptor(), MDate.class));
drawer.add(createJDEntry(MTime.getIconDescriptor(), MTime.class));
drawer.add(createJDEntry(MPercentage.getIconDescriptor(), MPercentage.class));
drawer.add(createJDEntry(MPageXofY.getIconDescriptor(), MPageXofY.class));
getEntries4Key(drawer, ignore, p.getId(), map);
}
示例13: getEntries4Key
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
private static void getEntries4Key(PaletteDrawer drawer, List<String> ignore, String id,
Map<String, List<PaletteEntry>> map) {
List<PaletteEntry> plist = map.get(id);
if (plist != null)
for (PaletteEntry entry : plist) {
if (ignore != null && ignore.contains(entry.getType()))
continue;
drawer.add(entry);
}
}
示例14: createNode1Group
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
/**
* Creates "Node" palette tool group
* @generated
*/
private PaletteContainer createNode1Group() {
PaletteDrawer paletteContainer = new PaletteDrawer(
Messages.Node1Group_title);
paletteContainer.setId("createNode1Group"); //$NON-NLS-1$
paletteContainer.add(createSMC1CreationTool());
paletteContainer.add(createRole2CreationTool());
paletteContainer.add(createContract3CreationTool());
paletteContainer.add(createFact4CreationTool());
paletteContainer.add(createPlayer5CreationTool());
return paletteContainer;
}
示例15: createConnection2Group
import org.eclipse.gef.palette.PaletteDrawer; //导入方法依赖的package包/类
/**
* Creates "Connection" palette tool group
* @generated
*/
private PaletteContainer createConnection2Group() {
PaletteDrawer paletteContainer = new PaletteDrawer(
Messages.Connection2Group_title);
paletteContainer.setId("createConnection2Group"); //$NON-NLS-1$
paletteContainer.add(createContractRoleA1CreationTool());
paletteContainer.add(createContractRoleB2CreationTool());
paletteContainer.add(createPlayerBinding3CreationTool());
paletteContainer.add(createFactLink4CreationTool());
paletteContainer.add(createExternalFactLink5CreationTool());
return paletteContainer;
}