KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > wcf > toolbar > ToolBarComponent


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.wcf.toolbar;
14
15 import org.w3c.dom.Element JavaDoc;
16
17 import com.tonbeller.wcf.controller.RequestContext;
18
19 /**
20  * Toolbar element like button, separator etc
21  * @author av
22  */

23 public interface ToolBarComponent {
24
25   /**
26    * renders the toolbar button
27    */

28   void render(RequestContext context, Element JavaDoc parent) throws Exception JavaDoc;
29
30   /**
31    * deferred ctor - initializes the button once after instantiation
32    */

33   void initialize(RequestContext context, ToolBar owner);
34   
35   /**
36    * an expression that evaluates to a boolean. If set, the button will be visible
37    * only if the boolen is true
38    */

39   void setVisibleExpr(String JavaDoc expr);
40
41   /**
42    * true if this button is visible
43    */

44   boolean isVisible(RequestContext context);
45
46   /**
47    * paints some space
48    */

49   boolean isSeparator();
50
51   /**
52    * default visible state in case no visibleExpr is set
53    */

54   void setVisible(boolean b);
55
56   /**
57    * default visible state in case no visibleExpr is set
58    */

59   boolean isVisible();
60  
61   /**
62    * must be unique within the toolbar. if null, the toolbar element
63    * will not be scriptable.
64    */

65   String JavaDoc getId();
66   
67 }
68
Popular Tags