コード例 #1
0
 public String getApproveButtonText(JFileChooser fc) {
   String buttonText = fc.getApproveButtonText();
   if (buttonText != null) {
     return buttonText;
   } else if (fc.getDialogType() == JFileChooser.OPEN_DIALOG) {
     return openButtonText;
   } else if (fc.getDialogType() == JFileChooser.SAVE_DIALOG) {
     return saveButtonText;
   } else {
     return null;
   }
 }
コード例 #2
0
 private static String approveButtonText(final JFileChooser fileChooser) {
   String text = fileChooser.getApproveButtonText();
   if (!isEmpty(text)) return text;
   return fileChooser.getUI().getApproveButtonText(fileChooser);
 }