+ paintOverlay(g);
+ }
+
+ /**
+ * Draw a partially transparent overlay if needed depending upon the
+ * selection and mouse-hover states on top of the normal component, as well
+ * as a possible "cached" icon if the item is cached.
+ */
+ public void paintOverlay(Graphics g) {
+ Rectangle clip = g.getClipBounds();
+ if (clip.getWidth() <= 0 || clip.getHeight() <= 0) {
+ return;
+ }
+
+ int h = COVER_HEIGHT;
+ int w = COVER_WIDTH;
+ int xOffset = (TEXT_WIDTH - COVER_WIDTH) - 1;
+ int yOffset = HOFFSET;
+
+ if (BORDER != null) {
+ if (BORDER != null) {
+ g.setColor(BORDER);
+ g.drawRect(xOffset, yOffset, COVER_WIDTH, COVER_HEIGHT);
+ }
+
+ xOffset++;
+ yOffset++;
+ }
+
+ int[] xs = new int[] { xOffset, xOffset + SPINE_WIDTH,
+ xOffset + w + SPINE_WIDTH, xOffset + w };
+ int[] ys = new int[] { yOffset + h, yOffset + h + SPINE_HEIGHT,
+ yOffset + h + SPINE_HEIGHT, yOffset + h };
+ g.setColor(SPINE_COLOR_BOTTOM);
+ g.fillPolygon(new Polygon(xs, ys, xs.length));
+ xs = new int[] { xOffset + w, xOffset + w + SPINE_WIDTH,
+ xOffset + w + SPINE_WIDTH, xOffset + w };
+ ys = new int[] { yOffset, yOffset + SPINE_HEIGHT,
+ yOffset + h + SPINE_HEIGHT, yOffset + h };
+ g.setColor(SPINE_COLOR_RIGHT);
+ g.fillPolygon(new Polygon(xs, ys, xs.length));