+ /**
+ * Draw a "cached" icon and a partially transparent overlay if needed
+ * depending upon the selection and mouse-hover states on top of the normal
+ * component.
+ */
+ @Override
+ public void paint(Graphics g) {
+ super.paint(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));
+
+ Color color = new Color(255, 255, 255, 0);
+ if (!isEnabled()) {
+ } else if (selected && !hovered) {
+ color = new Color(80, 80, 100, 40);
+ } else if (!selected && hovered) {
+ color = new Color(230, 230, 255, 100);
+ } else if (selected && hovered) {
+ color = new Color(200, 200, 255, 100);
+ }
+
+ g.setColor(color);
+ g.fillRect(clip.x, clip.y, clip.width, clip.height);
+
+ if (cached) {
+ UIUtils.drawEllipse3D(g, Color.green.darker(), COVER_WIDTH
+ + HOFFSET + 30, 10, 20, 20);
+ }