1 /*
2 * This file is a part of CAST project.
3 * (c) Copyright 2007, AGH University of Science & Technology
4 * https://caribou.iisg.agh.edu.pl/trac/cast
5 *
6 * Licensed under the Eclipse Public License, Version 1.0 (the "License").
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 * http://www.eclipse.org/legal/epl-v10.html
10 */
11 /*
12 * File: EntityCreationToolEntry.java
13 * Created: 2007-00-00
14 * Author: awos
15 * $Id: EntityCreationToolEntry.java 2774 2009-04-22 13:56:23Z tmilos $
16 */
17
18 package pl.edu.agh.cast.backward.editor;
19
20 import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
21 import org.eclipse.gef.requests.CreationFactory;
22 import org.eclipse.jface.resource.ImageDescriptor;
23
24 /**
25 * Tool entry for creating entities. Uses custom tool class, {@link EntityCreationTool}, which saves iconLarge in
26 * extendedData map in CreationRequest. Also, to enable drag and drop support, the tool has to be a subclass of
27 * TemplatePaletteEntry.
28 *
29 * @author AGH CAST Team
30 */
31 public class EntityCreationToolEntry extends CombinedTemplateCreationEntry {
32
33 /**
34 * Creates new entity creation tool entry for the palette.
35 *
36 * @param label
37 * tool label
38 * @param shortDesc
39 * tool short description
40 * @param factory
41 * factory for creating new entries
42 * @param iconSmall
43 * small entity icon
44 * @param iconLarge
45 * large entity icon
46 */
47 public EntityCreationToolEntry(String label, String shortDesc, CreationFactory factory, ImageDescriptor iconSmall,
48 ImageDescriptor iconLarge) {
49 super(label, shortDesc, factory, iconSmall, iconLarge);
50 setToolClass(EntityCreationTool.class);
51 }
52
53 }