KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > template > eventhandler > TEEditHandler


1 package de.webman.template.eventhandler;
2  
3 import com.teamkonzept.webman.mainint.events.*;
4 import com.teamkonzept.webman.mainint.*;
5 import com.teamkonzept.webman.*;
6 import com.teamkonzept.web.*;
7 import com.teamkonzept.lib.*;
8 import com.teamkonzept.lib.templates.*;
9 import java.io.*;
10
11 /**
12  * Editieren eines Templates
13  *
14  * @author $Author: tina $
15  * @version $Revision: 1.1 $
16  */

17 public class TEEditHandler extends DefaultEventHandler implements ParameterTypes
18 {
19      private TEEditHandler()
20     {}
21     
22     private static TEEditHandler instance = new TEEditHandler();
23     
24     public static TEEditHandler getInstance()
25     {
26         return instance;
27     }
28     public void handleEvent(TKEvent evt) throws TKException
29     {
30         try
31         {
32             // weiterreichen des events, da die selbe funktionalität
33
// an anderer stelle auch gebraucht wird
34
TEUtils.showSavedText( evt );
35         }
36         catch (Throwable JavaDoc t)
37         {
38             throw WebmanExceptionHandler.getException(t);
39         }
40     }
41     public boolean isHandler(TKEvent evt)
42     {
43         return evt.getName().equalsIgnoreCase("TE_EDIT");
44     }
45 }
46
Popular Tags