Mercurial > repos > timpalpant > java_genomics_toolkit
comparison java-genomics-toolkit/gui/edu/unc/genomics/ButtonLabel.java @ 0:1daf3026d231
Upload alpha version
author | timpalpant |
---|---|
date | Mon, 13 Feb 2012 21:55:55 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1daf3026d231 |
---|---|
1 package edu.unc.genomics; | |
2 | |
3 import javax.swing.Action; | |
4 import javax.swing.BorderFactory; | |
5 import javax.swing.Icon; | |
6 import javax.swing.JButton; | |
7 | |
8 /** | |
9 * Act like a button, look like a label | |
10 * | |
11 * @author timpalpant | |
12 * | |
13 */ | |
14 public class ButtonLabel extends JButton { | |
15 | |
16 private static final long serialVersionUID = -4449260534784095223L; | |
17 | |
18 public ButtonLabel() { | |
19 init(); | |
20 } | |
21 | |
22 public ButtonLabel(Icon icon) { | |
23 super(icon); | |
24 init(); | |
25 } | |
26 | |
27 public ButtonLabel(String text) { | |
28 super(text); | |
29 init(); | |
30 } | |
31 | |
32 public ButtonLabel(Action a) { | |
33 super(a); | |
34 init(); | |
35 } | |
36 | |
37 public ButtonLabel(String text, Icon icon) { | |
38 super(text, icon); | |
39 init(); | |
40 } | |
41 | |
42 private void init() { | |
43 setBorder(BorderFactory.createEmptyBorder()); | |
44 setBorderPainted(false); | |
45 setContentAreaFilled(false); | |
46 setFocusPainted(false); | |
47 setOpaque(false); | |
48 } | |
49 | |
50 } |