Пример #1
0
  public void testRotatingImagesWithDifferentDepths() {
    Image result1 = null, result2 = null, result3 = null, result4 = null;
    Image img1 =
        ImageDescriptor.createFromFile(getClass(), "icons/bits1.bmp").createImage(); // $NON-NLS-1$
    Image img2 =
        ImageDescriptor.createFromFile(getClass(), "icons/bits4.bmp").createImage(); // $NON-NLS-1$;
    Image img3 =
        ImageDescriptor.createFromFile(getClass(), "icons/bits8.gif").createImage(); // $NON-NLS-1$;
    Image img4 =
        ImageDescriptor.createFromFile(getClass(), "icons/bits24.jpg")
            .createImage(); //$NON-NLS-1$;

    try {
      result1 = ImageUtilities.createRotatedImage(img1);
      result2 = ImageUtilities.createRotatedImage(img2);
      result3 = ImageUtilities.createRotatedImage(img3);
      result4 = ImageUtilities.createRotatedImage(img4);
    } catch (Throwable error) {
      fail(error.toString() + "\n" + error.getStackTrace()[0]); // $NON-NLS-1$
    } finally {
      img1.dispose();
      img2.dispose();
      img3.dispose();
      img4.dispose();
      if (result1 != null && !result1.isDisposed()) result1.dispose();
      if (result2 != null && !result2.isDisposed()) result2.dispose();
      if (result3 != null && !result3.isDisposed()) result3.dispose();
      if (result4 != null && !result4.isDisposed()) result4.dispose();
    }
  }
Пример #2
0
  private static PaletteContainer createComplexPartsDrawer() {
    PaletteDrawer drawer =
        new PaletteDrawer(
            LogicMessages.LogicPlugin_Category_ComplexParts_Label,
            ImageDescriptor.createFromFile(Circuit.class, "icons/can.gif")); // $NON-NLS-1$

    List entries = new ArrayList();

    CombinedTemplateCreationEntry combined =
        new CombinedTemplateCreationEntry(
            LogicMessages.LogicPlugin_Tool_CreationTool_HalfAdder_Label,
            LogicMessages.LogicPlugin_Tool_CreationTool_HalfAdder_Description,
            LogicDiagramFactory.getHalfAdderFactory(),
            ImageDescriptor.createFromFile(Circuit.class, "icons/halfadder16.gif"), // $NON-NLS-1$
            ImageDescriptor.createFromFile(Circuit.class, "icons/halfadder24.gif") // $NON-NLS-1$
            );
    entries.add(combined);

    combined =
        new CombinedTemplateCreationEntry(
            LogicMessages.LogicPlugin_Tool_CreationTool_FullAdder_Label,
            LogicMessages.LogicPlugin_Tool_CreationTool_FullAdder_Description,
            LogicDiagramFactory.getFullAdderFactory(),
            ImageDescriptor.createFromFile(Circuit.class, "icons/fulladder16.gif"), // $NON-NLS-1$
            ImageDescriptor.createFromFile(Circuit.class, "icons/fulladder24.gif") // $NON-NLS-1$
            );
    entries.add(combined);

    drawer.addAll(entries);
    return drawer;
  }
Пример #3
0
 static {
   String iconPath = "icons/";
   imageRegistry.put(
       CHECKED_IMAGE,
       ImageDescriptor.createFromFile(TefkatPlugin.class, iconPath + CHECKED_IMAGE + ".gif"));
   imageRegistry.put(
       UNCHECKED_IMAGE,
       ImageDescriptor.createFromFile(TefkatPlugin.class, iconPath + UNCHECKED_IMAGE + ".gif"));
 }
