public void showPlainMessage(SComponent parent, Object message, String title) { showOption(parent, title, message); setOptionType(SOptionPane.DEFAULT_OPTION); setMessageType(SOptionPane.PLAIN_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 showQuestion(SComponent parent, Object message, String title) { showOption(parent, title, message); setOptionType(SOptionPane.OK_CANCEL_OPTION); 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); }
public static void showQuestionDialog(SComponent parent, Object question, String title, ActionListener al) { SOptionPane p = new SOptionPane(); p.showQuestion(parent, question, title); p.setMessageType(SOptionPane.QUESTION_MESSAGE); p.addActionListener(al); }
public static void showPlainQuestionDialog(SComponent parent, Object question, String title, ActionListener al) { SOptionPane p = new SOptionPane(); p.showQuestion(parent, question, title); p.setMessageType(SOptionPane.PLAIN_MESSAGE); p.addActionListener(al); }
public static void showMessageDialog(SComponent parent, Object message, String title, int messageType, ActionListener al) { SOptionPane p = new SOptionPane(); p.showOption(parent, title, message); p.setMessageType(messageType); p.addActionListener(al); }
public static void showPlainMessageDialog(SComponent parent, Object message, String title, ActionListener al) { SOptionPane p = new SOptionPane(); p.showOption(parent, title, message); p.setMessageType(SOptionPane.PLAIN_MESSAGE); p.addActionListener(al); }
public static void showInputDialog(SComponent parent, Object question, String title, int messageType, SComponent inputElement, ActionListener al) { SOptionPane p = new SOptionPane(); p.showInput(parent, question, inputElement, title); p.setMessageType(messageType); p.addActionListener(al); }
/** * 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); }