X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2FLocalReaderBook.java;h=c716bd3aa47d75f3d3171aaf3d07f261c154bbad;hp=a9b24a2019f7c2902c40c97be63ca672430e7c46;hb=10d558d2429c984327f9e5a16933fefe5cc37314;hpb=63985d926fe1649517bc06d8f50761925b4c9984 diff --git a/src/be/nikiroo/fanfix/reader/LocalReaderBook.java b/src/be/nikiroo/fanfix/reader/LocalReaderBook.java index a9b24a2..c716bd3 100644 --- a/src/be/nikiroo/fanfix/reader/LocalReaderBook.java +++ b/src/be/nikiroo/fanfix/reader/LocalReaderBook.java @@ -68,8 +68,13 @@ class LocalReaderBook extends JPanel { private Date lastClick; private long doubleClickDelay = 200; // in ms private List listeners; + private String luid; + private boolean cached; + + public LocalReaderBook(MetaData meta, boolean cached) { + this.luid = meta.getLuid(); + this.cached = cached; - public LocalReaderBook(MetaData meta) { if (meta.getCover() != null) { BufferedImage resizedImage = new BufferedImage(SPINE_WIDTH + COVER_WIDTH, SPINE_HEIGHT + COVER_HEIGHT + HOFFSET, @@ -179,6 +184,29 @@ class LocalReaderBook extends JPanel { listeners.add(listener); } + 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); @@ -211,6 +239,11 @@ class LocalReaderBook extends JPanel { } 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); }