Merge commit '7a455971fed716123933d0f685a0d6eebcf3282b'
[fanfix.git] / src / be / nikiroo / fanfix / reader / ui / GuiReaderPropertiesFrame.java
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.bundles.StringIdGui;
8 import be.nikiroo.fanfix.data.MetaData;
9 import be.nikiroo.fanfix.data.Story;
10 import be.nikiroo.fanfix.library.BasicLibrary;
11
12 /**
13 * A frame displaying properties and other information of a {@link Story}.
14 *
15 * @author niki
16 */
17 public class GuiReaderPropertiesFrame extends JFrame {
18 private static final long serialVersionUID = 1L;
19
20 /**
21 * Create a new {@link GuiReaderPropertiesFrame}.
22 *
23 * @param lib
24 * the library to use for the cover image
25 * @param meta
26 * the meta to describe
27 */
28 public GuiReaderPropertiesFrame(BasicLibrary lib, MetaData meta) {
29 setTitle(GuiReader.trans(StringIdGui.TITLE_STORY, meta.getLuid(),
30 meta.getTitle()));
31
32 GuiReaderPropertiesPane desc = new GuiReaderPropertiesPane(lib, meta);
33 setSize(800,
34 (int) desc.getPreferredSize().getHeight() + 2
35 * desc.getBorderThickness());
36
37 setLayout(new BorderLayout());
38 add(desc, BorderLayout.NORTH);
39 }
40 }