Пример #4
0
  @Override
  protected Control buildControl(Composite composite) {
    Composite control = new Composite(composite, SWT.NONE);
    control.setLayout(new RowLayout(SWT.VERTICAL));

    Label text = new Label(control, SWT.HORIZONTAL | SWT.WRAP);
    text.setLayoutData(new RowData(400, 70));
    text.setText(Messages.Wizard_Osm_Info);

    Link link = new Link(control, SWT.BORDER);
    link.setText(Messages.Wizard_Osm_InfoLink);
    link.setLayoutData(new RowData(400, 40));
    link.addListener(
        SWT.Selection,
        new Listener() {
          public void handleEvent(Event event) {
            Program.launch("http://www.openstreetmap.org/"); // $NON-NLS-1$
          }
        });

    imageCache = new ImageRegistry(composite.getDisplay());
    ImageDescriptor desc = ImageDescriptor.createFromFile(getClass(), OSMControl.IMG_OSM);
    imageCache.put(OSMControl.IMG_OSM, desc);

    Composite imgControl = new Composite(control, SWT.NONE);
    imgControl.setLayoutData(new RowData(300, 100));
    imgControl.setBackgroundImage(imageCache.get(OSMControl.IMG_OSM));

    this.control = control;

    return control;
  }
 public SigilProjectWizardFirstPage() {
   super("newSigilProjectPage");
   setTitle("Sigil Project");
   setDescription("Create a new Sigil project");
   setImageDescriptor(
       ImageDescriptor.createFromFile(RepositoryViewPart.class, "/icons/logo64x64.gif"));
 }
 public SeamInstallWizardPage() {
   super(SeamCoreMessages.SEAM_INSTALL_WIZARD_PAGE_SEAM_FACET);
   setTitle(SeamCoreMessages.SEAM_INSTALL_WIZARD_PAGE_SEAM_FACET);
   setImageDescriptor(
       ImageDescriptor.createFromFile(
           SeamFormWizard.class, "SeamWebProjectWizBan.png")); // $NON-NLS-1$
   setDescription(PAGE_DESCRIPTION);
 }
Пример #7
0
 /** Constructs a new ArticleTitlePage */
 public ArticleTitlePage() {
   super(
       "Create a New Article",
       "Create a New Article",
       ImageDescriptor.createFromFile(NewArticleAction.class, "/images/newarticle.png"));
   setDescription("Enter the title and author of the new article");
   setPageComplete(false);
 }
public class QBEViewElementAttribute extends QBEViewElement {

  private VQLAttribute eiqAttribute;
  private ICodeGenerator codeGenerator;

  private QBEView container;

  private static final ImageDescriptor attrImg =
      ImageDescriptor.createFromFile(QBEViewElementConstraint.class, "/icons/qbe_attr.gif");
  private static final ImageDescriptor attrImgNeg =
      ImageDescriptor.createFromFile(
          QBEViewElementConstraint.class, "/icons/qbe_attr_disabled.gif");

  public QBEViewElementAttribute(
      QBEView container, VQLAttribute attr, ICodeGenerator codeGenerator) {
    this.container = container;
    this.eiqAttribute = attr;
    this.codeGenerator = codeGenerator;
  }

  @Override
  public ImageDescriptor getImageDescriptor(Object object) {
    return this.eiqAttribute.isVisible() ? attrImg : attrImgNeg;
  }

  @Override
  public String getLabel(Object o) {
    return this.codeGenerator.generateAttribute(this.eiqAttribute);
  }

  public VQLAttribute getEiqAttribute() {
    return eiqAttribute;
  }

  public QBEView getContainer() {
    return container;
  }

  @Override
  public Object getAdapter(Class adapter) {
    if (adapter == IPropertySource.class) return new QBEViewElementAttributeProperties(this);
    if (adapter == IWorkbenchAdapter.class) return this;
    return null;
  }
}
 public OPPInterpretAction() {
   setId(INTERPRET_ID);
   setText("Interpret");
   setToolTipText("Interpret the current model.");
   setImageDescriptor(
       ImageDescriptor.createFromFile(
           OPPEditorPlugin.class, "icons/opm_interpret.gif")); // $NON-NLS-1$
   setEnabled(true);
 }
  public Image getImage(String iconName) {
    ImageRegistry imageRegistry = getImageRegistry();

    if (imageRegistry.get(iconName) != null) {
      return imageRegistry.get(iconName);
    } else {
      imageRegistry.put(iconName, ImageDescriptor.createFromFile(getClass(), iconName));
      return imageRegistry.get(iconName);
    }
  }
  public Image createIcon() {

    final String file = "images/dissolve.gif"; // $NON-NLS-1$

    ImageDescriptor descriptor = ImageDescriptor.createFromFile(DissolveComposite.class, file);

    Image image = descriptor.createImage();

    return image;
  }
 protected ImageDescriptor internalGetImageDescriptor(String key) {
   ImageDescriptor imageDescriptor = (ImageDescriptor) imageDescriptorCache.get(key);
   if (imageDescriptor == null) {
     imageDescriptor = ImageDescriptor.createFromFile(WSDLEditorPlugin.class, key);
     if (imageDescriptor != null) {
       imageDescriptorCache.put(key, imageDescriptor);
     }
   }
   return imageDescriptor;
 }
