public interface Composite
Definition of an interface for components that can contain other components.
This interface is used during the process of constructing the GUI. Some
container tags exists whose content is defined by nested tags. These nested
tags created concrete GUI elements and then ensure that the newly created
elements are added to the container. To support this a Composite
must define a method for adding sub components.
Another important point is that containers are typically associated with a layout. This interface supports layouts by defining a method for setting such an object.
In the form builder framework not only specific container tags implement this interface. There is also a special implementation for the top level or root container (which is the container object to which all components created by the builder are added). All tags that are not nested inside a container tag will be added to this root container.
Modifier and Type | Method and Description |
---|---|
void |
addComponent(Object comp,
Object constraints)
Adds the specified component to this container using the given
constraints.
|
Object |
getContainer()
Returns the concrete container component that is wrapped by this object.
|
void |
setLayout(Object layout)
Sets the layout object for this container.
|
void addComponent(Object comp, Object constraints)
comp
- the component to addconstraints
- the constraints (may be null )void setLayout(Object layout)
layout
- the layout objectObject getContainer()
Copyright © 2016 The JGUIraffe Team. All rights reserved.