/[classpath]/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java

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

revision 1.23 by langel, Thu Sep 15 14:03:36 2005 UTC revision 1.24 by langel, Wed Sep 21 15:32:31 2005 UTC
# Line 405  public class BasicOptionPaneUI extends O Line 405  public class BasicOptionPaneUI extends O
405                 || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY)                 || e.getPropertyName().equals(JOptionPane.WANTS_INPUT_PROPERTY)
406                 || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY))                 || e.getPropertyName().equals(JOptionPane.SELECTION_VALUES_PROPERTY))
407          {          {
408            optionPane.removeAll();            optionPane.remove(messageAreaContainer);
409            messageAreaContainer = createMessageArea();            messageAreaContainer = createMessageArea();
410            optionPane.add(messageAreaContainer);            optionPane.add(messageAreaContainer);
411            optionPane.add(buttonContainer);            Container newButtons = createButtonArea();
412              optionPane.remove(buttonContainer);
413              optionPane.add(newButtons);
414              buttonContainer = newButtons;
415              optionPane.add(buttonContainer);
416          }          }
417        optionPane.invalidate();        optionPane.invalidate();
418        optionPane.repaint();        optionPane.repaint();
# Line 941  public class BasicOptionPaneUI extends O Line 945  public class BasicOptionPaneUI extends O
945        {        {
946        case JOptionPane.YES_NO_OPTION:        case JOptionPane.YES_NO_OPTION:
947          return new Object[] { YES_STRING, NO_STRING };          return new Object[] { YES_STRING, NO_STRING };
       case JOptionPane.DEFAULT_OPTION:  
948        case JOptionPane.YES_NO_CANCEL_OPTION:        case JOptionPane.YES_NO_CANCEL_OPTION:
949          return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };          return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };
950        case JOptionPane.OK_CANCEL_OPTION:        case JOptionPane.OK_CANCEL_OPTION:
951          return new Object[] { OK_STRING, CANCEL_STRING };          return new Object[] { OK_STRING, CANCEL_STRING };
952          case JOptionPane.DEFAULT_OPTION:
953            return (optionPane.getWantsInput() ) ?
954                   new Object[] { OK_STRING, CANCEL_STRING } :
955                   ( optionPane.getMessageType() == JOptionPane.QUESTION_MESSAGE ) ?
956                   new Object[] { YES_STRING, NO_STRING, CANCEL_STRING } :
957                   // ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, PLAIN_MESSAGE
958                   new Object[] { OK_STRING };
959        }        }
960      return null;      return null;
961    }    }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

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