Пример #13
0
 public static Image getImage(Class<?> baseClass, String imageName) {
   ImageRegistry registry = getDefault().getImageRegistry();
   Image result = registry.get(imageName);
   if (result == null || result.isDisposed()) {
     result = ImageDescriptor.createFromFile(baseClass, imageName).createImage();
     if (result != null) {
       registry.put(imageName, result);
     }
   }
   return result;
 }
  /*
   * @see ILabelProvider#getImage(Object)
   */
  @SuppressWarnings("restriction") // $NON-NLS-1$
  @Override
  public Image getImage(Object element) {
    ImageDescriptor descriptor = null;
    TreeType type = ((TreeStructuredElement) element).getType();
    if (type == TreeType.EXECUTION_CONDITION_TYPE) {
      descriptor =
          ImageDescriptor.createFromFile(
              ExecutionConditionPlugin.class, "icons/condition_method.gif"); // $NON-NLS-1$
    } else if (type == TreeType.CLASS_TYPE) {
      descriptor = JavaPluginImages.DESC_OBJS_CLASS;
    } else if (type == TreeType.PACKAGE_TYPE) {
      descriptor = JavaPluginImages.DESC_OBJS_PACKAGE;
    } else if (type == TreeType.PACKAGE_ROOT_TYPE) {
      descriptor = JavaPluginImages.DESC_OBJS_PACKFRAG_ROOT;
    } else if (type == TreeType.PROJECT_TYPE) {
      descriptor = JavaPluginImages.DESC_OBJS_LOGICAL_PACKAGE;
    } else if (type == TreeType.CONTAINER_TYPE) {
      descriptor =
          ImageDescriptor.createFromFile(
              ExecutionConditionPlugin.class, "icons/folder.gif"); // $NON-NLS-1$
    } else if (type == TreeType.FOLDER_GENERAL_EXECUTION_CONDITION_TYPE
        || type == TreeType.FOLDER_STATE_DIAGRAM_TYPE) {
      descriptor =
          ImageDescriptor.createFromFile(
              ExecutionConditionPlugin.class, "icons/folder.gif"); // $NON-NLS-1$
    } else if (type == TreeType.STATE_DIAGRAM_TYPE) {
      descriptor =
          ImageDescriptor.createFromFile(
              ExecutionConditionPlugin.class, "icons/stateeditor.gif"); // $NON-NLS-1$
    }

    // obtain the cached image corresponding to the descriptor
    Image image = imageCache.get(descriptor);
    if (image == null && descriptor != null) {
      image = descriptor.createImage();
      imageCache.put(descriptor, image);
    }
    return image;
  }
Пример #15
0
  /**
   * Creates a new CloseDiagramAction in the given workbench part
   *
   * @param part
   */
  public CloseDiagramAction(IWorkbenchPart part) {
    super(part);

    setText(
        Messages.getString(
            "org.isistan.flabot.edit.editor.actions.CloseDiagramAction.text")); //$NON-NLS-1$
    setToolTipText(
        Messages.getString(
            "org.isistan.flabot.edit.editor.actions.CloseDiagramAction.toolTipText")); //$NON-NLS-1$
    setId(CLOSE_DIAGRAM);
    setImageDescriptor(
        ImageDescriptor.createFromFile(FlabotPlugin.class, "icons/close.gif")); // $NON-NLS-1$
    setEnabled(false);
  }
  /** DOC amaumont Comment method "setTableCursor". */
  protected void setShellCursor(boolean cursorSelection) {
    if (!SWTFacade.isRAP()) {

      Cursor cursor = null;
      if (cursorSelection) {
        if (imageDescriptor == null) {
          imageDescriptor =
              ImageDescriptor.createFromFile(
                  MouseTableSelectionHelper.class, "/icons/right_arrow.ico"); // $NON-NLS-1$
          imageDataCursor = imageDescriptor.getImageData();
        }
        if (imageDataCursor != null) {
          // use reflection to compile within RAP environment
          // cursor = new Cursor(table.getDisplay(), imageDataCursor, 15, 9);
          Constructor<Cursor> constructor;
          try {
            constructor =
                Cursor.class.getConstructor(Device.class, ImageData.class, int.class, int.class);
            cursor = constructor.newInstance(table.getDisplay(), imageDataCursor, 15, 9);
          } catch (SecurityException e) { // throws a runtime exception but should never happend
            throw new RuntimeException(e);
          } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
          } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
          } catch (InstantiationException e) {
            throw new RuntimeException(e);
          } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
          } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
          }
        }
      } else {
        cursor = null;
      }
      if (this.tableCursor != null) {
        this.tableCursor.dispose();
      }
      this.tableCursor = cursor;

      table.getShell().setCursor(this.tableCursor);
    }
  }
  @Override
  public void updateLabel(final StyledViewerLabel label, final Object element) {
    if (element instanceof ConnectionDiscovererBean) {
      final ConnectionDiscovererBean bean = (ConnectionDiscovererBean) element;
      if (bean.getImageDescriptor() != null) {
        label.setImage(
            this.resource.createImage(((ConnectionDiscovererBean) element).getImageDescriptor()));
      }
      label.setText(bean.getName());
    } else if (element instanceof ConnectionHolder) {
      final Image image =
          this.resource.createImage(
              ImageDescriptor.createFromFile(
                  ConnectionLabelProvider.class, "icons/connection.gif")); // $NON-NLS-1$
      label.setImage(image);

      label.setStyledText(getConnectionString((ConnectionHolder) element));
    }
  }
