static final Color SPINE_COLOR_RIGHT = new Color(100, 100, 100);
static final Color BORDER = Color.black;
- public static final Color UNCACHED_ICON_COLOR = new Color(0, 80, 220);
+ public static final Color UNCACHED_ICON_COLOR = Color.green.darker();
+ // new Color(0, 80, 220);
public static final int TEXT_HEIGHT = 50;
public static final int TEXT_WIDTH = COVER_WIDTH + 40;
g.setColor(color);
g.fillRect(clip.x, clip.y, clip.width, clip.height);
- if (!cached) {
- UIUtils.drawEllipse3D(g, UNCACHED_ICON_COLOR, COVER_WIDTH + HOFFSET + 30, 10, 20, 20);
- }
+ UIUtils.drawEllipse3D(g, UNCACHED_ICON_COLOR, COVER_WIDTH + HOFFSET + 30, 10, 20, 20, cached);
}
/**
import java.awt.BorderLayout;
import java.awt.Color;
-import java.awt.Dimension;
import java.awt.Graphics;
import javax.swing.JLabel;
import javax.swing.JPanel;
+import javax.swing.SwingConstants;
import be.nikiroo.fanfix.data.Story;
import be.nikiroo.fanfix_swing.gui.BooksPanel;
* Initialise this {@link BookLine}.
*/
protected void init() {
- // TODO: image?
- iconCached = new JLabel(" ");
- iconNotCached = new JLabel(" * ");
+ iconCached = new JLabel(" ◉ ");
+ iconNotCached = new JLabel(" ○ ");
iconNotCached.setForeground(BookCoverImager.UNCACHED_ICON_COLOR);
+ iconCached.setForeground(BookCoverImager.UNCACHED_ICON_COLOR);
iconCached.setPreferredSize(iconNotCached.getPreferredSize());
title = new JLabel();
secondary = new JLabel();
secondary.setForeground(AUTHOR_COLOR);
+ JLabel id = new JLabel(info.getMeta().getLuid());
+ id.setPreferredSize(new JLabel(" 999 ").getPreferredSize());
+ id.setForeground(Color.gray);
+ id.setHorizontalAlignment(SwingConstants.CENTER);
+
+ JPanel idTitle = new JPanel(new BorderLayout());
+ idTitle.setOpaque(false);
+ idTitle.add(id, BorderLayout.WEST);
+ idTitle.add(title, BorderLayout.CENTER);
+
setLayout(new BorderLayout());
- add(title, BorderLayout.CENTER);
+ add(idTitle, BorderLayout.CENTER);
add(secondary, BorderLayout.EAST);
updateMeta();