1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.xmlhammer.gui.util;
24
25 import java.awt.Insets;
26
27 import javax.swing.Action;
28 import javax.swing.Icon;
29 import javax.swing.ImageIcon;
30 import javax.swing.JButton;
31
32 import org.bounce.image.ImageLoader;
33
34 /***
35 * Put comment...
36 *
37 * @version $Revision: 1.4 $, $Date: 2006/03/27 22:43:03 $
38 * @author Edwin Dankert <edankert@gmail.com>
39 */
40
41 public class BrowseButton extends JButton {
42 private static final long serialVersionUID = -6836499793490280798L;
43 private static final ImageIcon BROWSE_ICON = ImageLoader.get().getImage( "/org/xmlhammer/gui/icons/obj16/fldr_obj.gif");
44
45 public BrowseButton() {
46 this( "", BROWSE_ICON);
47 }
48
49 /***
50 * @param icon
51 */
52 public BrowseButton( Icon icon) {
53 this( "", icon);
54 }
55
56 /***
57 * @param text
58 */
59 public BrowseButton( String text) {
60 this( text, BROWSE_ICON);
61 }
62
63 /***
64 * @param a
65 */
66 public BrowseButton( Action a) {
67 super( a);
68 }
69
70 /***
71 * @param text
72 * @param icon
73 */
74 public BrowseButton( String text, Icon icon) {
75 super( text, icon);
76
77 setMargin( new Insets( 1, 1, 1, 1));
78 }
79
80 }