Changes

Jump to: navigation, search

Decorator

396 bytes added, 18:56, 26 February 2007
Motivation
==Motivation==
As an example we can look at graphical user interface toolkits where we want to add responsibility such as scrolling behaviour or border property to individual objects, not to an entire class. By using inheritance to add responsibility to a user interface component is inflexible because it is made statically. A better approach is wrapping the decorator component in another object dynamically.
==Sample Code==
1
edit

Navigation menu