KickJava   Java API By Example, From Geeks To Geeks.

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


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: 11.03.2005 </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 public class TextToolEntry
16 extends CombinedTemplateCreationEntry
17 {
18   /**
19    * The creation factory used with the returned creation tool.
20    */

21   protected final CreationFactory factory;
22   
23   public TextToolEntry(String JavaDoc label, String JavaDoc shortDesc, Object JavaDoc template,
24       CreationFactory factory, ImageDescriptor iconSmall, ImageDescriptor iconLarge)
25   {
26     super(label, shortDesc, template, factory, iconSmall, iconLarge);
27     this.factory = factory;
28   }
29
30   /* (non-Javadoc)
31    * @see org.eclipse.gef.palette.ToolEntry#createTool()
32    */

33   public Tool createTool()
34   {
35     return new TextTool(factory);
36   }
37 }
38
Popular Tags