1 /*
2 * Copyright (c) 2003-2008 by Cosylab d. d.
3 *
4 * This file is part of CosyBeans-Common.
5 *
6 * CosyBeans-Common is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * CosyBeans-Common is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with CosyBeans-Common. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 package com.cosylab.gui.components;
21
22 import java.awt.BorderLayout;
23 import javax.swing.JPanel;
24 import javax.swing.JFrame;
25
26 public class LabelledLedderTester extends JFrame {
27
28 private static final long serialVersionUID = 1L;
29
30 private JPanel jContentPane = null;
31
32 private LabelledLedder labelledLedder = null;
33
34 /**
35 * This is the default constructor
36 */
37 public LabelledLedderTester() {
38 super();
39 initialize();
40 }
41
42 /**
43 * This method initializes this
44 *
45 * @return void
46 */
47 private void initialize() {
48 this.setSize(300, 200);
49 this.setContentPane(getJContentPane());
50 this.setTitle("JFrame");
51 }
52
53 /**
54 * This method initializes jContentPane
55 *
56 * @return javax.swing.JPanel
57 */
58 private JPanel getJContentPane() {
59 if (jContentPane == null) {
60 jContentPane = new JPanel();
61 jContentPane.setLayout(new BorderLayout());
62 jContentPane.add(getLabelledLedder(), BorderLayout.CENTER);
63 }
64 return jContentPane;
65 }
66
67 /**
68 * This method initializes labelledLedder
69 *
70 * @return com.cosylab.gui.components.LabelledLedder
71 */
72 private LabelledLedder getLabelledLedder() {
73 if (labelledLedder == null) {
74 labelledLedder = new LabelledLedder();
75
76 labelledLedder.setEditable(true);
77 labelledLedder.setTitle("Title");
78 labelledLedder.setMask(111L);
79 }
80 return labelledLedder;
81 }
82
83 } // @jve:decl-index=0:visual-constraint="9,5"