1 7 package com.sun.java.swing.plaf.nimbus; 8 9 import java.awt.*; 10 import java.awt.geom.*; 11 import java.awt.image.*; 12 import javax.swing.*; 13 import com.sun.java.swing.Painter; 14 15 17 public final class TabbedPanePainter extends AbstractRegionPainter { 18 static final int BACKGROUND_DISABLED = 1; 23 static final int BACKGROUND_ENABLED = 2; 24 static final int BACKGROUND_FOCUSED = 3; 25 static final int BACKGROUND_MOUSEOVER = 4; 26 static final int BACKGROUND_PRESSED = 5; 27 28 29 private int state; private PaintContext ctx; 31 32 private Path2D path = new Path2D.Float(); 34 private Rectangle2D rect = new Rectangle2D.Float(0, 0, 0, 0); 35 private RoundRectangle2D roundRect = new RoundRectangle2D.Float(0, 0, 0, 0, 0, 0); 36 private Ellipse2D ellipse = new Ellipse2D.Float(0, 0, 0, 0); 37 38 42 43 private Object [] componentColors; 45 46 public TabbedPanePainter(PaintContext ctx, int state) { 47 super(); 48 this.state = state; 49 this.ctx = ctx; 50 } 51 52 @Override 53 protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object [] extendedCacheKeys) { 54 componentColors = extendedCacheKeys; 56 switch(state) { 59 60 } 61 } 62 63 64 65 @Override 66 protected final PaintContext getPaintContext() { 67 return ctx; 68 } 69 70 71 72 73 74 75 } 76 | Popular Tags |