next up previous NU-CCS-99-04.ps [ Readme | Copyright | Tutorial | Download | Feedback ]


Next: BeanBox Enhancements Up: ContextBox: A BeanBox Environment Components Previous: Assembly and Design Environments

Manipulation and Representation of Context Beans

  The essence of the runtime containment and service protocol [9] is that (BeanContext) beans may be placed in (and removed from) their enclosing BeanContext bean. The BeanContext hence becomes a container of objects, which not only establishes a logical hierarchical structure, but also provides to its inhabitants a service discovery (and obtaining) protocol. In this section we describe how new support for runtime containment and service protocol can be seamlessly added to the BeanBox.

In order to test beans implementing the BeanContext interface in a visual development environment, the beans need to have some kind of visual representation. Without such a representation, it would be impossible to manipulate them visually at assembly and design time.

Several difficulties arise. When a new ContextBean is added to the BeanBox there is the question of how to represent that bean visually. The visual representation can be provided either by the bean author or by the development environment. Moreover, the bean can be a BeanContextProxy and itself a visual container (extends java.awt.Container). In that case, there are two hierarchies to maintain and a possibility for inconsistency between the two.

The BeanBox distinguishes (when visual representation is concerned) only between visual beans (that are a kind of java.awt.Component) and non-visual ones. A non-visual bean is represented by a special label object (an instance of sun.beanbox.OurLabel), which displays the bean's name. When hide invisible beans mode is selected or design mode is disabled , the labels representing non-visual beans are hidden. When enhancing the BeanBox with support for runtime containment and services protocol, there is also the BeanContext or BeanContextProxy case to consider.

Every bean can have a Component or Container, and/or a BeanContext, associated with it. A bean can establish that relationships either through inheritance by extending one of BeanContext, Component or Container classes, or by being a BeanContextProxy or a BeanContextContainerProxy or a BeanContextChildComponentProxy for that object.[*]

There are 6 combinations to consider, for each we offer a different policy concerning the visual representation:


next up previous NU-CCS-99-04.ps [ Readme | Copyright | Tutorial | Download | Feedback ]


Next: BeanBox Enhancements Up: ContextBox: A BeanBox Environment Components Previous: Assembly and Design Environments

David H. Lorenz
3/17/2000