Ejemplo n.º 1
0
 static {
   OPTION_TYPES
       .put(DEFAULT_OPTION, "DEFAULT_OPTION")
       .put(YES_NO_OPTION, "YES_NO_OPTION")
       .put(YES_NO_CANCEL_OPTION, "YES_NO_CANCEL_OPTION")
       .put(QUESTION_MESSAGE, "QUESTION_MESSAGE")
       .put(OK_CANCEL_OPTION, "OK_CANCEL_OPTION");
 }
Ejemplo n.º 2
0
 static {
   MESSAGE_TYPES
       .put(ERROR_MESSAGE, "ERROR_MESSAGE")
       .put(INFORMATION_MESSAGE, "INFORMATION_MESSAGE")
       .put(WARNING_MESSAGE, "WARNING_MESSAGE")
       .put(QUESTION_MESSAGE, "QUESTION_MESSAGE")
       .put(PLAIN_MESSAGE, "PLAIN_MESSAGE");
 }
Ejemplo n.º 3
0
 /**
  * Returns the <code>String</code> representation of the given <code>{@link Component}</code>,
  * which should be a <code>{@link JOptionPane}</code> (or subclass.)
  *
  * @param c the given <code>Component</code>.
  * @return the <code>String</code> representation of the given <code>JOptionPane</code>.
  */
 protected String doFormat(Component c) {
   JOptionPane optionPane = (JOptionPane) c;
   return concat(
       optionPane.getClass().getName(),
       "[",
       "message=",
       quote(optionPane.getMessage()),
       ", ",
       "messageType=",
       MESSAGE_TYPES.get(optionPane.getMessageType()),
       ", ",
       "optionType=",
       OPTION_TYPES.get(optionPane.getOptionType()),
       ", ",
       "enabled=",
       valueOf(optionPane.isEnabled()),
       ", ",
       "visible=",
       valueOf(optionPane.isVisible()),
       ", ",
       "showing=",
       valueOf(optionPane.isShowing()),
       "]");
 }