KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > editor2d > tools > LineToolEntry


1 /**
2  * <p> Project: com.nightlabs.editor2d </p>
3  * <p> Copyright: Copyright (c) 2004 </p>
4  * <p> Company: NightLabs GmbH (Germany) </p>
5  * <p> Creation Date: 29.12.2004 </p>
6  * <p> Author: Daniel Mazurek </p>
7 **/

8 package com.nightlabs.editor2d.tools;
9
10 import org.eclipse.gef.Tool;
11 import org.eclipse.gef.palette.CombinedTemplateCreationEntry;
12 import org.eclipse.gef.requests.CreationFactory;
13 import org.eclipse.jface.resource.ImageDescriptor;
14
15
16 public class LineToolEntry
17 //extends ToolEntry
18
extends CombinedTemplateCreationEntry
19 {
20   /**
21    * The creation factory used with the returned creation tool.
22    */

23   protected final CreationFactory factory;
24   
25   /**
26    * @param label
27    * @param shortDesc
28    * @param iconSmall
29    * @param iconLarge
30    */

31   public LineToolEntry(String JavaDoc label, String JavaDoc shortDesc, Object JavaDoc template,
32       CreationFactory factory, ImageDescriptor iconSmall, ImageDescriptor iconLarge)
33   {
34     super(label, shortDesc, template, factory, iconSmall, iconLarge);
35     this.factory = factory;
36   }
37
38   /* (non-Javadoc)
39    * @see org.eclipse.gef.palette.ToolEntry#createTool()
40    */

41   public Tool createTool()
42   {
43     return new LineTool(factory);
44   }
45
46 }
47
Popular Tags