/[schmitzm]/branches/2.2.x/src/skrueger/swing/ThinButton.java
ViewVC logotype

Annotation of /branches/2.2.x/src/skrueger/swing/ThinButton.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 897 - (hide annotations)
Mon Jun 7 14:14:39 2010 UTC (14 years, 8 months ago) by alfonx
File MIME type: text/plain
File size: 676 byte(s)
Das ist 2.2-SNAPSHOT

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     }

Properties

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