Package org.eclipse.gef.palette

Examples of org.eclipse.gef.palette.CombinedTemplateCreationEntry


                                iconUrl = newLoader.getResource(icon);
                            }
                            if (iconUrl == null) {
                                iconUrl = DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif");
                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
View Full Code Here


                                  iconUrl = newLoader.getResource(icon);
                              }
                              if (iconUrl == null) {
                                  iconUrl = DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif");
                              }
                              CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                  label,
                                  description,
                                  WorkItemWrapper.class,
                                  new SimpleFactory(WorkItemWrapper.class) {
                                      public Object getNewObject() {
View Full Code Here

                                iconUrl = newLoader.getResource(icon);
                            }
                            if (iconUrl == null) {
                                iconUrl = DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif");
                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
View Full Code Here

                                  iconUrl = newLoader.getResource(icon);
                              }
                              if (iconUrl == null) {
                                  iconUrl = DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif");
                              }
                              CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                  label,
                                  description,
                                  WorkItemWrapper.class,
                                  new SimpleFactory(WorkItemWrapper.class) {
                                      public Object getNewObject() {
View Full Code Here

        List<ToolEntry> entries = new ArrayList<ToolEntry>();
       
        List<BoxFactory> boxFactories = PrintingPlugin.getDefault().getVisibleBoxes();
       
        for (BoxFactory factory : boxFactories) {
          ToolEntry tool = new CombinedTemplateCreationEntry(
              factory.getName(),
              factory.getDescription(),
              null,
              new BoxCreationFactory(factory),
              factory.getSmallImage(),
View Full Code Here

                                iconUrl = newLoader.getResource(icon);
                            }
                            if (iconUrl == null) {
                                iconUrl = DroolsEclipsePlugin.getDefault().getBundle().getEntry("icons/action.gif");
                            }
                            CombinedTemplateCreationEntry combined = new CombinedTemplateCreationEntry(
                                label,
                                description,
                                WorkItemWrapper.class,
                                new SimpleFactory(WorkItemWrapper.class) {
                                    public Object getNewObject() {
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

  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

      if (_profile.defines(type)) {
        final PaletteDrawer g = _groups.get(type.getGroup());
        final ImageDescriptor ico = EditUIPlugin.getImageDescriptor("/icons/" //$NON-NLS-1$
          + _profile.getIcon(type) + ".png"); //$NON-NLS-1$
        final ObjectCreationFactory fac = new ObjectCreationFactory(type);
        final PaletteEntry entry = new CombinedTemplateCreationEntry(type.name(), "", fac, //$NON-NLS-1$
          fac, ico, ico);
        g.add(entry);
      }
    return drawers;
  }
View Full Code Here

TOP

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

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.