+
+ public String getLuid() {
+ return luid;
+ }
+
+ /**
+ * This boos is cached into the {@link LocalReader} library.
+ *
+ * @return the cached
+ */
+ public boolean isCached() {
+ return cached;
+ }
+
+ /**
+ * This boos is cached into the {@link LocalReader} library.
+ *
+ * @param cached
+ * the cached to set
+ */
+ public void setCached(boolean cached) {
+ this.cached = cached;
+ }
+
+ @Override
+ public void paint(Graphics g) {
+ super.paint(g);
+
+ int h = COVER_HEIGHT;
+ int w = COVER_WIDTH;
+ int xOffset = (TEXT_WIDTH - COVER_WIDTH) - 4;
+
+ int[] xs = new int[] { xOffset, xOffset + SPINE_WIDTH,
+ xOffset + w + SPINE_WIDTH, xOffset + w };
+ int[] ys = new int[] { HOFFSET + h, HOFFSET + h + SPINE_HEIGHT,
+ HOFFSET + h + SPINE_HEIGHT, HOFFSET + 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[] { HOFFSET, HOFFSET + SPINE_HEIGHT,
+ HOFFSET + h + SPINE_HEIGHT, HOFFSET + 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);
+ }
+
+ Rectangle clip = g.getClipBounds();
+ if (cached) {
+ g.setColor(Color.green);
+ g.fillOval(clip.x + clip.width - 30, 10, 20, 20);
+ }
+
+ g.setColor(color);
+ g.fillRect(clip.x, clip.y, clip.width, clip.height);
+ }