KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > woody > formmodel > WidgetDefinition


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.woody.formmodel;
17
18 import org.xml.sax.ContentHandler JavaDoc;
19 import org.xml.sax.SAXException JavaDoc;
20
21 /**
22  * A WidgetDefinition holds all the static information about a Widget. It's
23  * function is a lot like that of the class in Java. Users of the Woody framework
24  * usually won't have to bother with the WidgetDefinition's, but will rather use
25  * the Widget's themselves.
26  *
27  * @version CVS $Id: WidgetDefinition.java 30932 2004-07-29 17:35:38Z vgritsenko $
28  */

29 public interface WidgetDefinition {
30
31     /**
32      * Gets the {@link FormDefinition}.
33      */

34     public FormDefinition getFormDefinition();
35
36     /**
37      * Sets the parent of this definition
38      */

39     public void setParent(WidgetDefinition definition);
40
41     /**
42      * Gets source location of this widget definition.
43      */

44     public String JavaDoc getLocation();
45
46     /**
47      * Gets id of this widget definition.
48      */

49     public String JavaDoc getId();
50
51     /**
52      * Creates and returns a widget based on this widget definition.
53      */

54     public Widget createInstance();
55
56     /**
57      * Generates SAX events for named display data.
58      */

59     public void generateDisplayData(String JavaDoc name, ContentHandler JavaDoc contentHandler) throws SAXException JavaDoc;
60
61     /**
62      * Generates SAX events for display data.
63      */

64     public void generateDisplayData(ContentHandler JavaDoc contentHandler) throws SAXException JavaDoc;
65
66     /**
67      * Generates SAX events for the label of this widget.
68      */

69     public void generateLabel(ContentHandler JavaDoc contentHandler) throws SAXException JavaDoc;
70 }
71
Popular Tags