1 package org.telscenter.pas.authortool.cards;
2
3 import java.awt.BorderLayout;
4
5 import javax.swing.BorderFactory;
6 import javax.swing.JComponent;
7 import javax.swing.JMenu;
8 import javax.swing.JPanel;
9
10 import org.telscenter.pas.authortool.common.util.BannerPanel;
11 import org.telscenter.pas.authortool.context.CurnitAuthoringContext;
12
13
14 public abstract class AbstractCurnitAuthoringCard extends JPanel {
15
16 protected CurnitAuthoringContext curnitAuthoringContext;
17
18 public AbstractCurnitAuthoringCard(
19 final CurnitAuthoringContext curnitAuthoringContext) {
20 this.curnitAuthoringContext = curnitAuthoringContext;
21 setLayout(new BorderLayout());
22
23 final BannerPanel bannerPanel = new BannerPanel(getTitle(), this);
24
25 add(bannerPanel, BorderLayout.NORTH);
26
27 setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2));
28 add(createContentArea(), BorderLayout.CENTER);
29 }
30
31 protected abstract JComponent createContentArea();
32
33 protected abstract String getTitle();
34
35
36 public abstract JMenu getMenu();
37 }