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(); |
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 |
} |
} |