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