gui: code cleanup for properties
[fanfix.git] / src / be / nikiroo / fanfix / reader / ui / GuiReaderPropertiesFrame.java
... / ...
CommitLineData
1package be.nikiroo.fanfix.reader.ui;
2
3import java.awt.BorderLayout;
4
5import javax.swing.JFrame;
6
7import be.nikiroo.fanfix.data.MetaData;
8import be.nikiroo.fanfix.data.Story;
9import be.nikiroo.fanfix.library.BasicLibrary;
10
11/**
12 * A frame displaying properties and other information of a {@link Story}.
13 *
14 * @author niki
15 */
16public 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}