Package org.eclipse.gef.palette

Examples of org.eclipse.gef.palette.CreationToolEntry


        if (iconSmall == null) {
            return null;
        }
        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);
View Full Code Here


  protected static ToolEntry createPolylineToolEntry() {
    // Note: same template for Drag and Drop as well as click and drag
    CombinedTargetRecordCreationFactory template = new CombinedTargetRecordCreationFactory(
        SVGConstants.SVG_POLYLINE_TAG);

    CreationToolEntry entry = new CombinedTemplateCreationEntry("Pencil",
        "Free hand drawing", template, template,
        ImageDescriptor.createFromImage(IconUtils.getPencilImage()),
        ImageDescriptor.createFromImage(IconUtils.getPencilImage()));
    entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED, false);
    entry.setToolClass(PointlistCreationTool.class);
    return entry;
  }
View Full Code Here

  protected static ToolEntry createEllipseToolEntry() {
    // Note: same template for Drag and Drop as well as click and drag
    CombinedTargetRecordCreationFactory template = new CombinedTargetRecordCreationFactory(
        SVGConstants.SVG_ELLIPSE_TAG);

    CreationToolEntry entry = new CombinedTemplateCreationEntry("Ellipse",
        "Creation of an ellipse", template, template,
        ImageDescriptor.createFromImage(IconUtils.getEllipseImage()),
        ImageDescriptor.createFromImage(IconUtils.getEllipseImage()));
    entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED, false);
    entry.setToolClass(CreationToolWithoutSelection.class);
    return entry;
  }
View Full Code Here

  protected static ToolEntry createRectangleToolEntry() {
    // Note: same template for Drag and Drop as well as click and drag
    CombinedTargetRecordCreationFactory template = new CombinedTargetRecordCreationFactory(
        SVGConstants.SVG_RECT_TAG);

    CreationToolEntry entry = new CombinedTemplateCreationEntry(
        "Rectangle", "Creation of a rectangle", template, template,
        ImageDescriptor.createFromImage(IconUtils.getRectImage()),
        ImageDescriptor.createFromImage(IconUtils.getRectImage()));
    entry.setToolProperty(AbstractTool.PROPERTY_UNLOAD_WHEN_FINISHED, false);
    entry.setToolClass(CreationToolWithoutSelection.class);
    return entry;
  }
View Full Code Here

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

        ImageDescriptor id = getImgDescVertex(type);

        ToolEntry tool = new CreationToolEntry(typeStr, "Create a new "
            + typeStr, new VertexCreationFactory(type), id, null);

        toolDrawer.add(tool);
      }
View Full Code Here

TOP

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

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.