@@ -0,0 +1,2446 @@
+/*%0A * Copyright (c) 2009 Kathryn Huxtable and Kenneth Orr.%0A *%0A * This file is part of the SeaGlass Pluggable Look and Feel.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * %0A * $Id$%0A */%0Apackage com.seaglass.painter;%0A%0Aimport java.awt.Color;%0Aimport java.awt.Graphics2D;%0Aimport java.awt.geom.Rectangle2D;%0A%0Aimport javax.swing.JComponent;%0A%0A/**%0A */%0Apublic final class FileChooserBackgroundPainter extends AbstractRegionPainter %7B%0A    public static final int BACKGROUND_ENABLED      = 1;%0A%0A    private int             state;%0A    private PaintContext    ctx;%0A%0A    // the following 4 variables are reused during the painting code of the%0A    // layers%0A    private Rectangle2D     rect                    = new Rectangle2D.Float(0, 0, 0, 0);%0A%0A    // All Colors used for painting are stored here. Ideally, only those colors%0A    // being used%0A    // by a particular instance of FileChooserBackgroundPainter would be created. For the%0A    // moment at least,%0A    // however, all are created for each instance.%0A    private Color           color1                  = new Color(214, 217, 223);%0A%0A    public FileChooserBackgroundPainter(PaintContext ctx, int state) %7B%0A        super();%0A        this.state = state;%0A        this.ctx = ctx;%0A    %7D%0A%0A    protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object%5B%5D extendedCacheKeys) %7B%0A        switch (state) %7B%0A        case BACKGROUND_ENABLED:%0A            paintBackgroundEnabled(g);%0A            break;%0A        %7D%0A    %7D%0A%0A    protected final PaintContext getPaintContext() %7B%0A        return ctx;%0A    %7D%0A%0A    private void paintBackgroundEnabled(Graphics2D g) %7B%0A        rect = decodeRect1();%0A        g.setPaint(color1);%0A        g.fill(rect);%0A%0A    %7D%0A%0A    private Rectangle2D decodeRect1() %7B%0A        rect.setRect(decodeX(1.0f), // x%0A            decodeY(1.0f), // y%0A            decodeX(2.0f) - decodeX(1.0f), // width%0A            decodeY(2.0f) - decodeY(1.0f)); // height%0A        return rect;%0A    %7D%0A%7D%0A

Add FileChooserBackgroundPainter. This is a stopgap.