Example #1
0
 /**
  * Gets the selected message or option type
  *
  * @param panel the Message Type or Confirm panel
  * @return the selected XXX_MESSAGE or XXX_OPTION constant from the JOptionPane class
  */
 public int getType(ButtonPanel panel) {
   String s = panel.getSelection();
   try {
     return JOptionPane.class.getField(s).getInt(null);
   } catch (Exception e) {
     return -1;
   }
 }
 @Override
 public void addButtonToLowerPane(@NotNull Runnable runnable, @NotNull String text) {
   int index = myButtonPanel.getComponentCount();
   if (index > 0 && myPresentation.isShowCancelButton()) index--;
   myButtonPanel.addButtonRunnable(index, runnable, text);
 }