View Javadoc

1   /*
2      Copyright 2002-2006 Martin van den Bemt
3   
4      Licensed under the Apache License, Version 2.0 (the "License");
5      you may not use this file except in compliance with the License.
6      You may obtain a copy of the License at
7   
8          http://www.apache.org/licenses/LICENSE-2.0
9   
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15  */
16  package org.xulux.guilayer.swing.extensions;
17  
18  import javax.swing.Action;
19  import javax.swing.Icon;
20  import javax.swing.JButton;
21  
22  /**
23   * 
24   * @author Martin van den Bemt
25   * @version $Id: XuluxJButton.java,v 1.1 2005/12/18 12:58:18 mvdb Exp $
26   */
27  public class XuluxJButton extends JButton {
28  
29      /**
30       * 
31       */
32      public XuluxJButton() {
33          super();
34  
35      }
36  
37      /**
38       * @param icon
39       */
40      public XuluxJButton(Icon icon) {
41          super(icon);
42  
43      }
44  
45      /**
46       * @param text
47       */
48      public XuluxJButton(String text) {
49          super(text);
50  
51      }
52  
53      /**
54       * @param a
55       */
56      public XuluxJButton(Action a) {
57          super(a);
58  
59      }
60  
61      /**
62       * @param text
63       * @param icon
64       */
65      public XuluxJButton(String text, Icon icon) {
66          super(text, icon);
67  
68      }
69  
70      protected boolean focusTraversable = true;
71      
72      public void setFocusTraversable(boolean b) {
73          this.focusTraversable = b;
74      }
75      
76      /**
77       * @see java.awt.Component#isFocusTraversable()
78       */
79      public boolean isFocusTraversable() {
80          return focusTraversable;
81      }
82  }