Пример #18
0
  /**
   * Creates the progress monitor's UI parts and layouts them according to the given layout. If the
   * layout is <code>null</code> the part's default layout is used.
   *
   * @param layout The layout for the receiver.
   * @param progressIndicatorHeight The suggested height of the indicator
   */
  protected void initialize(Layout layout, int progressIndicatorHeight) {
    if (layout == null) {
      GridLayout l = new GridLayout();
      l.marginWidth = 0;
      l.marginHeight = 0;
      layout = l;
    }
    int numColumns = 1;
    if (fHasStopButton) numColumns++;
    setLayout(layout);

    if (layout instanceof GridLayout) ((GridLayout) layout).numColumns = numColumns;

    fLabel = new Label(this, SWT.LEFT);
    fLabel.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, numColumns, 1));

    if (progressIndicatorHeight == SWT.DEFAULT) {
      GC gc = new GC(fLabel);
      FontMetrics fm = gc.getFontMetrics();
      gc.dispose();
      progressIndicatorHeight = fm.getHeight();
    }

    fProgressIndicator = new ProgressIndicator(this);
    GridData gd = new GridData();
    gd.horizontalAlignment = GridData.FILL;
    gd.grabExcessHorizontalSpace = true;
    gd.grabExcessVerticalSpace = false;
    gd.verticalAlignment = GridData.CENTER;
    gd.heightHint = progressIndicatorHeight;
    fProgressIndicator.setLayoutData(gd);

    if (fHasStopButton) {
      fToolBar = new ToolBar(this, SWT.FLAT);

      gd = new GridData();
      gd.grabExcessHorizontalSpace = false;
      gd.grabExcessVerticalSpace = false;
      gd.verticalAlignment = GridData.CENTER;
      fToolBar.setLayoutData(gd);
      fStopButton = new ToolItem(fToolBar, SWT.PUSH);
      // It would have been nice to use the fCancelListener, but that
      // listener operates on the fCancelComponent which must be a control.
      fStopButton.addSelectionListener(
          new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
              setCanceled(true);
              if (fStopButton != null) {
                fStopButton.setEnabled(false);
              }
            }
          });
      final Image stopImage =
          ImageDescriptor.createFromFile(ProgressMonitorPart.class, "images/stop.gif")
              .createImage(getDisplay()); // $NON-NLS-1$
      final Cursor arrowCursor = new Cursor(this.getDisplay(), SWT.CURSOR_ARROW);
      fToolBar.setCursor(arrowCursor);
      fStopButton.setImage(stopImage);
      fStopButton.addDisposeListener(
          new DisposeListener() {
            public void widgetDisposed(DisposeEvent e) {
              // RAP [rh] images don't support dispose
              //        			stopImage.dispose();
              arrowCursor.dispose();
            }
          });
      fStopButton.setToolTipText(
          JFaceResources.getString("ProgressMonitorPart.cancelToolTip")); // $NON-NLS-1$
    }
  }
Пример #19
0
 public static ImageDescriptor getImageDescriptor(Class<?> baseClass, String imageName) {
   return ImageDescriptor.createFromFile(baseClass, imageName);
 }
Пример #20
0
 public NewGwtModuleWizard() {
   setDefaultPageImageDescriptor(
       ImageDescriptor.createFromFile(this.getClass(), "/icons/gwt_icon48.png")); // $NON-NLS-1$
   setWindowTitle("New GWT Module");
 }
