/[classpath]/classpath/javax/swing/JButton.java
ViewVC logotype

Diff of /classpath/javax/swing/JButton.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mark, Thu Jul 8 19:26:23 2004 UTC revision 1.10 by mark, Thu Jul 22 19:45:39 2004 UTC
# Line 41  import javax.accessibility.Accessible; Line 41  import javax.accessibility.Accessible;
41  import javax.accessibility.AccessibleContext;  import javax.accessibility.AccessibleContext;
42  import javax.swing.plaf.ButtonUI;  import javax.swing.plaf.ButtonUI;
43    
44    
45  /**  /**
46   * An instance of JButton can be added to a panel, frame etc   * An instance of JButton can be added to a panel, frame etc
47   *   *
48   * @author Ronald Veldema (rveldema@cs.vu.nl)   * @author Ronald Veldema (rveldema@cs.vu.nl)
49   */   */
50  public class JButton extends AbstractButton implements Accessible  public class JButton extends AbstractButton
51      implements Accessible
52  {  {
53    private static final long serialVersionUID = -1907255238954382202L;    private static final long serialVersionUID = -1907255238954382202L;
54      boolean def;
55      boolean def, is_def;    boolean is_def;
   
56            
57      public JButton()      public JButton()
58      {      {
# Line 98  public class JButton extends AbstractBut Line 99  public class JButton extends AbstractBut
99        
100      public String getUIClassID()      public String getUIClassID()
101      {      {
102          //Returns a string that specifies the name of the Look and Feel      //Returns a string that specifies the name of the L&F class that renders this component.  
         //class that renders this component.    
103          return "ButtonUI";          return "ButtonUI";
104      }      }
105        
# Line 120  public class JButton extends AbstractBut Line 120  public class JButton extends AbstractBut
120          return "JButton";          return "JButton";
121      }      }
122            
123      /**
124       * Overrides JComponent.removeNotify to check if this button is currently
125       * set as the default button on the RootPane, and if so, sets the RootPane's
126       * default button to null to ensure the RootPane doesn't hold onto an invalid
127       * button reference.
128       */
129      public void removeNotify()      public void removeNotify()
130      {      {
         //Overrides JComponent.removeNotify to check if this button is currently set as the default button on the RootPane, and if so, sets the RootPane's default button to null to ensure the RootPane doesn't hold onto an invalid button reference.    
131      }      }
132            
133      public void setDefaultCapable(boolean defaultCapable)      public void setDefaultCapable(boolean defaultCapable)
134      {   def = defaultCapable;    }    {
135        def = defaultCapable;
136      }
137            
138      public void updateUI()      public void updateUI()
139      {      {
140          ButtonUI b = (ButtonUI)UIManager.getUI(this);      setUI((ButtonUI) UIManager.getUI(this));
         setUI(b);  
141      }      }
142  }  }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26