01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: * $Header:$
18: */
19: package org.apache.beehive.controls.api.context;
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,
29: ControlBeanContext {
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: }
|