Package org.eclipse.gef.requests

Examples of org.eclipse.gef.requests.SimpleFactory


                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
                                        WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                        workItemWrapper.setName(label);
                                        workItemWrapper.setWorkDefinition(workDefinition);
                                        return workItemWrapper;
View Full Code Here


                              }
                              CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                  label,
                                  description,
                                  WorkItemWrapper.class,
                                  new SimpleFactory(WorkItemWrapper.class) {
                                      public Object getNewObject() {
                                          WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                          workItemWrapper.setName(label);
                                          workItemWrapper.setWorkDefinition(workDefinition);
                                          return workItemWrapper;
View Full Code Here

                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
                                        WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                        workItemWrapper.setName(label);
                                        workItemWrapper.setWorkDefinition(workDefinition);
                                        return workItemWrapper;
View Full Code Here

                              }
                              CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                  label,
                                  description,
                                  WorkItemWrapper.class,
                                  new SimpleFactory(WorkItemWrapper.class) {
                                      public Object getNewObject() {
                                          WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                          workItemWrapper.setName(label);
                                          workItemWrapper.setWorkDefinition(workDefinition);
                                          return workItemWrapper;
View Full Code Here

                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
                                        WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                        workItemWrapper.setName(label);
                                        workItemWrapper.setWorkDefinition(workDefinition);
                                        return workItemWrapper;
View Full Code Here

                              }
                              CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                  label,
                                  description,
                                  WorkItemWrapper.class,
                                  new SimpleFactory(WorkItemWrapper.class) {
                                      public Object getNewObject() {
                                          WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                          workItemWrapper.setName(label);
                                          workItemWrapper.setWorkDefinition(workDefinition);
                                          return workItemWrapper;
View Full Code Here

                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
                                        WorkItemWrapper workItemWrapper = (WorkItemWrapper) super.getNewObject();
                                        workItemWrapper.setName(label);
                                        workItemWrapper.setWorkDefinition(workDefinition);
                                        return workItemWrapper;
View Full Code Here

        CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
            "Start",
            "Create a new Start",
            StartNodeWrapper.class,
            new SimpleFactory(StartNodeWrapper.class),
            ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/process_start.gif")),
            ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/process_start.gif"))
        );
        entries.add(combined);
       
        combined = new CombinedTemplateCreationEntry(
            "End",
            "Create a new End",
            EndNodeWrapper.class,
            new SimpleFactory(EndNodeWrapper.class),
            ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/process_stop.gif")),
            ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/process_stop.gif"))
        );
        entries.add(combined);
               
        if (flowNodes.charAt(0) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "RuleFlowGroup",
                "Create a new RuleFlowGroup",
                RuleSetNodeWrapper.class,
                new SimpleFactory(RuleSetNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/activity.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/activity.gif"))
            );
            entries.add(combined);
        }
           
        if (flowNodes.charAt(1) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Split",
                "Create a new Split",
                SplitWrapper.class,
                new SimpleFactory(SplitWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/split.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/split.gif"))
            );
            entries.add(combined);
        }
                   
        if (flowNodes.charAt(2) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Join",
                "Create a new Join",
                JoinWrapper.class,
                new SimpleFactory(JoinWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/join.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/join.gif"))
            );
            entries.add(combined);
        }
                       
        if (flowNodes.charAt(3) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Wait State",
                "Create a new Wait State",
                StateNodeWrapper.class,
                new SimpleFactory(StateNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/question.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/question.gif"))
            );
            entries.add(combined);
        }
                           
        if (flowNodes.charAt(4) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "SubFlow",
                "Create a new SubFlow",
                SubProcessWrapper.class,
                new SimpleFactory(SubProcessWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/process.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/process.gif"))
            );
            entries.add(combined);
        }
                               
        if (flowNodes.charAt(5) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Action",
                "Create a new Action",
                ActionWrapper.class,
                new SimpleFactory(ActionWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif"))
            );
            entries.add(combined);
        }
                     
        if (flowNodes.charAt(6) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Timer",
                "Create a new Timer",
                TimerWrapper.class,
                new SimpleFactory(TimerWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/timer.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/timer.gif"))
            );
            entries.add(combined);
        }
                     
        if (flowNodes.charAt(7) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Fault",
                "Create a new Fault",
                FaultNodeWrapper.class,
                new SimpleFactory(FaultNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/fault.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/fault.gif"))
            );
            entries.add(combined);
        }
                         
        if (flowNodes.charAt(8) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Event",
                "Create a new Event Node",
                EventNodeWrapper.class,
                new SimpleFactory(EventNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/event.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/event.gif"))
            );
            entries.add(combined);
        }

        if (flowNodes.charAt(9) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Human Task",
                "Create a new Human Task",
                HumanTaskNodeWrapper.class,
                new SimpleFactory(HumanTaskNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/human_task.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/human_task.gif"))
            );
            entries.add(combined);
        }
                             
        if (flowNodes.charAt(10) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "Composite",
                "Create a new Composite Node",
                CompositeContextNodeWrapper.class,
                new SimpleFactory(CompositeContextNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/composite.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/composite.gif"))
            );
            entries.add(combined);
        }
                         
        if (flowNodes.charAt(11) == '1') {
            combined = new CombinedTemplateCreationEntry(
                "For Each",
                "Create a new ForEach Node",
                ForEachNodeWrapper.class,
                new SimpleFactory(ForEachNodeWrapper.class),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/composite.gif")),
                ImageDescriptor.createFromURL(DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/composite.gif"))
            );
            entries.add(combined);
        }
View Full Code Here

protected void clonePart(BasicElement oldPart, MusicContainerForm newParent, Rectangle newBounds,
            List<BasicElement> newConnections, Map<BasicElement, Serializable> connectionPartMap, int index) {
  BasicElement newPart = null;
 
  SimpleFactory simpleFactory = new SimpleFactory(
      oldPart.getClass());
  newPart = (BasicElement) simpleFactory.getNewObject();   
  if (oldPart instanceof MusicContainerForm) {
    Iterator<?> i = ((MusicContainerForm)oldPart).getChildren().iterator();
    while (i.hasNext()) {
      // for children they will not need new bounds
      clonePart((BasicElement)i.next(), (MusicContainerForm)newPart, null,
View Full Code Here

    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
   
    CombinedTemplateCreationEntry combined;
       
    combined = new CombinedTemplateCreationEntry(
        MusicMessages.MusicPalette_1, MusicMessages.MusicPalette_2, new SimpleFactory(
            StaffGroupForm.class),
        ImageDescriptor.createFromImage(HelperMethods
            .createImage("icons/icon-staffgrp.gif")), //$NON-NLS-1$
        ImageDescriptor.createFromImage(HelperMethods
            .createImage("icons/icon-staffgrp.gif"))//$NON-NLS-1$
    );
    entries.add(combined);
   
    combined = new CombinedTemplateCreationEntry(
        MusicMessages.MusicPalette_4, MusicMessages.MusicPalette_5, new SimpleFactory(
            StaffDefForm.class),
        ImageDescriptor.createFromImage(HelperMethods
            .createImage("icons/icon-staffdef.gif")), //$NON-NLS-1$
        ImageDescriptor.createFromImage(HelperMethods
            .createImage("icons/icon-staffdef.gif"))//$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.eclipse.gef.requests.SimpleFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.