import java.util.*; /** * A folder-style box in a UML diagram. Packages can be rendered in two forms: * (1) as expandable boundaries around their contents; (2) using line segments * with hollow-diamond aggregation symbols to render contents in a tree-style * layout. * <p> * When a package diagram is rendered, the following layout algorithm is used: * <p> * (1) Find top-level components, i.e., UML diagram elements that are not * contained in any other component, or which are the top of an * intra-package inheritance hiearchy. * <p> * (2) Draw the top-level components in lexical order, vertically or * horizonatlly as determined by the value of a user-level layout setting * <p> * (3) Complete the drawing by recursively descending into the aggregation * and inheritance hierchies that are below the top-level components. */ public class UMLPackage extends UMLDiagramElement { /** * List of the package's components, which are packages, classes, or * operations. */ protected List<UMLDiagramElement> components; /** * Defines the style of drawing of sub-elements. If true, contained * elements are drawn within the boundaries of this package box. If * showAsContained is false, elements are drawn with weak-agregation * connection lines. */ protected boolean showAsContained; }