@@ -0,0 +1,1324 @@
+package de.jangobrick.swapper;%0A%0Aimport java.awt.Component;%0A%0A%0A/**%0A * Base class for every Swapper component wrapper.%0A * %0A * The component is obtained %22on demand%22 by calling the subclass's%0A * %7B@link #build()%7D method. After that method has been called, the return value%0A * is stored, and it will not be called again.%0A * %0A * The instance may be accessed with %7B@link #getComponent()%7D.%0A * %0A * @param %3CC%3E The wrapped component type.%0A */%0Apublic abstract class Swap%3CC extends Component%3E%0A%7B%0A    private C component;%0A%0A    /**%0A     * Constructs this Swap's component.%0A     * %0A     * @return A new component instance.%0A     */%0A    protected abstract C build();%0A%0A    /**%0A     * Obtains the component wrapped by this instance, constructing it first if%0A     * necessary.%0A     * %0A     * @return The wrapped component.%0A     */%0A    public C getComponent()%0A    %7B%0A        if (component == null) %7B%0A            component = build();%0A        %7D%0A        return component;%0A    %7D%0A%0A    /**%0A     * Repaints the component.%0A     * %0A     * @return This instance.%0A     */%0A    public Swap%3CC%3E repaint()%0A    %7B%0A        getComponent().repaint();%0A        return this;%0A    %7D%0A%0A    /**%0A     * Revalidates the component.%0A     * %0A     * @return This instance.%0A     */%0A    public Swap%3CC%3E revalidate()%0A    %7B%0A        getComponent().revalidate();%0A        return this;%0A    %7D%0A%7D%0A

Add `Swap` base class