gui: code cleanup for properties
[fanfix.git] / src / be / nikiroo / fanfix / reader / ui / GuiReaderPropertiesFrame.java
CommitLineData
14bb95fa
NR
1package be.nikiroo.fanfix.reader.ui;
2
3import java.awt.BorderLayout;
14bb95fa 4
14bb95fa 5import javax.swing.JFrame;
14bb95fa
NR
6
7import be.nikiroo.fanfix.data.MetaData;
31e28683 8import be.nikiroo.fanfix.data.Story;
5beb7cdc 9import 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
16public 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}