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

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

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

revision 1.12.2.7 by gnu_andrew, Tue Aug 2 20:12:37 2005 UTC revision 1.12.2.8 by gnu_andrew, Wed Nov 2 00:43:47 2005 UTC
# Line 129  public class JToggleButton extends Abstr Line 129  public class JToggleButton extends Abstr
129       * Compatible with Sun's JDK.       * Compatible with Sun's JDK.
130       */       */
131      private static final long serialVersionUID = -1589950750899943974L;      private static final long serialVersionUID = -1589950750899943974L;
132          
133      /**      /**
134       * Sets the pressed state of the button.  The selected state       * Sets the pressed state of the button.  The selected state
135       * of the button also changes follwing the button being pressed.       * of the button also changes follwing the button being pressed.
# Line 174  public class JToggleButton extends Abstr Line 174  public class JToggleButton extends Abstr
174                                                ActionEvent.ACTION_PERFORMED,                                                ActionEvent.ACTION_PERFORMED,
175                                                actionCommand));                                                actionCommand));
176          }          }
   
177      }      }
178          
179          /**
180           * Checks if the button is selected.
181           *
182           * @returns true if the button is selected
183           */
184          public boolean isSelected()
185          {
186            return super.isSelected();
187          }
188          
189          /**
190           * Sets the selected state of the button.
191           *
192           * @param b true if button is selected
193           */
194          public void setSelected(boolean b)
195          {
196            super.setSelected(b);
197          }  
198    }    }
199    
200    /**    /**
# Line 276  public class JToggleButton extends Abstr Line 295  public class JToggleButton extends Abstr
295    
296      setModel(new ToggleButtonModel());        setModel(new ToggleButtonModel());  
297      model.setSelected(selected);      model.setSelected(selected);
298        setAlignmentX(LEFT_ALIGNMENT);
299    }    }
300    
301    /**    /**

Legend:
Removed from v.1.12.2.7  
changed lines
  Added in v.1.12.2.8

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