Parent Directory
|
Revision Log
Aktuelle version wird als 2.1 gebranched, damit 2.2-SNAPSHOT auf GT2.6.3 umsteigen kann.
1 | alfonx | 476 | package skrueger.swing; |
2 | |||
3 | import java.awt.Font; | ||
4 | |||
5 | import javax.swing.Action; | ||
6 | import javax.swing.Icon; | ||
7 | import javax.swing.JButton; | ||
8 | import javax.swing.JLabel; | ||
9 | |||
10 | public class ThinButton extends JButton { | ||
11 | |||
12 | public static final float BUTTON_FONT_SIZE = 11; | ||
13 | public static final int BUTTON_FONT_STYLE = Font.PLAIN; | ||
14 | static final Font thinFont = new JLabel().getFont().deriveFont( | ||
15 | BUTTON_FONT_STYLE, BUTTON_FONT_SIZE); | ||
16 | |||
17 | public ThinButton(String label) { | ||
18 | this(label, null); | ||
19 | } | ||
20 | |||
21 | public ThinButton(Action action) { | ||
22 | super(action); | ||
23 | |||
24 | init(); | ||
25 | } | ||
26 | |||
27 | private void init() { | ||
28 | setFont(thinFont); | ||
29 | } | ||
30 | |||
31 | public ThinButton(String label, Icon icon) { | ||
32 | super(label, icon); | ||
33 | |||
34 | init(); | ||
35 | } | ||
36 | |||
37 | } |
Name | Value |
---|---|
svn:eol-style | native |
svn:keywords | Id URL |
svn:mime-type | text/plain |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |