@Override
    protected void validate(T object)
    {
        boolean dirty = false;
        for (Painter<T> p : painters)
        {
            if (p instanceof AbstractPainter)
            {
                AbstractPainter<T> ap = (AbstractPainter<T>) p;
                ap.validate(object);
                if (ap.isDirty())
                {
                    dirty = true;
                    break;
                }
            }
        }
        clearLocalCacheOnly = true;
        setDirty(dirty); //super will call clear cache
        clearLocalCacheOnly = false;
    }
@ Override protected void validate ( T object ) { boolean dirty = false ; for ( Painter < T > p : painters ) { if ( p instanceof AbstractPainter ) { AbstractPainter < T > ap = ( AbstractPainter < T > ) p ; ap . validate ( object ) ; if ( ap . isDirty ( ) ) { dirty = true ; break ; } } } clearLocalCacheOnly = true ; setDirty ( dirty ) ; clearLocalCacheOnly = false ; }
<p>Iterates over all child <code>Painter</code>s and gives them a chance
to validate themselves. If any of the child painters are dirty, then
this <code>CompoundPainter</code> marks itself as dirty.</p>