1 | public class FBButton extends JButton {↵ | | 1 | public class STButton extends JButton {↵
|
2 | private static final long serialVersionUID = -8734222381715897845L;↵ | | 2 | private static final long serialVersionUID = -1504866017961154906L;↵
|
|
3 | public FBButton() {↵ | | 3 | public STButton() {↵
|
4 | super();↵ | | 4 | super();↵
|
5 | initButton(false);↵ | | 5 | initButton(false);↵
|
6 | }↵ | | 6 | }↵
|
|
7 | public FBButton(Action a) {↵ | | 7 | public STButton(Action a) {↵
|
8 | super(a);↵ | | 8 | super(a);↵
|
9 | initButton(false);↵ | | 9 | initButton(false);↵
|
10 | }↵ | | 10 | }↵
|
|
11 | public FBButton(Icon icon) {↵ | | 11 | public STButton(Icon icon) {↵
|
12 | super(icon);↵ | | 12 | super(icon);↵
|
13 | initButton(false);↵ | | 13 | initButton(false);↵
|
14 | }↵ | | 14 | }↵
|
|
15 | public FBButton(String text, Icon icon) {↵ | | 15 | public STButton(String text, Icon icon) {↵
|
16 | super(text, icon);↵ | | 16 | super(text, icon);↵
|
17 | initButton(false);↵ | | 17 | initButton(false);↵
|
18 | }↵ | | 18 | }↵
|
|
19 | public FBButton(String text) {↵ | | 19 | public STButton(String text) {↵
|
20 | super(text);↵ | | 20 | super(text);↵
|
21 | initButton(false);↵ | | 21 | initButton(false);↵
|
22 | }↵ | | 22 | }↵
|
|
23 | public FBButton(boolean withdefaultBorder) {↵ | | 23 | public STButton(boolean withdefaultBorder) {↵
|
24 | super();↵ | | 24 | super();↵
|
25 | initButton(withdefaultBorder);↵ | | 25 | initButton(withdefaultBorder);↵
|
26 | }↵ | | 26 | }↵
|
|
27 | private void initButton(boolean withdefaultBorder) {↵ | | 27 | private void initButton(boolean withdefaultBorder) {↵
|
28 | if (!withdefaultBorder) {↵ | | 28 | if (!withdefaultBorder) {↵
|
29 | Border borderButton = BorderFactory.createEmptyBorder(5, 5, 5, 5);↵ | | 29 | Border borderButton = BorderFactory.createEmptyBorder(5, 5, 5, 5);↵
|
30 | this.setBorder(borderButton);↵ | | 30 | this.setBorder(borderButton);↵
|
31 | }↵ | | 31 | }↵
|
32 | this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));↵ | | 32 | this.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));↵
|
33 | | | 33 |
|