KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > controls > api > context > ControlContainerContext


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

20
21 import org.apache.beehive.controls.api.bean.ControlBean;
22 import org.apache.beehive.controls.api.events.EventDispatcher;
23
24 /**
25  * The ControlContainerContext interface defines the basic contract between an external container
26  * of controls and the Controls runtime.
27  */

28 public interface ControlContainerContext extends EventDispatcher, ControlBeanContext
29 {
30     /**
31      * Makes the ControlContainerContext instance the current active context. This is
32      * called at the beginning of the execution scope for the control container.
33      */

34     public void beginContext();
35
36     /**
37      * Ends the active context associated with the ControlContainerContext. This is called
38      * at the end of the execution scope for the control container.
39      */

40     public void endContext();
41
42     /**
43      * Returns a ControlHandle to the component containing the control. This handle can be
44      * used to dispatch events and operations to a control instance. This method will return
45      * null if the containing component does not support direct dispatch.
46      */

47     public ControlHandle getControlHandle(ControlBean bean);
48 }
49
Popular Tags