/[schmitzm]/trunk/src/skrueger/swing/TranslationAskJDialog.java
ViewVC logotype

Diff of /trunk/src/skrueger/swing/TranslationAskJDialog.java

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

revision 418 by mojays, Wed Aug 26 11:03:27 2009 UTC revision 419 by alfonx, Wed Sep 30 15:36:39 2009 UTC
# Line 200  public class TranslationAskJDialog exten Line 200  public class TranslationAskJDialog exten
200          }          }
201    
202          /**          /**
203           * Called when the dilaog is closed using the cancel button.           * Called when the dilaog is closed using the cancel button. When
204             * overwriting this method, call super.cancel() after restoring your
205             * properties.
206           */           */
207          protected void cancel() {          public void cancel() {
208                  restore();                  restore();
209                  firePropertyChange(PROPERTY_CANCEL_AND_CLOSE, null, null);                  firePropertyChange(PROPERTY_CANCEL_AND_CLOSE, null, null);
210                  setCancelled(true);                  setCancelled(true);
# Line 213  public class TranslationAskJDialog exten Line 215  public class TranslationAskJDialog exten
215          /**          /**
216           * Used to restore all the values when cancel has been pressed.           * Used to restore all the values when cancel has been pressed.
217           */           */
218          protected void restore() {          private void restore() {
219                  int count = 0;                  int count = 0;
220                  for (JComponent component : translationEditJPanelsOrJustComponents) {                  for (JComponent component : translationEditJPanelsOrJustComponents) {
221                          if (component instanceof TranslationEditJPanel) {                          if (component instanceof TranslationEditJPanel) {
# Line 269  public class TranslationAskJDialog exten Line 271  public class TranslationAskJDialog exten
271                  if (cancelButton == null) {                  if (cancelButton == null) {
272                          cancelButton = new CancelButton(new AbstractAction("") {                          cancelButton = new CancelButton(new AbstractAction("") {
273                                  public void actionPerformed(ActionEvent evt) {                                  public void actionPerformed(ActionEvent evt) {
274  //                                      restore();                                          // restore();
275  //                                      TranslationAskJDialog.this.firePropertyChange(                                          // TranslationAskJDialog.this.firePropertyChange(
276  //                                                      PROPERTY_CANCEL_AND_CLOSE, null, null);                                          // PROPERTY_CANCEL_AND_CLOSE, null, null);
277  //                                      setVisible(false);                                          // setVisible(false);
278  //                                      setCancelled(true);                                          // setCancelled(true);
279  //                                      dispose();                                          // dispose();
280                                          cancel();                                          cancel();
281                                  }                                  }
282                          });                          });

Legend:
Removed from v.418  
changed lines
  Added in v.419

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26