import javax.swing.Icon;
import javax.swing.JOptionPane;
+import javax.swing.JPanel;
public class JvOptionPane extends JOptionPane
implements DialogRunnerI, PropertyChangeListener
}
+ public void showInternalDialog(JPanel mainPanel, String title,
+ int yesNoCancelOption, int questionMessage, Icon icon,
+ Object[] options, String initresponse)
+ {
+ if (!isInteractiveMode())
+ {
+ runner.firstRun((int) getMockResponse());
+ }
+ Component parent;
+ /**
+ * @j2sNative parent = this;
+ */
+ {
+ parent = parentComponent;
+ }
+ ;
+ ourOptions = Arrays.asList(options);
+
+ int response;
+ if (parent!=this) {
+
+ response = JOptionPane.showInternalOptionDialog(parent, mainPanel,
+ title, yesNoCancelOption, questionMessage, icon, options,
+ initresponse);
+ }
+ else
+ {
+ response = JOptionPane.showOptionDialog(parent, mainPanel, title,
+ yesNoCancelOption, questionMessage, icon, options,
+ initresponse);
+ }
+ /**
+ * @j2sNative
+ */
+ {
+ runner.firstRun(response);
+ }
+
+ }
@Override
public JvOptionPane response(RunResponse action)
{
}
}
+
}