Package org.eclipse.gef.palette

Examples of org.eclipse.gef.palette.ConnectionCreationToolEntry


        PaletteEntry entry = null;
        if ("node".equals(type)) {
            entry = new CreationToolEntry(label, null, factory, iconSmall, null);
        }
        if ("connection".equals(type)) {
            entry = new ConnectionCreationToolEntry(label, null, factory, iconSmall, null);
        }
        entry.setId(id);
        return entry;
    }
View Full Code Here


        return drawer;
    }
   
    public PaletteEntry createConnectionEntry() {
        final ElementConnectionFactory normalConnectionFactory = new ConnectionWrapperFactory();
        PaletteEntry tool = new ConnectionCreationToolEntry(
            "Connection Creation",
            "Creating connections",
            new CreationFactory() {
                public Object getNewObject() {
                    return normalConnectionFactory.createElementConnection();
View Full Code Here

      for (ObjectType type : edgeTypes) {
        String typeStr = type.getName();

        ImageDescriptor id = getImgDescEdge(type);

        ToolEntry tool = new ConnectionCreationToolEntry(typeStr,
            "Create a new " + typeStr,
            new EdgeCreationFactory(type), id, ImageDescriptor
                .getMissingImageDescriptor());

        edgeDrawer.add(tool);
View Full Code Here

        // Add a marquee tool to the group
        toolbar.add(new MarqueeToolEntry());

        // Add (solid-line) connection tool
        tool = new ConnectionCreationToolEntry("Solid connection", "Create a solid-line connection",
                new CreationFactory() {
                    public Object getNewObject() {
                        return null;
                    }

                    // see ShapeEditPart#createEditPolicies()
                    // this is abused to transmit the desired line style
                    public Object getObjectType() {
                        return ShapeConstants.SOLID_CONNECTION;
                    }
                },
                ImageDescriptor.createFromFile(ShapesPlugin.class, "icons/connection_s16.gif"),
                ImageDescriptor.createFromFile(ShapesPlugin.class, "icons/connection_s24.gif"));

        toolbar.add(tool);

        // Add (dashed-line) connection tool
        tool = new ConnectionCreationToolEntry("Dashed connection", "Create a dashed-line connection",
                new CreationFactory() {
                    public Object getNewObject() {
                        return null;
                    }
View Full Code Here

        return drawer;
    }
   
    public PaletteEntry createConnectionEntry() {
        final ElementConnectionFactory normalConnectionFactory = new ConnectionWrapperFactory();
        PaletteEntry tool = new ConnectionCreationToolEntry(
            "Sequence Flow",
            "Creating connections",
            new CreationFactory() {
                public Object getNewObject() {
                    return normalConnectionFactory.createElementConnection();
View Full Code Here

        return drawer;
    }
   
    public PaletteEntry createConnectionEntry() {
        final ElementConnectionFactory normalConnectionFactory = new ConnectionWrapperFactory();
        PaletteEntry tool = new ConnectionCreationToolEntry(
            "Connection Creation",
            "Creating connections",
            new CreationFactory() {
                public Object getNewObject() {
                    return normalConnectionFactory.createElementConnection();
View Full Code Here

        return drawer;
    }
   
    public PaletteEntry createConnectionEntry() {
        final ElementConnectionFactory normalConnectionFactory = new ConnectionWrapperFactory();
        PaletteEntry tool = new ConnectionCreationToolEntry(
            "Sequence Flow",
            "Creating connections",
            new CreationFactory() {
                public Object getNewObject() {
                    return normalConnectionFactory.createElementConnection();
View Full Code Here

    } else if (creationToolEntry instanceof IConnectionCreationToolEntry) {
      IConnectionCreationToolEntry connectionCreationToolEntry = (IConnectionCreationToolEntry) creationToolEntry;

      MultiCreationFactory multiCreationFactory = new MultiCreationFactory(connectionCreationToolEntry.getCreateConnectionFeatures());

      ConnectionCreationToolEntry pe = new ConnectionCreationToolEntry(creationToolEntry.getLabel(),
          creationToolEntry.getDescription(), multiCreationFactory, getImageDescriptor(creationToolEntry, true),
          getImageDescriptor(creationToolEntry, false));
      pe.setToolClass(GFConnectionCreationTool.class);

      return pe;

    }
View Full Code Here

      | MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED));
  marqueeStack.add(marquee);
  marqueeStack.setUserModificationPermission(PaletteEntry.PERMISSION_NO_MODIFICATION);
  entries.add(marqueeStack);
 
  tool = new ConnectionCreationToolEntry(
    LogicMessages.LogicPlugin_Tool_ConnectionCreationTool_ConnectionCreationTool_Label,
    LogicMessages.LogicPlugin_Tool_ConnectionCreationTool_ConnectionCreationTool_Description,
    null,
    ImageDescriptor.createFromFile(Circuit.class, "icons/connection16.gif"),//$NON-NLS-1$
    ImageDescriptor.createFromFile(Circuit.class, "icons/connection24.gif")//$NON-NLS-1$
View Full Code Here

  }

  @Override
  protected List<PaletteEntry> createConnectionTools() {
    List<PaletteEntry> entries = new ArrayList<PaletteEntry>();
    ToolEntry tool = new ConnectionCreationToolEntry(Messages.WebFlowEditorPaletteFactory_TO_COMPONENT_TITLE,
        Messages.WebFlowEditorPaletteFactory_TO_COMPONENT_DESCRIPTION, new TransitionCreationFactory(),
        ConfigGraphCommonImages.CONNECTION_SOLID, ConfigGraphCommonImages.CONNECTION_SOLID);
    entries.add(tool);
    return entries;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gef.palette.ConnectionCreationToolEntry

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.