Пример #21
0
/** $Id: UCMEditorPaletteFactory.java,v 1.29 2006/04/01 03:44:03 franco Exp $ $Author: franco $ */
 public Ch4_StatusAction(StatusLineManager sm) {
   super("&Trigger@Ctrl+T", AS_PUSH_BUTTON);
   statman = sm;
   setToolTipText("Trigger the Action");
   setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(), "eclipse.gif"));
 }
 /**
  * This returns BusinessProcess.gif.
  * <!-- begin-user-doc -->
  * <!-- end-user-doc -->
  */
 public Object getImage(Object object) {
   return ImageDescriptor.createFromFile(
           ECoreImage.class, ECoreImage.BUSINESS_PROCESS_ICON.getPath())
       .createImage();
 }
Пример #24
0
 @Override
 public ImageData getImageData() {
   return ImageDescriptor.createFromFile(this.getClass(), this.filename).getImageData();
 }
Пример #25
0
  private static PaletteContainer createControlGroup(PaletteRoot root) {
    PaletteGroup controlGroup =
        new PaletteGroup(LogicMessages.LogicPlugin_Category_ControlGroup_Label);

    List entries = new ArrayList();

    ToolEntry tool = new PanningSelectionToolEntry();
    entries.add(tool);
    root.setDefaultEntry(tool);

    PaletteStack marqueeStack =
        new PaletteStack(LogicMessages.Marquee_Stack, "", null); // $NON-NLS-1$

    // NODES CONTAINED (default)
    marqueeStack.add(new MarqueeToolEntry());

    // NODES TOUCHED
    MarqueeToolEntry marquee = new MarqueeToolEntry();
    marquee.setToolProperty(
        MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR,
        new Integer(MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED));
    marqueeStack.add(marquee);

    // NODES CONTAINED AND RELATED CONNECTIONS

    marquee = new MarqueeToolEntry();
    marquee.setToolProperty(
        MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR,
        new Integer(MarqueeSelectionTool.BEHAVIOR_NODES_CONTAINED_AND_RELATED_CONNECTIONS));
    marqueeStack.add(marquee);

    // NODES TOUCHED AND RELATED CONNECTIONS
    marquee = new MarqueeToolEntry();
    marquee.setToolProperty(
        MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR,
        new Integer(MarqueeSelectionTool.BEHAVIOR_NODES_TOUCHED_AND_RELATED_CONNECTIONS));
    marqueeStack.add(marquee);

    // CONNECTIONS CONTAINED
    marquee = new MarqueeToolEntry();
    marquee.setToolProperty(
        MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR,
        new Integer(MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_CONTAINED));
    marqueeStack.add(marquee);

    // CONNECTIONS TOUCHED
    marquee = new MarqueeToolEntry();
    marquee.setToolProperty(
        MarqueeSelectionTool.PROPERTY_MARQUEE_BEHAVIOR,
        new Integer(MarqueeSelectionTool.BEHAVIOR_CONNECTIONS_TOUCHED));
    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$
            );
    entries.add(tool);
    controlGroup.addAll(entries);
    return controlGroup;
  }
 static {
   ImageRegistry reg = JFaceResources.getImageRegistry();
   reg.put(
       PROCEDURE_COLUMN_ICON,
       ImageDescriptor.createFromFile(JdbcPlugin.class, "icons/column.gif")); // $NON-NLS-1$
 }
Пример #27
0
 /**
  * Returns an {@link ImageDescriptor} stored in the file at the specified path relative to the
  * specified class.
  *
  * @param clazz the {@link Class} relative to which to find the image descriptor.
  * @param path the path to the image file.
  * @return the {@link ImageDescriptor} stored in the file at the specified path.
  */
 public static ImageDescriptor getImageDescriptor(Class<?> clazz, String path) {
   return ImageDescriptor.createFromFile(clazz, path);
 }
Пример #28
0
  private static PaletteContainer createComponentsDrawer() {

    PaletteDrawer drawer =
        new PaletteDrawer(
            LogicMessages.LogicPlugin_Category_Components_Label,
            ImageDescriptor.createFromFile(Circuit.class, "icons/comp.gif")); // $NON-NLS-1$

    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    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$
            );
    combined.setToolClass(LogicCreationTool.class);
    liveGroundStack.add(combined);

    entries.add(liveGroundStack);

    drawer.addAll(entries);
    return drawer;
  }