by arthurlewis · 1y ago · 0 comments
> Decorator subclasses are free to add operations for specific functionality. For example, ScrollDecorator’s ScrollTo operation lets other objects scroll the interface if they know there happens to be a ScrollDecorator object in the interface.
> ...The important aspect of this pattern is that it lets decorators appear anywhere a VisualComponent can. That way clients generally can't tell the difference between a decorated component and an undecorated one, and so they don't depend at all on the decoration.
and further on:
> The decorator conforms to the interface of the component it decorates so that its presence is transparent to the component's clients.