/[schmitzm]/trunk/src/skrueger/swing/OkButton.java
ViewVC logotype

Contents of /trunk/src/skrueger/swing/OkButton.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations)
Tue Feb 24 22:43:52 2009 UTC (16 years ago) by mojays
File size: 931 byte(s)
First Commit, corresponds to Revision 1008 of Wikisquare-SVN
includes:
- schmitzm.* (except schmitzm.test)
- org.geotools.* (all overridden classes)
- skrueger.geotools
- skrueger.i8n
- skrueger.swing
- appl.data.LateLoadable (dependency in SCHMITZM)
- appl.data.LoadingException (dependency in SCHMITZM)
- appl.util.RasterMetaData (dependency in SCHMITZM)

1 package skrueger.swing;
2
3 import java.awt.Dimension;
4
5 import javax.swing.Action;
6 import javax.swing.Icon;
7 import javax.swing.ImageIcon;
8 import javax.swing.JButton;
9
10 /**
11 * An Ok {@link JButton} without text, but with an expressive {@link Icon} that
12 * symbolizes OK
13 *
14 * @author <a href="mailto:[email protected]">Stefan Alfons Kr&uuml;ger</a>
15 */
16 public class OkButton extends JButton {
17
18 public static final Icon ICON_OK_SMALL = new ImageIcon(OkButton.class
19 .getResource("small/ok.png"));
20
21 private static final Dimension DIMENSION = new Dimension(35, 25);
22
23 /**
24 * Creates a {@link JButton} with an icon that symbolizes OK
25 */
26 public OkButton() {
27 super(ICON_OK_SMALL);
28 setMaximumSize(DIMENSION);
29 }
30
31 /**
32 * Creates a {@link JButton} with an icon that symbolizes OK
33 */
34 public OkButton(Action a) {
35 super(a);
36 setIcon(ICON_OK_SMALL);
37 setMaximumSize(DIMENSION);
38 }
39 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26