View Javadoc

1   /*
2    * $Id: BrowseButton.java,v 1.4 2006/03/27 22:43:03 edankert Exp $
3    *
4    * The contents of this file are subject to the Mozilla Public License 
5    * Version 1.1 (the "License"); you may not use this file except in 
6    * compliance with the License. You may obtain a copy of the License at 
7    * http://www.mozilla.org/MPL/ 
8    *
9    * Software distributed under the License is distributed on an "AS IS" basis, 
10   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 
11   * for the specific language governing rights and limitations under the License.
12   *
13   * The Original Code is XML Hammer code. (org.xmlhammer.*)
14   *
15   * The Initial Developer of the Original Code is Edwin Dankert. Portions created 
16   * by the Initial Developer are Copyright (C) 2005 - 2006 the Initial Developer. 
17   * All Rights Reserved.
18   *
19   * Contributor(s): Edwin Dankert <edankert@gmail.com>
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  }