This makes it easy to make a line stay attached to a box when the box moves. Handles are an example of the AdapterPattern . When you select a figure, it presents a set of handles. Each handle controls an aspect of the figure, such as its background color, its location, or its size. When you drag a handle around, you change that aspect.
Figures use the FactoryMethodPattern to create handles.
The combination of using factory methods to create adapters is used several times in HotDraw . Some versions of HotDraw use it to enable each figure to produce Locators, which are objects that can refer to a point on a figure. A third place where factory methods create adapters is to make tools. A tool describes the input mode of a drawing editor, and is a State in the StatePattern . The drawing editor has a tool palette from which users select the current tool.