]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /** @file\r |
2 | \r | |
3 | The file is used to override JLabel to provides customized interfaces \r | |
4 | \r | |
5 | Copyright (c) 2006, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | package org.tianocore.packaging.common.ui;\r | |
17 | \r | |
18 | import javax.swing.JLabel;\r | |
19 | \r | |
20 | /**\r | |
21 | The class is used to override JLabel to provides customized interfaces \r | |
22 | \r | |
23 | @since ModuleEditor 1.0\r | |
24 | \r | |
25 | **/\r | |
26 | public class StarLabel extends JLabel {\r | |
27 | \r | |
28 | ///\r | |
29 | /// Define class Serial Version UID\r | |
30 | ///\r | |
31 | private static final long serialVersionUID = -6702981027831543919L;\r | |
32 | \r | |
33 | /**\r | |
34 | Main class, reserved for test\r | |
35 | \r | |
36 | @param args\r | |
37 | \r | |
38 | **/\r | |
39 | public static void main(String[] args) {\r | |
40 | // TODO Auto-generated method stub\r | |
41 | \r | |
42 | }\r | |
43 | \r | |
44 | /**\r | |
45 | This is the default constructor\r | |
46 | \r | |
47 | **/\r | |
48 | public StarLabel() {\r | |
49 | super();\r | |
50 | init();\r | |
51 | }\r | |
52 | \r | |
53 | /**\r | |
54 | To create a RED, BOLD and 14 size "*"\r | |
55 | \r | |
56 | **/\r | |
57 | private void init() {\r | |
58 | this.setText("*");\r | |
59 | this.setSize(new java.awt.Dimension(10, 20));\r | |
60 | this.setForeground(java.awt.Color.red);\r | |
61 | this.setFont(new java.awt.Font("DialogInput", java.awt.Font.BOLD, 14));\r | |
62 | this.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r | |
63 | }\r | |
64 | }\r |