Package org.eclipse.gef.requests

Examples of org.eclipse.gef.requests.SimpleFactory


  List entries = new ArrayList();
 
  CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_FlowContainer_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_FlowContainer_Description,
    new SimpleFactory(LogicFlowContainer.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/logicflow16.gif"), //$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/logicflow24.gif")//$NON-NLS-1$
  );
  entries.add(combined);

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_Circuit_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_Circuit_Description,
    new SimpleFactory(Circuit.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/circuit16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/circuit24.gif")//$NON-NLS-1$
  );
  entries.add(combined);
 
  entries.add(new PaletteSeparator());

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_Label_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_Label_Description,
    new SimpleFactory(LogicLabel.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/label16.gif"), //$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/label24.gif")//$NON-NLS-1$
  );
  entries.add(combined);

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_LED_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_LED_Description,
    new SimpleFactory(LED.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/ledicon16.gif"), //$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/ledicon24.gif")//$NON-NLS-1$
  );
  entries.add(combined);

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_ORGate_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_ORGate_Description,
    new SimpleFactory(OrGate.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/or16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/or24.gif")//$NON-NLS-1$
  );
  entries.add(combined);

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_XORGate_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_XORGate_Description,
    new SimpleFactory(XORGate.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/xor16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/xor24.gif")//$NON-NLS-1$
  );
  entries.add(combined);

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_ANDGate_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_ANDGate_Description,
    new SimpleFactory(AndGate.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/and16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/and24.gif")//$NON-NLS-1$
  );
  entries.add(combined);

  PaletteStack liveGroundStack = new PaletteStack(
      LogicMessages.LogicPlugin_Tool_CreationTool_LiveGroundStack_Label,
      LogicMessages.LogicPlugin_Tool_CreationTool_LiveGroundStack_Description, null);
 
  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_LiveOutput_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_LiveOutput_Description,
    new SimpleFactory(LiveOutput.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/live16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/live24.gif")//$NON-NLS-1$
  );
  liveGroundStack.add(combined);

  combined = new CombinedTemplateCreationEntry(
    LogicMessages.LogicPlugin_Tool_CreationTool_Ground_Label,
    LogicMessages.LogicPlugin_Tool_CreationTool_Ground_Description,
    new SimpleFactory(GroundOutput.class),
    ImageDescriptor.createFromFile(Circuit.class, "icons/ground16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/ground24.gif")//$NON-NLS-1$
  );
  liveGroundStack.add(combined);
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

    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();

    CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry("Action State",
        "Create a new Action State", ActionState.class,
        new SimpleFactory(ActionState.class), WebflowUIImages.DESC_OBJS_ACTION_STATE,
        WebflowUIImages.DESC_OBJS_ACTION_STATE);
    entries.add(combined);

    combined = new CombinedTemplateCreationEntry("View State", "Create a View State",
        ViewState.class, new SimpleFactory(ViewState.class),
        WebflowUIImages.DESC_OBJS_VIEW_STATE, WebflowUIImages.DESC_OBJS_VIEW_STATE);
    entries.add(combined);

    combined = new CombinedTemplateCreationEntry("Subflow State", "Create a Subflow State",
        SubflowState.class, new SimpleFactory(SubflowState.class),
        WebflowUIImages.DESC_OBJS_SUBFLOW_STATE, WebflowUIImages.DESC_OBJS_SUBFLOW_STATE);
    entries.add(combined);

    combined = new CombinedTemplateCreationEntry("Decision State", "Create a Decision State",
        DecisionState.class, new SimpleFactory(DecisionState.class),
        WebflowUIImages.DESC_OBJS_DECISION_STATE, WebflowUIImages.DESC_OBJS_DECISION_STATE);
    entries.add(combined);

    combined = new CombinedTemplateCreationEntry("End State", "Create an End State",
        EndState.class, new SimpleFactory(EndState.class),
        WebflowUIImages.DESC_OBJS_END_STATE, WebflowUIImages.DESC_OBJS_END_STATE);
    entries.add(combined);

    PaletteSeparator sep = new PaletteSeparator(Activator.PLUGIN_ID + ".palette.sep3");
    sep.setUserModificationPermission(PaletteEntry.PERMISSION_NO_MODIFICATION);
    entries.add(sep);

    combined = new CombinedTemplateCreationEntry("Exception Handler",
        "Create an Exception Handler", ExceptionHandler.class, new SimpleFactory(
            ExceptionHandler.class), WebflowUIImages.DESC_OBJS_EXCEPTION_HANDLER,
        WebflowUIImages.DESC_OBJS_EXCEPTION_HANDLER);
    entries.add(combined);

    if (version1) {
      combined = new CombinedTemplateCreationEntry("Attribute Mapper",
          "Create an Attribute Mapper", AttributeMapper.class, new SimpleFactory(
              AttributeMapper.class), WebflowUIImages.DESC_OBJS_ATTRIBUTE_MAPPER,
          WebflowUIImages.DESC_OBJS_ATTRIBUTE_MAPPER);
      entries.add(combined);
    }
View Full Code Here

    PaletteSeparator sep = new PaletteSeparator(Activator.PLUGIN_ID + ".palette.sep2");
    sep.setUserModificationPermission(PaletteEntry.PERMISSION_NO_MODIFICATION);
    entries.add(sep);

    tool = new ConnectionCreationToolEntry("Transition", "Create a Transition",
        new SimpleFactory(StateTransition.class), WebflowImages.DESC_OBJS_CONNECTION,
        WebflowImages.DESC_OBJS_ELSE_CONNECTION);
    entries.add(tool);
    tool = new ConnectionCreationToolEntry("Else Transition", "Create a Transition",
        new SimpleFactory(IfTransition.class), WebflowImages.DESC_OBJS_ELSE_CONNECTION,
        WebflowImages.DESC_OBJS_ELSE_CONNECTION);
    ;
    entries.add(tool);
    controlGroup.addAll(entries);
    return controlGroup;
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.