X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix_swing%2Fgui%2Fbook%2FBookLine.java;h=beb4c973674eb2b6483e28aa28bc6647224710e7;hb=e7d4218c344d292a7450a4c18bbcab1e567d8d9a;hp=6437f613459ad895cf37e648630cded4d99fde87;hpb=3cdf3fd8a60d22a592e1cd0634cb108faa1f5f9f;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix_swing/gui/book/BookLine.java b/src/be/nikiroo/fanfix_swing/gui/book/BookLine.java index 6437f61..beb4c97 100644 --- a/src/be/nikiroo/fanfix_swing/gui/book/BookLine.java +++ b/src/be/nikiroo/fanfix_swing/gui/book/BookLine.java @@ -6,6 +6,7 @@ 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; @@ -51,16 +52,29 @@ public class BookLine extends JPanel { * 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(); @@ -154,7 +168,7 @@ public class BookLine extends JPanel { String main = info.getMainInfo(); String optSecondary = info.getSecondaryInfo(seeWordCount); - //TODO: max size limit? + // TODO: max size limit? title.setText(main); secondary.setText(optSecondary + " ");