| 1 | package be.nikiroo.fanfix.reader.ui; |
| 2 | |
| 3 | import java.awt.BorderLayout; |
| 4 | |
| 5 | import javax.swing.JFrame; |
| 6 | |
| 7 | import be.nikiroo.fanfix.data.MetaData; |
| 8 | import be.nikiroo.fanfix.data.Story; |
| 9 | import be.nikiroo.fanfix.library.BasicLibrary; |
| 10 | |
| 11 | /** |
| 12 | * A frame displaying properties and other information of a {@link Story}. |
| 13 | * |
| 14 | * @author niki |
| 15 | */ |
| 16 | public class GuiReaderPropertiesFrame extends JFrame { |
| 17 | private static final long serialVersionUID = 1L; |
| 18 | |
| 19 | /** |
| 20 | * Create a new {@link GuiReaderPropertiesFrame}. |
| 21 | * |
| 22 | * @param ib |
| 23 | * the library to use for the cover image |
| 24 | * @param meta |
| 25 | * the meta to describe |
| 26 | */ |
| 27 | public GuiReaderPropertiesFrame(BasicLibrary lib, MetaData meta) { |
| 28 | setTitle(meta.getLuid() + ": " + meta.getTitle()); |
| 29 | |
| 30 | GuiReaderPropertiesPane desc = new GuiReaderPropertiesPane(lib, meta); |
| 31 | setSize(800, |
| 32 | (int) desc.getPreferredSize().getHeight() + 2 |
| 33 | * desc.getBorderThickness()); |
| 34 | |
| 35 | setLayout(new BorderLayout()); |
| 36 | add(desc, BorderLayout.NORTH); |
| 37 | } |
| 38 | } |