6 |
|
|
7 |
public class SmallButton extends JButton { |
public class SmallButton extends JButton { |
8 |
|
|
9 |
|
public SmallButton() { |
10 |
|
setBorder(BorderFactory.createCompoundBorder(BorderFactory |
11 |
|
.createEtchedBorder(), BorderFactory.createEmptyBorder(0, 1, 0, |
12 |
|
3))); |
13 |
|
} |
14 |
|
|
15 |
public SmallButton(Action action, String tooltip) { |
public SmallButton(Action action, String tooltip) { |
16 |
this (action); |
this(action); |
17 |
if (tooltip != null) |
setToolTipText(tooltip); |
18 |
setToolTipText(tooltip); |
} |
19 |
|
|
20 |
|
public SmallButton(String label) { |
21 |
|
this(); |
22 |
|
setText(label); |
23 |
|
} |
24 |
|
|
25 |
|
public SmallButton(String label, String toolTip) { |
26 |
|
this(); |
27 |
|
setText(label); |
28 |
|
setToolTipText(toolTip); |
29 |
} |
} |
30 |
|
|
31 |
public SmallButton(Action action) { |
public SmallButton(Action action) { |
32 |
super(action); |
this(); |
33 |
setBorder(BorderFactory.createEtchedBorder()); |
setAction(action); |
34 |
} |
} |
35 |
|
|
36 |
} |
} |