Flyweight -
declares an interface through which flyweights (shared and unshared)
can receive and act on extrinsic state.
ConcreteFlyweight -
implements the Flyweight interface with shared objects.
UnsharedConcreteFlyweight -
implements the Flyweight interface with unshared objects.
FlyweightFactory -
provides methods for creating instances of Flyweight subclasses.
The instances may be shared (singletons).
Client -
stores or computes extrinsic state.
Java Swing Component Delegates
ComponentUI
is a Flyweight.
Each look-and-feel provides a ConcreteFlyweight for each subclass of
JComponent.
All extrinsic state is stored in JComponent objects.