public void showPlainMessage(SComponent parent, Object message, String title) { showOption(parent, title, message); setOptionType(SOptionPane.DEFAULT_OPTION); setMessageType(SOptionPane.PLAIN_MESSAGE); }
public void showQuestion(SComponent parent, Object message, String title) { showOption(parent, title, message); setOptionType(SOptionPane.OK_CANCEL_OPTION); setMessageType(SOptionPane.QUESTION_MESSAGE); }
public void showYesNo(SComponent parent, Object question, String title) { showOption(parent, title, question); setOptionType(YES_NO_OPTION); setMessageType(SOptionPane.QUESTION_MESSAGE); }
public void showQuestion(SComponent parent, Object question, String title, int type) { showOption(parent, title, question); setOptionType(type); setMessageType(SOptionPane.QUESTION_MESSAGE); }
public void showInput(SComponent parent, Object message, SComponent inputElement, String title) { showOption(parent, title, message); optionData.add(inputElement); inputValue = inputElement; setOptionType(SOptionPane.OK_CANCEL_OPTION); setMessageType(SOptionPane.QUESTION_MESSAGE); }
/** * Creates an instance of <code>JOptionPane</code> to display a message * with the specified message type, icon, and options, with the * initially-selected option specified. * * @param message the <code>Object</code> to display * @param messageType the type of message to be displayed: * ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, * QUESTION_MESSAGE, or PLAIN_MESSAGE * @param optionType the options to display in the pane: * DEFAULT_OPTION, YES_NO_OPTION, YES_NO_CANCEL_OPTION * OK_CANCEL_OPTION; only meaningful if the * <code>options</code> parameter is <code>null</code> * @param icon the Icon image to display * @param options the choices the user can select * @param initialValue the choice that is initially selected */ public SOptionPane(Object message, int messageType, int optionType, SIcon icon, Object[] options, Object initialValue) { this.message = message; this.options = options; this.initialValue = initialValue; this.icon = icon; initPanel(); setOptionType(optionType); setMessageType(messageType); setModal(true); setPreferredSize(SDimension.AUTOAREA); }